Documents
Read document
Fetch the document identified by key. The returned document contains three special attributes:
- _id containing the document handle.
- _key containing key which uniquely identifies a document.
- _rev containing the revision.
get/_fabric/{fabric}/_api/document/{collection}/{key}
Request
- The document declares no server URL.
- Auth
- API key in header Authorization
- or HTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
fabricstring string required
The name of the fabric.
collectionstring string required
The name of the collection.
keystring string required
The key of the document.
Headers
If-None-Matchstring
If the If-None-Match header is given, it must contain exactly one ETag. The document is returned, if it has a different revision than the given ETag. Otherwise a HTTP 304 is returned.
If-Matchstring
If the If-Match header is given, it must contain exactly one ETag. The document is returned, if it has the same revision as the given ETag. Otherwise a HTTP 412 is returned.
Response
Successfully fetched document.
Example response
{
"_id": "test/foo",
"_key": "foo",
"_rev": "_dPRuHxe--_",
"data": "data1"
}Changes
No recorded changes to this operation across all 1 revision of this API.