Skip to navigation

Get a preference

One of your preferences by key, matched exactly. A key you have not written is 404: a client shows its default then, with no version to write against, and creates the key with If-None-Match: *. The ETag is the row’s version; send it back as If-None-Match to be answered 304 while nothing has changed.

Answers 304. Unchanged: the version If-None-Match named is the row’s. No body; the ETag restates the version.

Response headerDescription
ETagThe row’s version, quoted: "<version>", what If-Match takes on a write of the row.
X-Request-IdThe request’s id: your X-Request-Id where you sent a usable one, a fresh id otherwise. An error restates it as error.requestId; quote it when you ask about a request.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

keystringRequired
The key, matched exactly.

Headers

If-None-MatchstringOptional

The ETag you hold, quoted or bare: while it is still the row’s version the read answers 304 with no body, else 200 with the row.

X-Request-IdstringOptional

Your own id for the request: 8 to 128 of [A-Za-z0-9._-]. It becomes the request’s id and is echoed on the response. A value off that grammar is replaced with a fresh id, never refused.

Response

The preference.
keystringformat: "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"

The key: 1 to 128 characters of [A-Za-z0-9._:-], starting with a letter or digit, matched exactly.

valueany
tagslist of strings

Tags to list by: at most 50, each 1 to 64 characters of [a-z0-9:._-], lower-cased on write and unique.

versionstringformat: "^[0-9]+$"

The row’s version, the ETag’s value: send it as If-Match on a write of the key. A decimal string from one sequence shared by every row, so it never repeats for a key, not even across a delete and a re-create.

createdAtNsstringformat: "^[0-9]+$"

When the key was first written, in epoch nanoseconds; microsecond-exact, so it ends in 000.

updatedAtNsstringformat: "^[0-9]+$"

When the key was last written, in epoch nanoseconds; microsecond-exact, so it ends in 000.

Errors

400
Get Preferences Request Bad Request Error
401
Get Preferences Request Unauthorized Error
404
Get Preferences Request Not Found Error
501
Get Preferences Request Not Implemented Error
503
Get Preferences Request Service Unavailable Error