Blocks

List, read and find blocks, and change them in one atomic batch.

List top-level blocks

GET/api/v1/files/{fileId}/blocks

Top-level blocks in document order, a page at a time. Each page answers has_more and next_cursor (and a Link header when more follow); pass the cursor back unchanged. Cursors are signed Yjs positions: paging survives concurrent edits, and every block that exists for the whole walk comes back exactly once.

Credentials
Host key, or a user token with canvas:read.
Least role
view on the file (effective permission min(scope, role)).
Operation id
listBlocks

Parameters

NameInTypeDescription
fileIdrequiredpathstringThe host's file id 1 to 1024 characters.
limitqueryinteger1-100, default 100 1 to 100.
cursorquerystringOpaque, signed cursor from next_cursor (bound to this file and query, valid 1 h)

Responses

200OK

Headers

HeaderDescription
ETagThe document (or block) revision, quoted.
Idempotency-Replayedtrue when this is the stored answer of an earlier request with the same Idempotency-Key
RateLimit-PolicyToken buckets that apply: "subject";q=<burst>;w=<seconds to refill>, and "file-writes" on writes
RateLimitThe bucket closest to empty: "<name>";r=<remaining>;t=<seconds until full>
Link<…?cursor=…&limit=…>; rel="next" when more follow

Body application/json

FieldTypeDescription
blocksrequiredarray of Block-
blockIdrequiredstring | null-
revrequiredstring-
noderequiredobject-
revstring-
has_morerequiredboolean-
next_cursorrequiredstring | null-

Example

{
  "blocks": [
    {
      "blockId": "b_01m87jv4rtz1wkrv27pzmqk64r",
      "node": {
        "attrs": {
          "blockId": "b_01m87jv4rtz1wkrv27pzmqk64r",
          "level": 2
        },
        "content": [
          {
            "text": "Launch plan",
            "type": "text"
          }
        ],
        "type": "heading"
      },
      "rev": "689ac3d33e18"
    },
    {
      "blockId": "b_01m87jv4rtkdxymn93jwtx35sk",
      "node": {
        "attrs": {
          "blockId": "b_01m87jv4rtkdxymn93jwtx35sk"
        },
        "content": [
          {
            "text": "Ship on Friday.",
            "type": "text"
          }
        ],
        "type": "paragraph"
      },
      "rev": "5641be1fd2cb"
    }
  ],
  "has_more": true,
  "next_cursor": "eyJmIjoiZG9jXzEiLCJpIjoiQU1XcW5aRHpfZThKRDBFIiwiayI6ImJsb2NrcyIsInEiOiJlM2IwYzQ0Mjk4ZmMxYzE0OWFmYmY0YzgiLCJ4IjoxODAwMDAzNjAwfQ.pdHAPcfzMM5tjJk54UBrTS9TIqKP3xtJR9yZRY1bPv4",
  "rev": "fc3a67f52c7b"
}
400Bad Request: BAD_INPUT, PATCH_INVALID, CURSOR_INVALID, IDEMPOTENCY_KEY_INVALID, …

Body application/problem+json

FieldTypeDescription
typerequiredstringFormat uri-reference.
titlerequiredstring-
statusrequiredinteger-
detailstring-
coderequiredstringMachine code (BLOCK_NOT_FOUND, STALE_BLOCK, ROLE_FORBIDDEN, …)
freshanySTALE_BLOCK: the current state to retry against

Other members may appear; ignore the ones you do not know.

Example

{
  "type": "urn:opencanvas:problem:cursor-invalid",
  "title": "Bad Request",
  "status": 400,
  "detail": "the cursor is not valid for this request",
  "code": "CURSOR_INVALID"
}

Codes: CURSOR_INVALID.

401Unauthorized: UNAUTHENTICATED, TOKEN_INVALID, TOKEN_EXPIRED

Body application/problem+json

FieldTypeDescription
typerequiredstringFormat uri-reference.
titlerequiredstring-
statusrequiredinteger-
detailstring-
coderequiredstringMachine code (BLOCK_NOT_FOUND, STALE_BLOCK, ROLE_FORBIDDEN, …)
freshanySTALE_BLOCK: the current state to retry against

Other members may appear; ignore the ones you do not know.

Example

{
  "type": "urn:opencanvas:problem:unauthenticated",
  "title": "Unauthorized",
  "status": 401,
  "detail": "missing or wrong credentials",
  "code": "UNAUTHENTICATED"
}

Codes: UNAUTHENTICATED, TOKEN_INVALID, TOKEN_EXPIRED.

403Forbidden: ROLE_FORBIDDEN, SCOPE_REQUIRED, FILES_REQUIRED

Body application/problem+json

FieldTypeDescription
typerequiredstringFormat uri-reference.
titlerequiredstring-
statusrequiredinteger-
detailstring-
coderequiredstringMachine code (BLOCK_NOT_FOUND, STALE_BLOCK, ROLE_FORBIDDEN, …)
freshanySTALE_BLOCK: the current state to retry against

Other members may appear; ignore the ones you do not know.

Example

{
  "type": "urn:opencanvas:problem:scope-required",
  "title": "Forbidden",
  "status": 403,
  "detail": "SCOPE_REQUIRED: comment_add needs canvas:comment",
  "code": "SCOPE_REQUIRED"
}

Codes: SCOPE_REQUIRED, ROLE_FORBIDDEN, FILES_REQUIRED.

404Not Found: API_OFF, BLOCK_NOT_FOUND, NOT_FOUND, …

Body application/problem+json

FieldTypeDescription
typerequiredstringFormat uri-reference.
titlerequiredstring-
statusrequiredinteger-
detailstring-
coderequiredstringMachine code (BLOCK_NOT_FOUND, STALE_BLOCK, ROLE_FORBIDDEN, …)
freshanySTALE_BLOCK: the current state to retry against

Other members may appear; ignore the ones you do not know.

Example

{
  "type": "urn:opencanvas:problem:api-off",
  "title": "Not Found",
  "status": 404,
  "detail": "the API is not enabled for this host ([host.flags] api_v1)",
  "code": "API_OFF"
}

Codes: API_OFF.

410Gone: CURSOR_EXPIRED: cursors last an hour; start again without one

Body application/problem+json

FieldTypeDescription
typerequiredstringFormat uri-reference.
titlerequiredstring-
statusrequiredinteger-
detailstring-
coderequiredstringMachine code (BLOCK_NOT_FOUND, STALE_BLOCK, ROLE_FORBIDDEN, …)
freshanySTALE_BLOCK: the current state to retry against

Other members may appear; ignore the ones you do not know.

Example

{
  "type": "urn:opencanvas:problem:cursor-expired",
  "title": "Gone",
  "status": 410,
  "detail": "the cursor has expired; start again without one",
  "code": "CURSOR_EXPIRED"
}

