Using
Reads a document; `_key`/`_version` are top-level fields and an opaque `ETag` is exposed for use with `If-Match`.
applies to v0.5.1GET
/store-api/json/{domain}/documents/{key}
const url = 'https://example.com/store-api/json/example/documents/example';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/store-api/json/example/documents/example \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”domain
required
string
JSON domain
key
required
string
Document key
Responses
Section titled “Responses”Document content with _key/_version metadata
Media typeapplication/json
A document as returned by the store: _key/_version metadata merged
into the user’s fields.
object
_key
required
Document key.
string
_version
required
Write counter: 1 on create, incremented on every write.
integer format: int64
key
additional properties
The document’s own fields. A document whose content is not a JSON
object appears as a single _content field holding that value.
Example generated
{ "_key": "example", "_version": 1}Headers
Section titled “Headers”ETag
string
Opaque version tag for If-Match / If-None-Match
Document or domain not found
Media typetext/plain
string
Domain is being deleted
Media typetext/plain
string
JSON engine disabled
Media typetext/plain
string