API address, filters and status codes
Look up how the Odigos API works: the address, methods, filters, response format and status codes. If you are new to the API, start with Fetch your first records through the API.
One API per data structure
All data in Odigos is stored in data structures. An administrator sets up an API on a data structure in Orchestra. That API sets:
- the path you call it on
- which operations are allowed: read, create, update and delete
- whether it returns a list or only single records by id
- which fields you see, and under which name
A data structure can have more than one API. That way you give each system only what it needs.
The address
https://<api-adres>/api/v1.0.0/<pad-van-je-api>The API address belongs to your organisation and to the environment: acceptance or production. The id of a record is never part of the path. You pass it as ?id=.
The full address is in the OpenAPI description of the API. Open it in Orchestra on the data structure: in the APIs section, click OpenAPI. Use Download YAML to import it into an API tool.

Methods
| Method | What it does |
|---|---|
GET | A list of records |
GET with ?id= | One record |
POST | Create a record |
PUT with ?id=, or with the id in the body | Update a record |
DELETE with ?id= | Delete a record |
If an operation isn't enabled on the API, you get a 404. The API doesn't support PATCH. The id is a number or a uuid, depending on the data structure.
Authenticate with a token
Every call sends a token in the header:
Authorization: Bearer odg_<id>_<geheim>You issue a token in Sentinel. It can do exactly what its roles allow, per API and per operation. If the token isn't allowed to do something, you get a 403 and the message names the missing permission. To learn how to issue a token, see Issue a token for another system.
An administrator can turn on two exceptions per API:
| Setting | What it does |
|---|---|
| Public read | The list can be requested without a token, with at most 100 records at a time. Requesting a single record is then not possible. Only available on an API that returns a list and only shows mapped fields. |
| Public start | A POST without a token that only starts a process and stores nothing, optionally with a captcha. For example for a form on a website. Read, update and delete stay closed. |
Reading: pages, sorting and counting
| Parameter | What it does |
|---|---|
limit | How many records you get. Default 1000, maximum 5000. |
offset | How many records to skip, to page through the list. |
sort | The field the list is sorted on. Put a minus in front to sort in descending order, such as sort=-id. |
count=1 | The total of the filtered list is included in totalCount. |
count=only | Only the total, without records. |
resolveLabels=true | For a reference to another record, the readable name is included too, if the API allows it. |
GET /api/v1.0.0/<pad-van-je-api>?limit=100&offset=200&sort=-idFilters
To filter, use the name of the field as a parameter.
| Filter | Meaning |
|---|---|
veld=waarde | Equal to. Repeat the parameter to match one of several values. |
veld[neq]=waarde | Not equal to |
veld[in][]=a&veld[in][]=b | One of these values |
veld[nin][]=a&veld[nin][]=b | None of these values |
veld[isnull]=1 | Empty |
veld[isnotnull]=1 | Filled in |
veld[gt]=, veld[gte]= | Greater than, greater than or equal to. Only on a number or a date. |
veld[lt]=, veld[lte]= | Less than, less than or equal to. Only on a number or a date. |
On a date field, the value can also be a relative date: @vandaag, @begin-week, @begin-maand, @einde-dag, @einde-week, @einde-maand, @laatste-dagen:N, @laatste-weken:N or @laatste-maanden:N.
An unknown filter or sort field returns a 400. Odigos doesn't silently ignore such a parameter.
Which field names do you use?
Use the names from the OpenAPI description of your API. An API can show fields under its own name and hide other fields. A field that isn't listed there returns a 400.
Response format
Every response has the same format. On success, the content is in data: a list for a list, a single object for ?id=.
{
"status": "success",
"data": [ ... ],
"requestid": "...",
"errors": [],
"version": "1.0.0"
}On an error, data is empty and errors says what is wrong. Each error has a fixed code and a message in plain language.
{
"status": "error",
"requestid": "...",
"errors": [
{ "code": "api.unknownfilter", "message": "...", "level": "warn" }
],
"data": null,
"version": "1.0.0"
}Keep the requestid. With it, a call can be traced when you ask for help.
Status codes
| Code | Meaning |
|---|---|
| 200 | Success: read, update, delete, or a notification that only starts a process. |
| 201 | The record was created. The id is in data.id. |
| 400 | The request isn't valid. For example an unknown field, a wrong type, a missing required field or an unknown filter. |
| 401 | No token, or the token is invalid, expired or revoked. |
| 403 | The token isn't allowed to perform this operation on this API. |
| 404 | There is no API on this path, the operation is turned off, or the record doesn't exist. |
| 409 | The value conflicts with a unique value or with a reference. |
| 422 | The content doesn't meet the rules of the data structure. errors lists, for each finding, which field it is and what is wrong. |
| 503 | A notification that only starts a process couldn't start that process. Nothing was stored, so try again later. |
Start processes
A POST on an API can also start a process. The response lists the processes that started in startedProcesses. To learn how to set this up, see Exchange events between Odigos and your system.