Codes: CURSOR_EXPIRED.

429Too Many Requests: RATE_LIMITED, with Retry-After, RateLimit-Policy and RateLimit

Body application/problem+json

FieldTypeDescription
typerequiredstringFormat uri-reference.
titlerequiredstring-
statusrequiredinteger-
detailstring-
coderequiredstringMachine code (BLOCK_NOT_FOUND, STALE_BLOCK, ROLE_FORBIDDEN, …)
freshanySTALE_BLOCK: the current state to retry against

Other members may appear; ignore the ones you do not know.

Example

{
  "type": "urn:opencanvas:problem:rate-limited",
  "title": "Too Many Requests",
  "status": 429,
  "detail": "too many requests (subject limit); retry later",
  "code": "RATE_LIMITED"
}

Codes: RATE_LIMITED.

503Service Unavailable: UNAVAILABLE, ROOM_UNAVAILABLE, with Retry-After

Body application/problem+json

FieldTypeDescription
typerequiredstringFormat uri-reference.
titlerequiredstring-
statusrequiredinteger-
detailstring-
coderequiredstringMachine code (BLOCK_NOT_FOUND, STALE_BLOCK, ROLE_FORBIDDEN, …)
freshanySTALE_BLOCK: the current state to retry against

Other members may appear; ignore the ones you do not know.

Example

{
  "type": "urn:opencanvas:problem:unavailable",
  "title": "Service Unavailable",
  "status": 503,
  "detail": "the idempotency store is unavailable; retry",
  "code": "UNAVAILABLE"
}

Codes: UNAVAILABLE.

Errors

StatusCodeWhen
400CURSOR_INVALIDThe cursor is not one this server signed for this file and query: changed, truncated, from another host, or sent with a different filter, sort or fields. Pass next_cursor back unchanged.
410CURSOR_EXPIREDCursors last an hour. Start the walk again without one.

Also, like every operation on a file: API_OFF, UNAUTHENTICATED, TOKEN_INVALID, TOKEN_EXPIRED, SCOPE_REQUIRED, ROLE_FORBIDDEN, FILES_REQUIRED, RATE_LIMITED, UNAVAILABLE, INTERNAL.

Read one block (also nested ones)

GET/api/v1/files/{fileId}/blocks/{blockId}

One block by its blockId, top-level or nested (a paragraph in a column, a task in a list). The block's rev comes back as ETag.

Credentials
Host key, or a user token with canvas:read.
Least role
view on the file (effective permission min(scope, role)).
Operation id
getBlock

Parameters

NameInTypeDescription
fileIdrequiredpathstringThe host's file id 1 to 1024 characters.
blockIdrequiredpathstringThe block's blockId attribute

Responses

200OK

Headers

HeaderDescription
ETagThe document (or block) revision, quoted.
Idempotency-Replayedtrue when this is the stored answer of an earlier request with the same Idempotency-Key
RateLimit-PolicyToken buckets that apply: "subject";q=<burst>;w=<seconds to refill>, and "file-writes" on writes
RateLimitThe bucket closest to empty: "<name>";r=<remaining>;t=<seconds until full>
Link<…?cursor=…&limit=…>; rel="next" when more follow

Body application/json

FieldTypeDescription
blockIdrequiredstring | null-
revrequiredstring-
noderequiredobject-

Example

{
  "blockId": "b_01m87jv4rtkdxymn93jwtx35sk",
  "node": {
    "attrs": {
      "blockId": "b_01m87jv4rtkdxymn93jwtx35sk"
    },
    "content": [
      {
        "text": "Ship on Friday.",
        "type": "text"
      }
    ],
    "type": "paragraph"
  },
  "rev": "5641be1fd2cb"
}
401Unauthorized: UNAUTHENTICATED, TOKEN_INVALID, TOKEN_EXPIRED

Body application/problem+json

FieldTypeDescription
typerequiredstringFormat uri-reference.
titlerequiredstring-
statusrequiredinteger-
detailstring-
coderequiredstringMachine code (BLOCK_NOT_FOUND, STALE_BLOCK, ROLE_FORBIDDEN, …)
freshanySTALE_BLOCK: the current state to retry against

Other members may appear; ignore the ones you do not know.

Example

{
  "type": "urn:opencanvas:problem:unauthenticated",
  "title": "Unauthorized",
  "status": 401,
  "detail": "missing or wrong credentials",
  "code": "UNAUTHENTICATED"
}

Codes: UNAUTHENTICATED, TOKEN_INVALID, TOKEN_EXPIRED.

403Forbidden: ROLE_FORBIDDEN, SCOPE_REQUIRED, FILES_REQUIRED

Body application/problem+json

FieldTypeDescription
typerequiredstringFormat uri-reference.
titlerequiredstring-
statusrequiredinteger-
detailstring-
coderequiredstringMachine code (BLOCK_NOT_FOUND, STALE_BLOCK, ROLE_FORBIDDEN, …)
freshanySTALE_BLOCK: the current state to retry against

Other members may appear; ignore the ones you do not know.

Example

{
  "type": "urn:opencanvas:problem:scope-required",
  "title": "Forbidden",
  "status": 403,
  "detail": "SCOPE_REQUIRED: comment_add needs canvas:comment",
  "code": "SCOPE_REQUIRED"
}

Codes: SCOPE_REQUIRED, ROLE_FORBIDDEN, FILES_REQUIRED.

404Not Found: API_OFF, BLOCK_NOT_FOUND, NOT_FOUND, …

Body application/problem+json

FieldTypeDescription
typerequiredstringFormat uri-reference.
titlerequiredstring-
statusrequiredinteger-
detailstring-
coderequiredstringMachine code (BLOCK_NOT_FOUND, STALE_BLOCK, ROLE_FORBIDDEN, …)
freshanySTALE_BLOCK: the current state to retry against

Other members may appear; ignore the ones you do not know.

Example

{
  "type": "urn:opencanvas:problem:api-off",
  "title": "Not Found",
  "status": 404,
  "detail": "the API is not enabled for this host ([host.flags] api_v1)",
  "code": "API_OFF"
}

Codes: API_OFF, BLOCK_NOT_FOUND.

429Too Many Requests: RATE_LIMITED, with Retry-After, RateLimit-Policy and RateLimit

Body application/problem+json

FieldTypeDescription
typerequiredstringFormat uri-reference.
titlerequiredstring-
statusrequiredinteger-
detailstring-
coderequiredstringMachine code (BLOCK_NOT_FOUND, STALE_BLOCK, ROLE_FORBIDDEN, …)
freshanySTALE_BLOCK: the current state to retry against

Other members may appear; ignore the ones you do not know.

Example

