Skip to navigation

Write a preference

Writes the key’s whole document, creating the key or replacing it. State what you computed the write against: If-Match: "<version>" from the read or the page, If-None-Match: * to write only while nothing is stored under the key, or If-Match: * to overwrite on purpose. Neither header is 428; a stale version is 412 with currentVersion: re-read and reapply.

Authentication

AuthorizationBearer

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

Path parameters

keystringRequired
The key, matched exactly.

Headers

If-MatchstringOptional

The version you computed the write against, quoted or bare, or * to overwrite on purpose. One of this and If-None-Match: * is required.

If-None-MatchenumOptional

*: create the key only while nothing is stored under it, the write a client makes after a 404. Anything else is 400.

Allowed values:
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.

Request

This endpoint expects an object.
valueanyRequired
tagslist of stringsOptional

Tags to list by: at most 50, each 1 to 64 characters of [A-Za-z0-9:._-], lower-cased and de-duplicated on write. Absent or empty, the row carries none: a write restates the tags too.

Response

The key was replaced. The ETag is its new version.

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
Put Preferences Request Bad Request Error
401
Put Preferences Request Unauthorized Error
409
Put Preferences Request Conflict Error
412
Put Preferences Request Precondition Failed Error
413
Put Preferences Request Content Too Large Error
428
Put Preferences Request Precondition Error
501
Put Preferences Request Not Implemented Error
503
Put Preferences Request Service Unavailable Error