-
Notifications
You must be signed in to change notification settings - Fork 222
Web API
Atila Romero edited this page Jun 5, 2020
·
10 revisions
- --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/"}
]
- 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
- GET search?q={query}&sourceID={sourceID} - Search 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
- 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
- GET categories - List categories
- GET selection - List selected documents
- PUT selection/add - Add documents to selection. Format: DocIDJSON[]
- DELETE selection/remove - Remove documents from selection. Format: DocIDJSON[]
- {id, path}
- [{id,path},...]
- [{source, id}, ...]