Automation

Rules stored in a canvas and run by the server on behalf of their owner: list, save, switch on or off, test and read the run history.

Rules in a canvas, run by the server on behalf of their owner (ADR-067); off unless [host.automation]

List automation rules

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

The rules stored in the canvas (the automations root), each with whether it can run and, for date and schedule rules, nextRunAt (ms), plus the host's limits and the origins URL calls may reach. Anyone who can read the file can read its rules.

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

Parameters

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

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

object

Example

{
  "rules": [
    {
      "id": "au_move",
      "rule": {
        "name": "Move done items",
        "trigger": {
          "kind": "field.changed",
          "database": "db_1",
          "field": "Status",
          "to": "Done"
        },
        "conditions": [
          {
            "field": "Owner",
            "op": "isNotEmpty"
          }
        ],
        "actions": [
          {
            "kind": "row.move",
            "to": {
              "database": "db_archive"
            }
          },
          {
            "kind": "notify",
            "people": [
              "field:Owner"
            ],
            "text": "{row.title} is done and archived"
          }
        ],
        "v": 1,
        "enabled": true,
        "ownerId": "u_lea",
        "ownerName": "Lea Fischer",
        "updatedAt": "2026-11-26T09:12:00Z"
      },
      "valid": true
    }
  ],
  "limits": {
    "maxRules": 25,
    "maxChanges": 50,
    "runsPerMinute": 60,
    "runsPerDay": 1000,
    "maxDepth": 3,
    "minIntervalMin": 15,
    "timeZone": "Europe/Berlin",
    "actions": [
      "field.set",
      "row.move",
      "todo.set",
      "todo.add",
      "comment.add",
      "notify",
      "http.post"
    ],
    "origins": [
      "https://docs.acme.example"
    ]
  }
}
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, AUTOMATION_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": "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
502HOST_UNAVAILABLEYour load or save callback failed or timed out, so the file could not be loaded or saved.
404AUTOMATION_OFFThe operator has not turned automation on for this host.

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

Test run a rule

POST/api/v1/files/{fileId}/automations:test

What a rule (saved or not) would do on the most recent matching row, or rowId: the trigger, each condition and each action's effect. Changes nothing and sends nothing; costs no run.

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
testAutomation

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
rulerequiredAutomationRuleA rule (docs/34 §5.3): trigger, conditions (all, or any with match = any), 1-5 actions. ownerId, ownerName, updatedAt and paused are set by the server.
vinteger-
namestring-
enabledboolean-
ownerIdstring-
ownerNamestring-
updatedAtstring-
timeZonestring-
triggerrequiredobject-
matchstringOne of all, any.
conditionsarray of object-
actionsrequiredarray of object-
pausedobject-
rowIdstring-

Example

{
  "rule": {
    "name": "Move done items",
    "trigger": {
      "kind": "field.changed",
      "database": "db_1",
      "field": "Status",
      "to": "Done"
    },
    "conditions": [
      {
        "field": "Owner",
        "op": "isNotEmpty"
      }
    ],
    "actions": [
      {
        "kind": "row.move",
        "to": {
          "database": "db_archive"
        }
      },
      {
        "kind": "notify",
        "people": [
          "field:Owner"
        ],
        "text": "{row.title} is done and archived"
      }
    ]
  }
}

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

object

Example

{
  "subject": {
    "rowId": "r_1",
    "title": "Rate limit the public API"
  },
  "trigger": "field.changed",
  "conditions": [
    {
      "index": 0,
      "field": "Owner",
      "op": "isNotEmpty",
      "holds": true
    }
  ],
  "conditionsHold": true,
  "effects": [
    "Would move the row to Archive (3 fields match)",
    "Would notify u_noor through the host"
  ],
  "changes": 1,
  "changed": false,
  "sent": false
}
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, AUTOMATION_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.

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
502HOST_UNAVAILABLEYour load or save callback failed or timed out, so the file could not be loaded or saved.
404AUTOMATION_OFFThe operator has not turned automation on for this host.
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.

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

Automation run history

GET/api/v1/files/{fileId}/automations/runs

The run log of the canvas, newest first: ids, trigger, result, codes and counts, never canvas text or field values; kept 30 days. Editors only (the log can name people).

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

Parameters

NameInTypeDescription
fileIdrequiredpathstringThe host's file id 1 to 1024 characters.
rulequerystringOnly this rule
resultquerystringdone, skipped, failed or stopped
beforequeryintegernext of the previous page (ms)
limitqueryinteger1-500 (default 100) 1 to 500.

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
runsrequiredarray of AutomationRun-
idrequiredstring-
fileIdstring-
ruleIdrequiredstring-
triggerrequiredstring-
resultrequiredstringOne of running, done, skipped, failed, stopped.
errorCodestring-
httpStatusinteger-
changesinteger-
notifiedinteger-
depthinteger-
durationMsinteger-
atrequiredinteger-
nextrequiredinteger | null-