{
  "type": "urn:opencanvas:problem:rate-limited",
  "title": "Too Many Requests",
  "status": 429,
  "detail": "too many requests (subject limit); retry later",
  "code": "RATE_LIMITED"
}

Codes: RATE_LIMITED.

503Service Unavailable: UNAVAILABLE, ROOM_UNAVAILABLE, with Retry-After

Body application/problem+json

FieldTypeDescription
typerequiredstringFormat uri-reference.
titlerequiredstring-
statusrequiredinteger-
detailstring-
coderequiredstringMachine code (BLOCK_NOT_FOUND, STALE_BLOCK, ROLE_FORBIDDEN, …)
freshanySTALE_BLOCK: the current state to retry against

Other members may appear; ignore the ones you do not know.

Example

{
  "type": "urn:opencanvas:problem:unavailable",
  "title": "Service Unavailable",
  "status": 503,
  "detail": "the idempotency store is unavailable; retry",
  "code": "UNAVAILABLE"
}

Codes: UNAVAILABLE.

Errors

StatusCodeWhen
404BLOCK_NOT_FOUNDNo block in the canvas has that blockId (the path's, an op's blockId, or a comment's blockId).

Also, like every operation on a file: API_OFF, UNAUTHENTICATED, TOKEN_INVALID, TOKEN_EXPIRED, SCOPE_REQUIRED, ROLE_FORBIDDEN, FILES_REQUIRED, RATE_LIMITED, UNAVAILABLE, INTERNAL.

Find blocks whose text contains q (case-insensitive)

GET/api/v1/files/{fileId}/blocks:find

Blocks whose text contains q, case-insensitively, in document order, with an excerpt and the block's position (path, indexes from the top). types keeps only those block types (paragraph, heading, taskList, ...).

Credentials
Host key, or a user token with canvas:read.
Least role
view on the file (effective permission min(scope, role)).
Operation id
findBlocks

Parameters

NameInTypeDescription
fileIdrequiredpathstringThe host's file id 1 to 1024 characters.
qquerystringText to find
typesquerystringComma-separated block types
limitqueryinteger1-100

Responses

200OK

Headers

HeaderDescription
RateLimit-PolicyToken buckets that apply: "subject";q=<burst>;w=<seconds to refill>, and "file-writes" on writes
RateLimitThe bucket closest to empty: "<name>";r=<remaining>;t=<seconds until full>

Body application/json

FieldTypeDescription
matchesrequiredarray of object-
blockIdstring-
revstring-
typestring-
pathstringIndexes from the top, dot-separated
excerptstring-

Other members may appear; ignore the ones you do not know.

Example

{
  "matches": [
    {
      "blockId": "b_01m87jv4rtkdxymn93jwtx35sk",
      "excerpt": "Ship on Friday.",
      "path": "1",
      "rev": "5641be1fd2cb",
      "type": "paragraph"
    }
  ]
}
400Bad Request: BAD_INPUT, PATCH_INVALID, CURSOR_INVALID, IDEMPOTENCY_KEY_INVALID, …

Body application/problem+json

FieldTypeDescription
typerequiredstringFormat uri-reference.
titlerequiredstring-
statusrequiredinteger-
detailstring-
coderequiredstringMachine code (BLOCK_NOT_FOUND, STALE_BLOCK, ROLE_FORBIDDEN, …)
freshanySTALE_BLOCK: the current state to retry against

Other members may appear; ignore the ones you do not know.

Example

{
  "type": "urn:opencanvas:problem:bad-input",
  "title": "Bad Request",
  "status": 400,
  "detail": "rows[0].values must be an object",
  "code": "BAD_INPUT"
}

Codes: BAD_INPUT.

401Unauthorized: UNAUTHENTICATED, TOKEN_INVALID, TOKEN_EXPIRED

Body application/problem+json

FieldTypeDescription
typerequiredstringFormat uri-reference.
titlerequiredstring-
statusrequiredinteger-
detailstring-
coderequiredstringMachine code (BLOCK_NOT_FOUND, STALE_BLOCK, ROLE_FORBIDDEN, …)
freshanySTALE_BLOCK: the current state to retry against

Other members may appear; ignore the ones you do not know.

Example

{
  "type": "urn:opencanvas:problem:unauthenticated",
  "title": "Unauthorized",
  "status": 401,
  "detail": "missing or wrong credentials",
  "code": "UNAUTHENTICATED"
}

Codes: UNAUTHENTICATED, TOKEN_INVALID, TOKEN_EXPIRED.

403Forbidden: ROLE_FORBIDDEN, SCOPE_REQUIRED, FILES_REQUIRED

Body application/problem+json

FieldTypeDescription
typerequiredstringFormat uri-reference.
titlerequiredstring-
statusrequiredinteger-
detailstring-
coderequiredstringMachine code (BLOCK_NOT_FOUND, STALE_BLOCK, ROLE_FORBIDDEN, …)
freshanySTALE_BLOCK: the current state to retry against

Other members may appear; ignore the ones you do not know.

Example

{
  "type": "urn:opencanvas:problem:scope-required",
  "title": "Forbidden",
  "status": 403,
  "detail": "SCOPE_REQUIRED: comment_add needs canvas:comment",
  "code": "SCOPE_REQUIRED"
}

Codes: SCOPE_REQUIRED, ROLE_FORBIDDEN, FILES_REQUIRED.

404Not Found: API_OFF, BLOCK_NOT_FOUND, NOT_FOUND, …

Body application/problem+json

FieldTypeDescription
typerequiredstringFormat uri-reference.
titlerequiredstring-
statusrequiredinteger-
detailstring-
coderequiredstringMachine code (BLOCK_NOT_FOUND, STALE_BLOCK, ROLE_FORBIDDEN, …)
freshanySTALE_BLOCK: the current state to retry against

Other members may appear; ignore the ones you do not know.

Example

{
  "type": "urn:opencanvas:problem:api-off",
  "title": "Not Found",
  "status": 404,
  "detail": "the API is not enabled for this host ([host.flags] api_v1)",
  "code": "API_OFF"
}

Codes: API_OFF.

429Too Many Requests: RATE_LIMITED, with Retry-After, RateLimit-Policy and RateLimit

Body application/problem+json

FieldTypeDescription
typerequiredstringFormat uri-reference.
titlerequiredstring-
statusrequiredinteger-
detailstring-
coderequiredstringMachine code (BLOCK_NOT_FOUND, STALE_BLOCK, ROLE_FORBIDDEN, …)
freshanySTALE_BLOCK: the current state to retry against

Other members may appear; ignore the ones you do not know.

Example

{
  "type": "urn:opencanvas:problem:rate-limited",
  "title": "Too Many Requests",
  "status": 429,
  "detail": "too many requests (subject limit); retry later",
  "code": "RATE_LIMITED"
}

Codes: RATE_LIMITED.

503Service Unavailable: UNAVAILABLE, ROOM_UNAVAILABLE, with Retry-After

Body application/problem+json

FieldTypeDescription
typerequiredstringFormat uri-reference.
titlerequiredstring-
statusrequiredinteger-
detailstring-
coderequiredstringMachine code (BLOCK_NOT_FOUND, STALE_BLOCK, ROLE_FORBIDDEN, …)
freshanySTALE_BLOCK: the current state to retry against

Other members may appear; ignore the ones you do not know.

Example

{
  "type": "urn:opencanvas:problem:unavailable",
  "title": "Service Unavailable",
  "status": 503,
  "detail": "the idempotency store is unavailable; retry",
  "code": "UNAVAILABLE"
}

Codes: UNAVAILABLE.

Errors

StatusCodeWhen
400BAD_INPUTThe request is not what the operation takes: the body is not a JSON object, a field is missing or has the wrong type, an op, mode, format or event type is unknown, or fileId is longer than 1,024 bytes. detail says which.

Also, like every operation on a file: API_OFF, UNAUTHENTICATED, TOKEN_INVALID, TOKEN_EXPIRED, SCOPE_REQUIRED, ROLE_FORBIDDEN, FILES_REQUIRED, RATE_LIMITED, UNAVAILABLE, INTERNAL.

Change blocks in one atomic transaction

POST/api/v1/files/{fileId}/blocks:batch

Change blocks in one Yjs transaction: all ops apply, or none. Ops: append and insertAfter (with markdown or Tiptap blocks), replace, delete, and editText (textEdits: [{find, replace}]). An op with ifMatch whose block changed since you read it answers 412 STALE_BLOCK with the fresh block, and the If-Match header does the same for the whole document. Deleting more than 5 blocks needs "confirm": true.

New content lands directly. Changes to existing blocks land directly too, unless the call sends "mode": "suggest" or the host sets [host.api] default_mode = "suggest": then they become a suggestion (suggestionId) for a person to accept. The answer's rev is the new document revision (also the ETag).

Credentials
Host key, or a user token with canvas:write.
Least role
edit on the file (effective permission min(scope, role)).
Idempotent
Send an Idempotency-Key to retry safely.
Operation id
batchBlocks

Parameters

NameInTypeDescription
fileIdrequiredpathstringThe host's file id 1 to 1024 characters.
If-MatchheaderstringThe document rev (ETag) the batch expects; a mismatch answers 412 STALE_BLOCK.
Idempotency-Keyheaderstring1-255 visible ASCII characters, scoped to the caller. A repeat of the same request within 24 h answers the stored result (Idempotency-Replayed: true); another request with the same key is 422 IDEMPOTENCY_KEY_REUSED; a duplicate while the first runs is 409 IDEMPOTENCY_IN_PROGRESS. Failed requests are not stored. 1 to 255 characters.

Request body

Required, application/json.

FieldTypeDescription
opsrequiredarray of BatchOpAt least 1 item.
oprequiredstringOne of append, insertAfter, replace, delete, editText.
blockIdstring-
ifMatchstringThe block rev this op expects
markdownstring-
blocksarray of object-
textEditsarray of object-
findstring-
replacestring-
modestringOne of direct, suggest.
confirmboolean-

Example

{
  "ops": [
    {
      "op": "append",
      "markdown": "## Decisions\n\nShip on Friday."
    },
    {
      "op": "editText",
      "blockId": "b_01m87jv4rtkdxymn93jwtx35sk",
      "ifMatch": "5641be1fd2cb",
      "textEdits": [
        {
          "find": "Friday",
          "replace": "Monday"
        }
      ]
    }
  ]
}

Responses

200OK

Headers

HeaderDescription
ETagThe document (or block) revision, quoted.
Idempotency-Replayedtrue when this is the stored answer of an earlier request with the same Idempotency-Key
RateLimit-PolicyToken buckets that apply: "subject";q=<burst>;w=<seconds to refill>, and "file-writes" on writes
RateLimitThe bucket closest to empty: "<name>";r=<remaining>;t=<seconds until full>
Link<…?cursor=…&limit=…>; rel="next" when more follow

Body application/json

FieldTypeDescription
appliedinteger-
modestring-
blockIdsarray of string-
revstring-
suggestionIdstring-

Example

{
  "applied": 2,
  "blockIds": [
    "b_01m87jv4s4hw2f9n0k3q6t8y1v",
    "b_01m87jv4s4p7d2m5c8x0z3r6tb",
    "b_01m87jv4rtkdxymn93jwtx35sk"
  ],
  "mode": "direct",
  "rev": "27ae51518968",
  "stale": []
}
400Bad Request: BAD_INPUT, PATCH_INVALID, CURSOR_INVALID, IDEMPOTENCY_KEY_INVALID, …

Body application/problem+json

FieldTypeDescription
typerequiredstringFormat uri-reference.
titlerequiredstring-
statusrequiredinteger-
detailstring-
coderequiredstringMachine code (BLOCK_NOT_FOUND, STALE_BLOCK, ROLE_FORBIDDEN, …)
freshanySTALE_BLOCK: the current state to retry against

Other members may appear; ignore the ones you do not know.

Example

{
  "type": "urn:opencanvas:problem:idempotency-key-invalid",
  "title": "Bad Request",
  "status": 400,
  "detail": "Idempotency-Key must be 1-255 visible ASCII characters",
  "code": "IDEMPOTENCY_KEY_INVALID"
}

Codes: IDEMPOTENCY_KEY_INVALID, BAD_INPUT.

401Unauthorized: UNAUTHENTICATED, TOKEN_INVALID, TOKEN_EXPIRED

Body application/problem+json

FieldTypeDescription
typerequiredstringFormat uri-reference.
titlerequiredstring-
statusrequiredinteger-
detailstring-
coderequiredstringMachine code (BLOCK_NOT_FOUND, STALE_BLOCK, ROLE_FORBIDDEN, …)
freshanySTALE_BLOCK: the current state to retry against

Other members may appear; ignore the ones you do not know.

Example

{
  "type": "urn:opencanvas:problem:unauthenticated",
  "title": "Unauthorized",
  "status": 401,
  "detail": "missing or wrong credentials",
  "code": "UNAUTHENTICATED"
}

Codes: UNAUTHENTICATED, TOKEN_INVALID, TOKEN_EXPIRED.

403Forbidden: ROLE_FORBIDDEN, SCOPE_REQUIRED, FILES_REQUIRED

Body application/problem+json

FieldTypeDescription
typerequiredstringFormat uri-reference.
titlerequiredstring-
statusrequiredinteger-
detailstring-
coderequiredstringMachine code (BLOCK_NOT_FOUND, STALE_BLOCK, ROLE_FORBIDDEN, …)
freshanySTALE_BLOCK: the current state to retry against

Other members may appear; ignore the ones you do not know.

Example

{
  "type": "urn:opencanvas:problem:scope-required",
  "title": "Forbidden",
  "status": 403,
  "detail": "SCOPE_REQUIRED: comment_add needs canvas:comment",
  "code": "SCOPE_REQUIRED"
}

Codes: SCOPE_REQUIRED, ROLE_FORBIDDEN, FILES_REQUIRED.

404Not Found: API_OFF, BLOCK_NOT_FOUND, NOT_FOUND, …

Body application/problem+json

FieldTypeDescription
typerequiredstringFormat uri-reference.
titlerequiredstring-
statusrequiredinteger-
detailstring-
coderequiredstringMachine code (BLOCK_NOT_FOUND, STALE_BLOCK, ROLE_FORBIDDEN, …)
freshanySTALE_BLOCK: the current state to retry against

Other members may appear; ignore the ones you do not know.

Example

{
  "type": "urn:opencanvas:problem:api-off",
  "title": "Not Found",
  "status": 404,
  "detail": "the API is not enabled for this host ([host.flags] api_v1)",
  "code": "API_OFF"
}

Codes: API_OFF, BLOCK_NOT_FOUND.

409Conflict: CONFLICT, CONFIRMATION_REQUIRED, IDEMPOTENCY_IN_PROGRESS (with Retry-After)

Body application/problem+json

FieldTypeDescription
typerequiredstringFormat uri-reference.
titlerequiredstring-
statusrequiredinteger-
detailstring-
coderequiredstringMachine code (BLOCK_NOT_FOUND, STALE_BLOCK, ROLE_FORBIDDEN, …)
freshanySTALE_BLOCK: the current state to retry against

Other members may appear; ignore the ones you do not know.

Example

{
  "type": "urn:opencanvas:problem:idempotency-in-progress",
  "title": "Conflict",
  "status": 409,
  "detail": "a request with this Idempotency-Key is still running",
  "code": "IDEMPOTENCY_IN_PROGRESS"
}

Codes: IDEMPOTENCY_IN_PROGRESS, CONFIRMATION_REQUIRED.

412Precondition Failed: STALE_BLOCK, with fresh

Body application/problem+json

FieldTypeDescription
typerequiredstringFormat uri-reference.
titlerequiredstring-
statusrequiredinteger-
detailstring-
coderequiredstringMachine code (BLOCK_NOT_FOUND, STALE_BLOCK, ROLE_FORBIDDEN, …)
freshanySTALE_BLOCK: the current state to retry against

Other members may appear; ignore the ones you do not know.

Example

{
  "type": "urn:opencanvas:problem:stale-block",
  "title": "Precondition Failed",
  "status": 412,
  "detail": "a block changed since it was read; re-read it and retry",
  "code": "STALE_BLOCK",
  "fresh": {
    "stale": [
      {
        "blockId": "b_01m87jv4rtkdxymn93jwtx35sk",
        "rev": "5641be1fd2cb",
        "markdown": "Ship on Friday.\n"
      }
    ]
  }
}

Codes: STALE_BLOCK.

413Payload Too Large: DOC_TOO_LARGE, IMPORT_TOO_LARGE

Body application/problem+json

FieldTypeDescription
typerequiredstringFormat uri-reference.
titlerequiredstring-
statusrequiredinteger-
detailstring-
coderequiredstringMachine code (BLOCK_NOT_FOUND, STALE_BLOCK, ROLE_FORBIDDEN, …)
freshanySTALE_BLOCK: the current state to retry against

Other members may appear; ignore the ones you do not know.

Example

{
  "type": "urn:opencanvas:problem:body-too-large",
  "title": "Payload Too Large",
  "status": 413,
  "detail": "the request body is too large",
  "code": "BODY_TOO_LARGE"
}

Codes: BODY_TOO_LARGE.

422Unprocessable Entity: IDEMPOTENCY_KEY_REUSED: the Idempotency-Key was used with a different request

Body application/problem+json

FieldTypeDescription
typerequiredstringFormat uri-reference.
titlerequiredstring-
statusrequiredinteger-
detailstring-
coderequiredstringMachine code (BLOCK_NOT_FOUND, STALE_BLOCK, ROLE_FORBIDDEN, …)
freshanySTALE_BLOCK: the current state to retry against

Other members may appear; ignore the ones you do not know.

Example

{
  "type": "urn:opencanvas:problem:idempotency-key-reused",
  "title": "Unprocessable Entity",
  "status": 422,
  "detail": "this Idempotency-Key was used with a different request",
  "code": "IDEMPOTENCY_KEY_REUSED"
}

Codes: IDEMPOTENCY_KEY_REUSED.

429Too Many Requests: RATE_LIMITED, with Retry-After, RateLimit-Policy and RateLimit

Body application/problem+json

FieldTypeDescription
typerequiredstringFormat uri-reference.
titlerequiredstring-
statusrequiredinteger-
detailstring-
coderequiredstringMachine code (BLOCK_NOT_FOUND, STALE_BLOCK, ROLE_FORBIDDEN, …)
freshanySTALE_BLOCK: the current state to retry against

Other members may appear; ignore the ones you do not know.

Example

{
  "type": "urn:opencanvas:problem:rate-limited",
  "title": "Too Many Requests",
  "status": 429,
  "detail": "too many requests (subject limit); retry later",
  "code": "RATE_LIMITED"
}

Codes: RATE_LIMITED.

502Bad Gateway: HOST_UNAVAILABLE: your load or save callback failed

Body application/problem+json

FieldTypeDescription
typerequiredstringFormat uri-reference.
titlerequiredstring-
statusrequiredinteger-
detailstring-
coderequiredstringMachine code (BLOCK_NOT_FOUND, STALE_BLOCK, ROLE_FORBIDDEN, …)
freshanySTALE_BLOCK: the current state to retry against

Other members may appear; ignore the ones you do not know.

Example

{
  "type": "urn:opencanvas:problem:host-unavailable",
  "title": "Bad Gateway",
  "status": 502,
  "detail": "host answered 503 Service Unavailable",
  "code": "HOST_UNAVAILABLE"
}

Codes: HOST_UNAVAILABLE.

503Service Unavailable: UNAVAILABLE, ROOM_UNAVAILABLE, with Retry-After

Body application/problem+json

FieldTypeDescription
typerequiredstringFormat uri-reference.
titlerequiredstring-
statusrequiredinteger-
detailstring-
coderequiredstringMachine code (BLOCK_NOT_FOUND, STALE_BLOCK, ROLE_FORBIDDEN, …)
freshanySTALE_BLOCK: the current state to retry against

Other members may appear; ignore the ones you do not know.

Example

{
  "type": "urn:opencanvas:problem:unavailable",
  "title": "Service Unavailable",
  "status": 503,
  "detail": "the idempotency store is unavailable; retry",
  "code": "UNAVAILABLE"
}

Codes: UNAVAILABLE.

Errors

StatusCodeWhen
400IDEMPOTENCY_KEY_INVALIDThe Idempotency-Key header is empty, longer than 255 bytes, or has characters outside visible ASCII.
422IDEMPOTENCY_KEY_REUSEDThe key was used in the last 24 hours with another method, path or body. Use a new key for a new request.
409IDEMPOTENCY_IN_PROGRESSA request with the same key is still running, on this or another node. Retry after Retry-After (1 second) to get its answer.
413BODY_TOO_LARGEThe request body is over the server's limit (at least 5 MiB, the import limit).
400BAD_INPUTThe request is not what the operation takes: the body is not a JSON object, a field is missing or has the wrong type, an op, mode, format or event type is unknown, or fileId is longer than 1,024 bytes. detail says which.
404BLOCK_NOT_FOUNDNo block in the canvas has that blockId (the path's, an op's blockId, or a comment's blockId).
412STALE_BLOCKA block op's ifMatch or the If-Match header names a revision that is no longer current. fresh carries the current state: the changed blocks with their rev and Markdown, or the document rev. Nothing was applied.
409CONFIRMATION_REQUIREDThe batch deletes more than 5 blocks. Send it again with "confirm": true.
502HOST_UNAVAILABLEYour load or save callback failed or timed out, so the file could not be loaded or saved.

Also, like every operation on a file: API_OFF, UNAUTHENTICATED, TOKEN_INVALID, TOKEN_EXPIRED, SCOPE_REQUIRED, ROLE_FORBIDDEN, FILES_REQUIRED, RATE_LIMITED, UNAVAILABLE, INTERNAL.

Make blocks live

POST/api/v1/files/{fileId}/live

"Make live" (LIVE-01, docs/27 §2.2): OpenCanvas asks your POST {callback_base}/files to create the live file (with the X-OpenCanvas-Callback-Token you send), writes the blocks into it as one edit with meta.kind = "live", saves it through the normal commit path, and replaces them in this canvas with one liveBlock node, one edit. Needs [host.flags] live_blocks. The blocks must be top-level; SDK blocks and blocks that hold live blocks cannot move. Databases and boards the blocks show move with them.

Credentials
Host key, or a user token with canvas:write.
Least role
edit on the file (effective permission min(scope, role)).
Idempotent
Send an Idempotency-Key to retry safely.
Operation id
makeLive

Parameters

NameInTypeDescription
fileIdrequiredpathstringThe host's file id 1 to 1024 characters.
Idempotency-Keyheaderstring1-255 visible ASCII characters, scoped to the caller. A repeat of the same request within 24 h answers the stored result (Idempotency-Replayed: true); another request with the same key is 422 IDEMPOTENCY_KEY_REUSED; a duplicate while the first runs is 409 IDEMPOTENCY_IN_PROGRESS. Failed requests are not stored. 1 to 255 characters.

Request body

Required, application/json.

FieldTypeDescription
blockIdsrequiredarray of stringTop-level blocks to move, 1-500
namerequiredstringThe live file's name, 1-200 characters

Example

{
  "blockIds": [
    "b_01j9k2m3n4"
  ],
  "name": "Q1 OKRs"
}

Responses

201The live file and the block that now references it

Headers

HeaderDescription
Idempotency-Replayedtrue when this is the stored answer of an earlier request with the same Idempotency-Key
RateLimit-PolicyToken buckets that apply: "subject";q=<burst>;w=<seconds to refill>, and "file-writes" on writes
RateLimitThe bucket closest to empty: "<name>";r=<remaining>;t=<seconds until full>

Body application/json

FieldTypeDescription
liveFileIdrequiredstring-
blockIdrequiredstring-
kindrequiredstringOne of blocks, database, board.

Other members may appear; ignore the ones you do not know.

Example

{
  "liveFileId": "f_8812",
  "blockId": "b_01j9k2m3n5",
  "kind": "blocks"
}
400Bad Request: BAD_INPUT, PATCH_INVALID, CURSOR_INVALID, IDEMPOTENCY_KEY_INVALID, …

Body application/problem+json

FieldTypeDescription
typerequiredstringFormat uri-reference.
titlerequiredstring-
statusrequiredinteger-
detailstring-
coderequiredstringMachine code (BLOCK_NOT_FOUND, STALE_BLOCK, ROLE_FORBIDDEN, …)
freshanySTALE_BLOCK: the current state to retry against

Other members may appear; ignore the ones you do not know.

Example

{
  "type": "urn:opencanvas:problem:bad-input",
  "title": "Bad Request",
  "status": 400,
  "detail": "rows[0].values must be an object",
  "code": "BAD_INPUT"
}

Codes: BAD_INPUT, IDEMPOTENCY_KEY_INVALID.

401Unauthorized: UNAUTHENTICATED, TOKEN_INVALID, TOKEN_EXPIRED

Body application/problem+json

FieldTypeDescription
typerequiredstringFormat uri-reference.
titlerequiredstring-
statusrequiredinteger-
detailstring-
coderequiredstringMachine code (BLOCK_NOT_FOUND, STALE_BLOCK, ROLE_FORBIDDEN, …)
freshanySTALE_BLOCK: the current state to retry against

Other members may appear; ignore the ones you do not know.

Example

{
  "type": "urn:opencanvas:problem:unauthenticated",
  "title": "Unauthorized",
  "status": 401,
  "detail": "missing or wrong credentials",
  "code": "UNAUTHENTICATED"
}

Codes: UNAUTHENTICATED, TOKEN_INVALID, TOKEN_EXPIRED.

403Forbidden: ROLE_FORBIDDEN, SCOPE_REQUIRED, FILES_REQUIRED

Body application/problem+json

FieldTypeDescription
typerequiredstringFormat uri-reference.
titlerequiredstring-
statusrequiredinteger-
detailstring-
coderequiredstringMachine code (BLOCK_NOT_FOUND, STALE_BLOCK, ROLE_FORBIDDEN, …)
freshanySTALE_BLOCK: the current state to retry against

Other members may appear; ignore the ones you do not know.

Example

{
  "type": "urn:opencanvas:problem:scope-required",
  "title": "Forbidden",
  "status": 403,
  "detail": "SCOPE_REQUIRED: comment_add needs canvas:comment",
  "code": "SCOPE_REQUIRED"
}

Codes: SCOPE_REQUIRED, ROLE_FORBIDDEN, FILES_REQUIRED, LIVE_DEPTH.

404Not Found: API_OFF, BLOCK_NOT_FOUND, NOT_FOUND, …

Body application/problem+json

FieldTypeDescription
typerequiredstringFormat uri-reference.
titlerequiredstring-
statusrequiredinteger-
detailstring-
coderequiredstringMachine code (BLOCK_NOT_FOUND, STALE_BLOCK, ROLE_FORBIDDEN, …)
freshanySTALE_BLOCK: the current state to retry against

Other members may appear; ignore the ones you do not know.

Example

{
  "type": "urn:opencanvas:problem:api-off",
  "title": "Not Found",
  "status": 404,
  "detail": "the API is not enabled for this host ([host.flags] api_v1)",
  "code": "API_OFF"
}

Codes: API_OFF, BLOCK_NOT_FOUND, LIVE_OFF.

409Conflict: CONFLICT, CONFIRMATION_REQUIRED, IDEMPOTENCY_IN_PROGRESS (with Retry-After)

Body application/problem+json

FieldTypeDescription
typerequiredstringFormat uri-reference.
titlerequiredstring-
statusrequiredinteger-
detailstring-
coderequiredstringMachine code (BLOCK_NOT_FOUND, STALE_BLOCK, ROLE_FORBIDDEN, …)
freshanySTALE_BLOCK: the current state to retry against

Other members may appear; ignore the ones you do not know.

Example

{
  "type": "urn:opencanvas:problem:idempotency-in-progress",
  "title": "Conflict",
  "status": 409,
  "detail": "a request with this Idempotency-Key is still running",
  "code": "IDEMPOTENCY_IN_PROGRESS"
}

Codes: IDEMPOTENCY_IN_PROGRESS.

422Unprocessable Entity: IDEMPOTENCY_KEY_REUSED: the Idempotency-Key was used with a different request

Body application/problem+json

FieldTypeDescription
typerequiredstringFormat uri-reference.
titlerequiredstring-
statusrequiredinteger-
detailstring-
coderequiredstringMachine code (BLOCK_NOT_FOUND, STALE_BLOCK, ROLE_FORBIDDEN, …)
freshanySTALE_BLOCK: the current state to retry against

Other members may appear; ignore the ones you do not know.

Example

{
  "type": "urn:opencanvas:problem:idempotency-key-reused",
  "title": "Unprocessable Entity",
  "status": 422,
  "detail": "this Idempotency-Key was used with a different request",
  "code": "IDEMPOTENCY_KEY_REUSED"
}

Codes: IDEMPOTENCY_KEY_REUSED.

429Too Many Requests: RATE_LIMITED, with Retry-After, RateLimit-Policy and RateLimit

Body application/problem+json

FieldTypeDescription
typerequiredstringFormat uri-reference.
titlerequiredstring-
statusrequiredinteger-
detailstring-
coderequiredstringMachine code (BLOCK_NOT_FOUND, STALE_BLOCK, ROLE_FORBIDDEN, …)
freshanySTALE_BLOCK: the current state to retry against

Other members may appear; ignore the ones you do not know.

Example

{
  "type": "urn:opencanvas:problem:rate-limited",
  "title": "Too Many Requests",
  "status": 429,
  "detail": "too many requests (subject limit); retry later",
  "code": "RATE_LIMITED"
}

Codes: RATE_LIMITED.

501Not Implemented: PDF_RENDERER_NOT_CONFIGURED

Body application/problem+json

FieldTypeDescription
typerequiredstringFormat uri-reference.
titlerequiredstring-
statusrequiredinteger-
detailstring-
coderequiredstringMachine code (BLOCK_NOT_FOUND, STALE_BLOCK, ROLE_FORBIDDEN, …)
freshanySTALE_BLOCK: the current state to retry against

Other members may appear; ignore the ones you do not know.

Example

{
  "type": "urn:opencanvas:problem:live-create-unsupported",
  "title": "Not Implemented",
  "status": 501,
  "detail": "the host does not create files (POST /files)",
  "code": "LIVE_CREATE_UNSUPPORTED"
}

Codes: LIVE_CREATE_UNSUPPORTED.

502Bad Gateway: HOST_UNAVAILABLE: your load or save callback failed

Body application/problem+json

FieldTypeDescription
typerequiredstringFormat uri-reference.
titlerequiredstring-
statusrequiredinteger-
detailstring-
coderequiredstringMachine code (BLOCK_NOT_FOUND, STALE_BLOCK, ROLE_FORBIDDEN, …)
freshanySTALE_BLOCK: the current state to retry against

Other members may appear; ignore the ones you do not know.

Example

{
  "type": "urn:opencanvas:problem:host-unavailable",
  "title": "Bad Gateway",
  "status": 502,
  "detail": "host answered 503 Service Unavailable",
  "code": "HOST_UNAVAILABLE"
}

Codes: HOST_UNAVAILABLE.

503Service Unavailable: UNAVAILABLE, ROOM_UNAVAILABLE, with Retry-After

Body application/problem+json

FieldTypeDescription
typerequiredstringFormat uri-reference.
titlerequiredstring-
statusrequiredinteger-
detailstring-
coderequiredstringMachine code (BLOCK_NOT_FOUND, STALE_BLOCK, ROLE_FORBIDDEN, …)
freshanySTALE_BLOCK: the current state to retry against

Other members may appear; ignore the ones you do not know.

Example

{
  "type": "urn:opencanvas:problem:unavailable",
  "title": "Service Unavailable",
  "status": 503,
  "detail": "the idempotency store is unavailable; retry",
  "code": "UNAVAILABLE"
}

Codes: UNAVAILABLE.

Errors

StatusCodeWhen
400BAD_INPUTThe request is not what the operation takes: the body is not a JSON object, a field is missing or has the wrong type, an op, mode, format or event type is unknown, or fileId is longer than 1,024 bytes. detail says which.
404BLOCK_NOT_FOUNDNo block in the canvas has that blockId (the path's, an op's blockId, or a comment's blockId).
404LIVE_OFFLive block operations need [host.flags] live_blocks = true in the host's entry of the hosts file.
403LIVE_DEPTHThe canvas is itself a live file (meta.kind = "live"), which may not contain live blocks or references (the depth rule, docs/27 §2.2).
501LIVE_CREATE_UNSUPPORTEDYour POST {callback_base}/files answered 404, 405 or 501: "Make live" needs it.
502HOST_UNAVAILABLEYour load or save callback failed or timed out, so the file could not be loaded or saved.
400IDEMPOTENCY_KEY_INVALIDThe Idempotency-Key header is empty, longer than 255 bytes, or has characters outside visible ASCII.
422IDEMPOTENCY_KEY_REUSEDThe key was used in the last 24 hours with another method, path or body. Use a new key for a new request.
409IDEMPOTENCY_IN_PROGRESSA request with the same key is still running, on this or another node. Retry after Retry-After (1 second) to get its answer.

Also, like every operation on a file: API_OFF, UNAUTHENTICATED, TOKEN_INVALID, TOKEN_EXPIRED, SCOPE_REQUIRED, ROLE_FORBIDDEN, FILES_REQUIRED, RATE_LIMITED, UNAVAILABLE, INTERNAL.

List the live blocks and block references

GET/api/v1/files/{fileId}/references

The liveBlock and blockRef nodes in this canvas (LIVE-01, docs/27 §2.4) with the caller's access to each source, from your POST /access answers (cached 30 s). "Where is this live block used" is yours to answer: OpenCanvas keeps no usage index, and tells you with the live.embedded and live.removed events instead.

Credentials
Host key, or a user token with canvas:read.
Least role
view on the file (effective permission min(scope, role)).
Operation id
listReferences

Parameters

NameInTypeDescription
fileIdrequiredpathstringThe host's file id 1 to 1024 characters.

Responses

200OK: Every reference, with the caller's access to its source

Headers

HeaderDescription
RateLimit-PolicyToken buckets that apply: "subject";q=<burst>;w=<seconds to refill>, and "file-writes" on writes
RateLimitThe bucket closest to empty: "<name>";r=<remaining>;t=<seconds until full>

Body application/json

FieldTypeDescription
itemsrequiredarray of object-
blockIdrequiredstring-
typerequiredstringOne of liveBlock, blockRef.
fileIdrequiredstring-
refBlockIdstring-
kindstring-
accessrequiredstringOne of edit, comment, view, none.

Example

{
  "items": [
    {
      "blockId": "b_01j9k2m3n5",
      "type": "liveBlock",
      "fileId": "f_8812",
      "kind": "blocks",
      "access": "edit"
    }
  ]
}
401Unauthorized: UNAUTHENTICATED, TOKEN_INVALID, TOKEN_EXPIRED

Body application/problem+json

FieldTypeDescription
typerequiredstringFormat uri-reference.
titlerequiredstring-
statusrequiredinteger-
detailstring-
coderequiredstringMachine code (BLOCK_NOT_FOUND, STALE_BLOCK, ROLE_FORBIDDEN, …)
freshanySTALE_BLOCK: the current state to retry against

Other members may appear; ignore the ones you do not know.

Example

{
  "type": "urn:opencanvas:problem:unauthenticated",
  "title": "Unauthorized",
  "status": 401,
  "detail": "missing or wrong credentials",
  "code": "UNAUTHENTICATED"
}

Codes: UNAUTHENTICATED, TOKEN_INVALID, TOKEN_EXPIRED.

403Forbidden: ROLE_FORBIDDEN, SCOPE_REQUIRED, FILES_REQUIRED

Body application/problem+json

FieldTypeDescription
typerequiredstringFormat uri-reference.
titlerequiredstring-
statusrequiredinteger-
detailstring-
coderequiredstringMachine code (BLOCK_NOT_FOUND, STALE_BLOCK, ROLE_FORBIDDEN, …)
freshanySTALE_BLOCK: the current state to retry against

Other members may appear; ignore the ones you do not know.

Example

{
  "type": "urn:opencanvas:problem:scope-required",
  "title": "Forbidden",
  "status": 403,
  "detail": "SCOPE_REQUIRED: comment_add needs canvas:comment",
  "code": "SCOPE_REQUIRED"
}

Codes: SCOPE_REQUIRED, ROLE_FORBIDDEN, FILES_REQUIRED.

404Not Found: API_OFF, BLOCK_NOT_FOUND, NOT_FOUND, …

Body application/problem+json

FieldTypeDescription
typerequiredstringFormat uri-reference.
titlerequiredstring-
statusrequiredinteger-
detailstring-
coderequiredstringMachine code (BLOCK_NOT_FOUND, STALE_BLOCK, ROLE_FORBIDDEN, …)
freshanySTALE_BLOCK: the current state to retry against

Other members may appear; ignore the ones you do not know.

Example

{
  "type": "urn:opencanvas:problem:api-off",
  "title": "Not Found",
  "status": 404,
  "detail": "the API is not enabled for this host ([host.flags] api_v1)",
  "code": "API_OFF"
}

Codes: API_OFF.

429Too Many Requests: RATE_LIMITED, with Retry-After, RateLimit-Policy and RateLimit

Body application/problem+json

FieldTypeDescription
typerequiredstringFormat uri-reference.
titlerequiredstring-
statusrequiredinteger-
detailstring-
coderequiredstringMachine code (BLOCK_NOT_FOUND, STALE_BLOCK, ROLE_FORBIDDEN, …)
freshanySTALE_BLOCK: the current state to retry against

Other members may appear; ignore the ones you do not know.

Example

{
  "type": "urn:opencanvas:problem:rate-limited",
  "title": "Too Many Requests",
  "status": 429,
  "detail": "too many requests (subject limit); retry later",
  "code": "RATE_LIMITED"
}

Codes: RATE_LIMITED.

502Bad Gateway: HOST_UNAVAILABLE: your load or save callback failed

Body application/problem+json

FieldTypeDescription
typerequiredstringFormat uri-reference.
titlerequiredstring-
statusrequiredinteger-
detailstring-
coderequiredstringMachine code (BLOCK_NOT_FOUND, STALE_BLOCK, ROLE_FORBIDDEN, …)
freshanySTALE_BLOCK: the current state to retry against

Other members may appear; ignore the ones you do not know.

Example

{
  "type": "string",
  "title": "string",
  "status": 0,
  "code": "string"
}
503Service Unavailable: UNAVAILABLE, ROOM_UNAVAILABLE, with Retry-After

Body application/problem+json

FieldTypeDescription
typerequiredstringFormat uri-reference.
titlerequiredstring-
statusrequiredinteger-
detailstring-
coderequiredstringMachine code (BLOCK_NOT_FOUND, STALE_BLOCK, ROLE_FORBIDDEN, …)
freshanySTALE_BLOCK: the current state to retry against

Other members may appear; ignore the ones you do not know.

Example

{
  "type": "urn:opencanvas:problem:unavailable",
  "title": "Service Unavailable",
  "status": 503,
  "detail": "the idempotency store is unavailable; retry",
  "code": "UNAVAILABLE"
}

Codes: UNAVAILABLE.

Errors

Also, like every operation on a file: API_OFF, UNAUTHENTICATED, TOKEN_INVALID, TOKEN_EXPIRED, SCOPE_REQUIRED, ROLE_FORBIDDEN, FILES_REQUIRED, RATE_LIMITED, UNAVAILABLE, INTERNAL.

Last changed .