Skip to navigation

Restate a workspace

Replaces one of your workspaces whole: every member of the body is required, and the slug never moves. If-Match is required: the version you read or last wrote, or * to overwrite on purpose. A stale version is 412 with currentVersion: re-read and reapply. An autosave keeps one write in flight and sends each If-Match from the previous answer’s ETag.

Authentication

AuthorizationBearer

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

Path parameters

workspaceIdstringRequired
The workspace id.

Headers

If-MatchstringRequired

Required on every entity write: the ETag the read minted, quoted or bare, the version this write was computed against, or * to write unconditionally on purpose. Absent is 428 PRECONDITION_REQUIRED; a weak validator or a list 400 INVALID_IF_MATCH; a stale value 412 VERSION_CONFLICT with currentVersion and a fresh ETag: re-read, reapply, retry. Every write restates the whole record, so a * write overwrites every field from your copy. State the version unless you mean the overwrite.

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.
titlestringRequired1-100 characters
The title, 1 to 100 characters, not blank, with no NUL and no unpaired surrogate.
layoutmap from strings to anyRequired

The layout: a JSON object of at most 256 KiB serialised, yours to shape. Anything but an object is 400; more than 256 KiB is 413 PAYLOAD_TOO_LARGE.

tagslist of stringsRequired

The tags, whole: at most 50, each 1 to 64 characters of [A-Za-z0-9:._-], lower-cased and de-duplicated on write. An empty list clears them.

visibilitystringRequired

Who may read the row: PRIVATE, its owner alone; ORG, the owner’s organisation too, read-only, once organisation admission serves colleagues’ rows. ORG needs a token that names an organisation: without one it is 400. Append-only: tolerate values you don’t know; a write of one this release does not know is 400.

Response

The workspace as restated. The ETag is its new version.

workspaceIdstring
The workspace's id, a UUID. Ids are opaque strings.
slugstringformat: "^[a-z0-9][a-z0-9-]{0,99}$"

The slug, 1 to 100 characters of [a-z0-9-], unique among the owner’s workspaces: minted from the title on create unless you supplied one, and never changed after, so a page URL outlives a rename.

titlestring1-100 characters
The title, 1 to 100 characters, not blank, with no NUL and no unpaired surrogate.
layoutmap from strings to any

The layout: a JSON object whose shape belongs to the code that renders it (keep your own schemaVersion inside it). The API checks that it is an object of at most 256 KiB serialised and never reads inside it; it is served as you last wrote it: the same tree, members in their order, numbers exact.

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.

visibilitystring

Who may read the row: PRIVATE, its owner alone; ORG, the owner’s organisation too, read-only, once organisation admission serves colleagues’ rows. ORG needs a token that names an organisation: without one it is 400. Append-only: tolerate values you don’t know; a write of one this release does not know is 400.

ownedboolean

Whether you own the row. false for a colleague’s ORG workspace, which you can read but not write. The owner’s identity is not on the row.

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

The row’s version, the ETag’s value: send it as If-Match on a write. A decimal string from one sequence shared by every row.

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

When the workspace was created, in epoch nanoseconds; microsecond-exact, so it ends in 000.

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

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

Errors

400
Update Workspaces Request Bad Request Error
401
Update Workspaces Request Unauthorized Error
404
Update Workspaces Request Not Found Error
409
Update Workspaces Request Conflict Error
412
Update Workspaces Request Precondition Failed Error
413
Update Workspaces Request Content Too Large Error
428
Update Workspaces Request Precondition Error
501
Update Workspaces Request Not Implemented Error
503
Update Workspaces Request Service Unavailable Error