Skip to content
Atila Romero edited this page Jun 5, 2020 · 10 revisions

Arguments

  • --host= Address to listen on
  • --port= Port to listen on
  • --sources= An URL or file with a JSON with a specific format: SourceJSON[]

Example:

[
  {"id"="src1", "path"="./path1/"},
  {"id"="src2", "path"="./path2/"}
]

API

Sources

  • GET sources/ - List sources. A source is the directory of a previously processed image.
  • POST sources/ - Add source. Format: SourceJSON
  • GET sources/{sourceID} - Get source's properties

Search

  • GET search?q={query}&sourceID={sourceID} - Search documents

Documents

  • GET sources/{sourceID}/docs/{id} - Get document's properties
  • GET sources/{sourceID}/docs/{id}/content - Get document's raw content
  • GET sources/{sourceID}/docs/{id}/text - Get document's content converted as text
  • GET sources/{sourceID}/docs/{id}/thumb - Get document's thumbnail

Bookmarks

  • GET bookmarks - List bookmarks
  • GET bookmarks/{bookmark} - List bookmark documents
  • PUT bookmarks/{bookmark}/add - Add documents to bookmark. Format: DocIDJSON[]
  • PUT bookmarks/{bookmark}/remove - Remove documents to bookmark. Format: DocIDJSON[]
  • POST bookmarks/{bookmark} - Create bookmark
  • DELETE bookmarks/{bookmark} - Delete bookmark
  • PUT bookmarks/{old}/rename/{new} - Rename bookmark

Categories

  • GET categories - List categories

Selection

  • GET selection - List selected documents
  • PUT selection/add - Add documents to selection. Format: DocIDJSON[]
  • DELETE selection/remove - Remove documents from selection. Format: DocIDJSON[]

Formats

SourceJSON

  • {id, path}

SourceJSON[]

  • [{id,path},...]

DocIDJSON[]

  • [{source, id}, ...]
Clone this wiki locally