Appearance
API clients
An API client is another system allowed to use your organisation's API: an online form that opens cases, a line-of-business system, the migration tool, or Power BI reading reports. Each may do only what you allow. Admin → API clients lists them, what each may do, when each was last used and whether it is working, stopped or has an expired secret.
The page's How other systems connect box gives the API's address, its description (OpenAPI) and the address for access tokens. See The public API.
Adding an API client
Choose Add an API client.
| Setting | |
|---|---|
| Name | What people call it, such as Online forms |
| Description | What it is for, and who looks after it |
| What may it do? | Give it only what it needs. You cannot give it more than you can do yourself. |
| Secret stops working on | Optional. Leave blank for a secret that keeps working until it is replaced or the client is stopped. |
What a client can be allowed:
| Permission | Lets it |
|---|---|
| See cases | List and read cases, their notes and the actions open to it |
| Open cases | Open cases with the people on them |
| Change cases | Add documents, take a case's actions and add notes |
| See every restricted case | See restricted cases too; otherwise it sees only unrestricted ones |
| See reports | Read Power BI feeds and shared reports |
| Import cases | Keep old references, dates, statuses and assignees, add files to closed cases, and bring notes and history: for moving to this system |
| See registers | Read registers and their entries, lists and inspections, and entries with a place as GeoJSON for GIS (Maps and GIS) |
| Change registers | Add and change register entries, rows of their lists and inspections, such as homes kept by a housing system (The public API) |
Choose Add the API client.
Copy the secret now
The client's secret (it begins ak_) is shown once. Give it to whoever looks after the system, and keep it somewhere safe, such as a password manager. Only a fingerprint of it is stored, so it cannot be shown again.
How a client signs in
- Send the secret in an
X-Api-Keyheader (or as a bearer token), or - swap the client ID and secret for an access token that lasts an hour (OAuth 2.0 client credentials), and send that.
Your organisation can refuse secrets sent on every call, so only access tokens work. See Security.
A client's credentials work only on the public API (/api/v1), never on the screens' own API. Each client may make 600 calls a minute.
What a client does is recorded
Everything a client does goes through the same checks as a person's work, and is recorded as the client's: the case history names it ("… (API client)"), notes it adds are its own and cannot be changed by staff, and its reads are in the audit log. Refused sign-ins of a real client (stopped, expired, or keys not allowed) are in the sign-ins log with the reason.
Renewing and stopping
- Give it a new secret: the current secret, and every access token issued for it, stops working at once. The system must be given the new one straight away.
- Stop this API client: it can never use the API again. It stays listed, so you can still see what it did. This cannot be undone.
Power BI
Power BI (or Excel) can read your data with Get data → Web, with an Authorization: Bearer header holding the client's secret or an access token. The client needs See reports.
| Feed | One row per |
|---|---|
/api/v1/powerbi/cases | Case, with names resolved and time limit bands worked out |
/api/v1/powerbi/tasks | Task |
/api/v1/powerbi/time | Time entry |
/api/v1/powerbi/reports/{id} | Row of a report shared with the organisation |
/api/v1/powerbi/registers/{register}/entries | Entry of a register, such as an employee, with its details |
/api/v1/powerbi/registers/{register}/lists/{list} | Row of a list kept on a register's entries, such as each employee's absences |
The register feeds need See registers too. Ask for updatedSince with the last updatedAt you read to get only what changed since; a list's rows removed since then come too, once, with removedAt set. Read on with after set to each page's next (see Reading page by page).
Feeds are paged, up to a thousand rows at a time. Build the summaries you want as shared reports, and read them here. Each read is recorded in the audit log as an export.