Fetch Document by DocId
POST
/api/collections/data/fetch/documentLast modified:Â 4 months ago
Fetch a Document
Retrieve the contents of a single document using the Document ID
You can get a Document using the Document Id:
- The Document Id is a unique identifier for a document in a collection.
- The Document Id is automatically generated when a document is created.
- OR, You can also manually define the Document Id while creating a document.
curl --location 'https://api.worqhat.com/api/collections/data/fetch/all' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <token>' \
--data '{
"collection": "Sample collection",
"documentId": "Sample document id"
}'
Request
Body Params application/json
collection
stringÂ
required
docId
stringÂ
required
Example
{
"collection": "datalogs",
"docId": "19d678a8-2e78-42e2-80a5-a9fdf4a23dad"
}
Request samples
Responses
OK(200)
Bad Request(400)
HTTP Code:Â 200
Content Type :Â JSONapplication/json
Data Schema
data
array [object {4}]Â
required
data 1
stringÂ
optional
data 2
stringÂ
optional
data 3
stringÂ
optional
data 4
stringÂ
optional
processingTime
numberÂ
required
processingId
stringÂ
required
Example
{
"data": [
{
"data 1": "et ipsum",
"data 2": "sint mollit cupidatat commodo",
"data 3": "veniam non nulla id sunt",
"data 4": "dolor sint quis laboris elit"
}
],
"processingTime": -8767244.897798806,
"processingId": "magna laboris"
}
Last modified: 4 months ago