API keys
An API key lets your own systems call the Unstract Flow API: start runs, check on them, and read review tickets. Keys belong to the organization, and organization owners and admins manage them in Settings, on the API keys tab.
Create a key
- In Settings, open the API keys tab and select Create API key.
- In Name, say what uses the key, for example
Acme BI integration. - Optionally, fill in What is it used for (optional).
- Under Expires, pick 30 days, 60 days, 90 days, 1 year or Custom, which takes any date up to a year away. Every key expires; 90 days is the default.
- Under Access, pick Full access or Limited.
- Select Create API key.
- Copy the key and store it securely. Flow shows it this once.
A key gives access to the API for your organization. Runs it starts are recorded as started by the person who created it, and changes to review tickets act as that person, with their current permissions. Who a key acts as has the details.
Full access or limited
Full access lets the key do anything you can do, and it follows your role: if your permissions change, the key's change with them.
Limited narrows it to the permissions you tick, grouped by what they act on. Pick only what the key needs, so that if it leaks, that is all it can do. You cannot give a key a permission you do not hold yourself, and a limited key still loses one the moment you do.
The key list shows each limited key's permissions, and Full access for the rest.
Keys on the tab
The table shows each key's first 12 characters, when it was Last used, when it Expires, what it can do, and its Status: Active, Expired or Revoked. View activity on a key's row lists the requests made with it while it was active, including failed ones such as an expired key. Requests sent with a key after it was revoked don't appear there.
To stop a key working, select Revoke on its row and confirm. The key stays in the list as Revoked, and its row keeps View activity. Integrations that use it stop working at once. A lost key can't be shown again: revoke it and create a new one.
Try the API
The API explorer, below the keys, sends real requests to the API from your browser. Under "Copy this into your integration", it shows each request as a curl command with your organization ID filled in. Requests go out with your sign-in in place of a key, and only organization owners and admins can send them.
It offers every request in the API but GET /whoami, which describes the calling key, and the explorer has none:
| Group | Requests |
|---|---|
| Discovery | List workflows, List runs, Run logs |
| Workflows | Get a workflow, Get the spec, List versions, Get a version, Create a workflow, Change a workflow, Save the spec, Check a spec |
| Builds | List builds, Get a build, Prepare (build), Cancel a build, Tag a build |
| Connectors | Connector catalog, A workflow’s connectors, List credentials, Add a connector, Link a credential, Remove a connector |
| Pipelines | Pipeline items, Reset or remove items, Reset a whole pipeline, Expedite files |
| Runs | Trigger a run, Run status, Run results, All runs, Explain a run, Recovery options, Cancel a run, Recover a run |
| Deployments | List deployments, Get a deployment, A deployment’s runs, Create a deployment, Change a deployment, Activate a deployment, Pause a deployment, Run a deployment, Regenerate webhook key, Delete a deployment |
| HITL | List tickets, Ticket history, Get a ticket, Claim the next ticket, Claim a ticket, Skip a ticket, Release a ticket, Escalate a ticket, Resolve a ticket |
| Reference tables | List tables, Get a table, Table versions, Start an import, Get an import, An import’s changes, Confirm the mapping, Make an import current, Discard an import |
Each request answers as it would for a key you created with Full access. So List credentials lists your own credentials and the ones shared with you, and List deployments leaves out other members' private deployments.
A request that changes something acts on your organization's data: a run it starts is recorded on the Runs page like any other, and Delete a deployment can't be undone. Above Run request, such a request shows "This request changes data in your organization, as the same request with an API key of yours would.", followed by a note for the four that need one, such as "This cannot be undone." on Delete a deployment. The explorer sends no Idempotency-Key, so pressing Run request twice sends the request twice.
Runs you start here show API Explorer in the Trigger column of the Runs page. Ticket history records the ticket changes you make here with details.via_api_explorer set to true, where a key's change records details.via_api_key.
Run results returns what a finished run returned; Path in the result (optional) narrows it to one field, for example totals.count. Start an import uploads the file you pick; its curl command names that file, so run it from the folder that holds it.
To call the API from your own system, send the key in the X-API-Key header, as the curl command does. Authentication has the details.