Document search returns a single document by document_uuid.
See Documents for a service that searches documents.
Call
Call the service at dhinstance/seach/document passing input parameters in the POST body.
Using curl as an example:
curl -X POST -H "Content-Type: application/json" --data @document_search.json "dhinstance/search/document"
The call with also require an authorization header to identify the instance user, who is then used as the instance uuid.
See Data loads for a definition of dhinstance.
Input
{
"document_uuid": "documentUUID",
"include_worker": true|false
}OR
{
"document_key": "full/document/path",
"include_worker": true|false
}Output
{
"results": {
"document_uuid": "uuid",
...,
"worker": {
"worker_uuid": "uuid",
...
}
}
}The response is a JSON object. The results property is an object that represents a document and associated worker. See Document data and Worker data for details.
Worker details are returned if include_worker is true (they may be returned if it is false, depending on the capabilities of the underlying store).
If the document cannot be found, the service returns a not found (HTTP status code 404).