Job aid: API and integration cheat sheet
Section titled “Job aid: API and integration cheat sheet”What an integrator needs at hand, from Module 5 and Module 6. Replace the names in angle brackets.
Credentials
Section titled “Credentials”| Caller | Credential | Sent as |
|---|---|---|
| Your program, no person present | An API token of its own application user | x-app-token: <token> |
| A person in your app | Authorization code with PKCE | Authorization: Bearer <access token> |
| A visitor on a public page | An anonymous token (POST /api/identity/v1/anonymous/token) | Authorization: Bearer <token> |
| The live channel | An OAuth access token or an anonymous token, never an API token | In the Socket.IO handshake |
Token lives: access 1 h · refresh 14 days, rotating, renewable up to a year · anonymous 10 min · API token until its expiry date. Revocation reaches every call within about five minutes. A regenerated API token overlaps the old one for 24 hours by default.
| Need | Call |
|---|---|
| List through a view | GET /api/v1/v/<viewId>/v3/entities/<entity>/entries?filterCriteria=… |
| Read one through a view | GET /api/v1/v/<viewId>/v1/entities/<entity>/entries/<id> |
| Create through a view | POST /api/v1/v/<viewId>/v1/entities/<entity>/entries with {"value": {…}} |
| A view’s own contract | GET /api/v1/views/<viewId>/openapi.json (turn on Swagger document) |
| Upload a file | POST /api/storage/v2/files?temp=true, multipart field file; result is an array |
| The tenant’s sign-in provider | GET /api/identity/v1/tenant-config, then the authority’s discovery document |
filterCriteria: {"limit": 50, "skip": 0, "order": ["value.<field> ASC", "id ASC"], "criteria": {…}};
free text in search. No cursors and no server maximum.
What comes back
Section titled “What comes back”- Success:
{"success": true, "result": …}, except aGETonv3, which is bare. Unwrap only whensuccessistrue. - Error:
{"success": false, "error": {"code", "message": {"en", "ar"}, "traceId"}}; field details underresult.details. Branch onerror.code; quotetraceId. - An empty plain list may mean “no access”: read one known record to tell.
Retry policy
Section titled “Retry policy”| Status | Do |
|---|---|
400 403 404 422 | Never retry unchanged |
401 | OAuth: refresh once, retry once. API token: stop |
409 | Re-read, then re-apply |
429 502 503 504 | Back off: random between 0 and min(60 s, 1 s × 2^attempt), at most 5; Retry-After is the floor |
500 with a catalogued code | Report it; do not retry |
| A timeout after sending a write | Reconcile before retrying |
Outbound calls (Call API)
Section titled “Outbound calls (Call API)”Public HTTP(S) addresses only · 30 seconds · 5 redirects · 10 MiB · 2xx is success · credential
headers and Redact in history values stored as **** · a masking policy makes a protected
value fail instead of being sent. Receivers: check the key, answer 2xx fast, deduplicate on the
record id, re-read when in doubt.
The live channel
Section titled “The live channel”Subscribe after every connect and wait for the acknowledgement: subscribeToNotifications,
entries/subscribe-to-entry with {entityId, entryId}, subscribeToJobExecution with
{messageId}. Events: entries/value-updated, entries/workflow-updated,
entries/comments-updated, entries/archived, entries/restored, notification. Best-effort,
no replay: re-read over HTTP after reconnecting.