Example

{
  "runs": [
    {
      "id": "run_01jdx4k8z6qf3w",
      "fileId": "doc_8812",
      "ruleId": "au_move",
      "trigger": "field.changed",
      "result": "done",
      "errorCode": "",
      "httpStatus": 0,
      "changes": 1,
      "notified": 1,
      "depth": 0,
      "durationMs": 180,
      "at": 1795689044670
    }
  ],
  "next": null
}
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, AUTOMATION_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": "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
502HOST_UNAVAILABLEYour load or save callback failed or timed out, so the file could not be loaded or saved.
404AUTOMATION_OFFThe operator has not turned automation on for this host.

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

Create or replace a rule

PUT/api/v1/files/{fileId}/automations/{ruleId}

Saves a rule in the canvas. The caller becomes its owner and the rule runs on their behalf from now on (with a host key, X-OpenCanvas-Author names them). Checked like the editor's save: valid trigger and actions, actions the host allows, URL calls only to the host's callback origin or [host.automation] allow_origins, schedules not more often than the minimum, at most max_rules.

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
saveAutomation

Parameters

NameInTypeDescription
fileIdrequiredpathstringThe host's file id 1 to 1024 characters.
ruleIdrequiredpathstringThe rule id (1-64 letters, digits, - or _)
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
vinteger-
namestring-
enabledboolean-
ownerIdstring-
ownerNamestring-
updatedAtstring-
timeZonestring-
triggerrequiredobject-
matchstringOne of all, any.
conditionsarray of object-
actionsrequiredarray of object-
pausedobject-

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

Example

{
  "name": "Move done items",
  "trigger": {
    "kind": "field.changed",
    "database": "db_1",
    "field": "Status",
    "to": "Done"
  },
  "conditions": [
    {
      "field": "Owner",
      "op": "isNotEmpty"
    }
  ],
  "actions": [
    {
      "kind": "row.move",
      "to": {
        "database": "db_archive"
      }
    },
    {
      "kind": "notify",
      "people": [
        "field:Owner"
      ],
      "text": "{row.title} is done and archived"
    }
  ]
}

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

object

Example

{
  "id": "au_move"
}
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, RULE_INVALID, URL_NOT_ALLOWED, RULE_LIMIT.

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, AUTOMATION_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.

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
502HOST_UNAVAILABLEYour load or save callback failed or timed out, so the file could not be loaded or saved.
404AUTOMATION_OFFThe operator has not turned automation on for this host.
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.
400RULE_INVALIDThe rule does not parse, names an action the host does not allow, or schedules more often than the minimum.
400URL_NOT_ALLOWEDA URL call to an origin that is neither the host's callback origin nor in [host.automation] allow_origins (ADR-068).
400RULE_LIMITThe canvas has max_rules rules; delete one to add another.

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

Delete a rule

DELETE/api/v1/files/{fileId}/automations/{ruleId}

Removes the rule from the canvas (frees a slot; switching it off does not).

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
deleteAutomation

Parameters

NameInTypeDescription
fileIdrequiredpathstringThe host's file id 1 to 1024 characters.
ruleIdrequiredpathstringThe rule id (1-64 letters, digits, - or _)
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.

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

object

Example

{
  "id": "au_move",
  "deleted": true
}
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, AUTOMATION_OFF, RULE_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.

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
502HOST_UNAVAILABLEYour load or save callback failed or timed out, so the file could not be loaded or saved.
404AUTOMATION_OFFThe operator has not turned automation on for this host.
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.
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.
404RULE_NOT_FOUNDNo rule with that id in this canvas.

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

Switch a rule on or off

POST/api/v1/files/{fileId}/automations/{ruleId}/enable

{enabled: true} switches a rule on and makes the caller its owner ("Run it as me" on a paused rule); false switches it off.

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
enableAutomation

Parameters

NameInTypeDescription
fileIdrequiredpathstringThe host's file id 1 to 1024 characters.
ruleIdrequiredpathstringThe rule id (1-64 letters, digits, - or _)
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
enabledrequiredboolean-

Example

{
  "enabled": true
}

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

object

Example

{
  "id": "au_move",
  "enabled": true
}
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, AUTOMATION_OFF, RULE_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.

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
502HOST_UNAVAILABLEYour load or save callback failed or timed out, so the file could not be loaded or saved.
404AUTOMATION_OFFThe operator has not turned automation on for this host.
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.
404RULE_NOT_FOUNDNo rule with that id in this canvas.

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 .