Connect another system through the API
Create a token for an HR system or a script, choose what it may do, and revoke it when it is no longer needed.
Create a token
- Open Governance › Settings. Owners and admins see API tokens.
- Name the token after the system that will use it.
- Tick May record changes if it should write, May see and change costs if it needs them, and May find people by work email if another product signs its users in and needs to know which person each one is. Every token can read the whole organization, this one too.
- Choose Create token, then Copy beside it: it is shown only this time.
Use it
Send it as Authorization: Bearer odb_…. The endpoints and their answers are on the API page of this site. Changes made through the API are dated like any other and recorded as coming from the API.
A token may make 120 calls a minute, and all tokens of an organization together 600. Every answer says how many are left (RateLimit-Remaining); a call beyond the limit is answered with 429 and Retry-After, the seconds to wait.
Be told about changes
- Under Webhooks in the same settings, add a public https address. Its signing secret is shown once, with Copy beside it.
- Whenever changes are recorded (an edit, an import, a scenario step or the API), the address receives a signed message with their ids; the system then reads what it needs through the API.
- When a wave of a scenario moves to another day with its changes, the address receives
changes.redated: the same changes, the day they had and the day they have. - When a scenario is brought up to date and changes that no longer fit are dropped from it, the address receives
changes.droppedwith their numbers. - A receiver that does not answer with success is tried again later, up to six times.
Keep it safe
- A token reads the whole organization. Keep it where your other secrets are kept.
- The list shows when each token was last used.
- Revoke ends a token at once. Creating and revoking tokens is recorded in Activity.
Allow an app of another product
A product used by many organizations can ask you to allow it instead of asking for a token. It sends you to a page of Organization DB that says which app it is, who makes it and what it would be able to do.
- Check the app's name and who makes it. Unverified means Organization DB has not checked who makes it: allow it only if you know.
- If you manage several organizations, choose the one the app may use.
- Choose Allow to go back to the app connected, or Deny to go back without connecting it.
- Only an organization's owners and admins can allow apps.
- An app asks again each time it signs in; one already connected says so.
- An unverified app cannot be allowed to see sensitive values, and can be connected to only a few organizations.
Connected apps
- Under Connected apps in Governance › Settings, owners and admins see every app the organization allowed: who makes it, what it can do, who allowed it and when it was last used.
- Revoke ends an app's access at once; it is asked first. To connect it again, allow it again from the app.