Documents

Read document header

Like GET, but only fetch the header fields and not the body. You can use this call to get the current revision of a document or check if the document was deleted.

head/_fabric/{fabric}/_api/document/{collection}/{key}

Request

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. If the current document revision is not equal to the specified ETag, a HTTP 200 response is returned. If the current document revision is identical to the specified ETag, 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 headers.

_idstring

ID of the collection.

_keystring

_key details of collection.

_revstring

_rev details of collection.

datastring

data in record.

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.