Docs / API
API overview
Read and change your company's Arctic GRC data from your own scripts with the REST API.
The Arctic GRC API lets your own scripts and systems read your company's data, and make the changes you allow. Examples are pulling controls into a dashboard, adding vendors from procurement, or creating people from your HR system.
The API only reaches your own company. A token never sees more than the person it is bound to may see in the workspace.
Turn it on
An owner or admin makes API tokens in Settings › Developer. Each token belongs to one company and is bound to one person. See Authentication.
Base address
https://<your Arctic GRC address>/api/v1
The full description, in OpenAPI 3, is at /api/v1/openapi.json. It is public and lists every endpoint your deployment has switched on.
Requests and answers
- Send and receive JSON (
application/json). A file upload ismultipart/form-data. - Send the token on every request:
Authorization: Bearer <token>. - Dates are
YYYY-MM-DD, and moments are ISO 8601 in UTC. - A JSON body is at most 256 KB. A document version's file is at most 10 MB.
Lists and paging
Lists come in pages, forward only.
pageSizesets how many come back: 1 to 100, and 10 when you leave it out.- A list answers
{ "results": { "data": [...], "pageInfo": { "endCursor": "...", "hasNextPage": true } } }. - Send
endCursorback aspageCursorto get the next page. WhenhasNextPageis false, you have them all. A cursor only works with the token and filters it came from.
Errors
An error has an HTTP status and a body like this:
{ "error": { "code": "validation_failed", "message": "Fix the fields shown.", "fields": { "tier": "Pick a tier." } } }
| Status | code | What it means |
|---|---|---|
| 400 | invalid_request | The request is malformed: an unknown field, a wrong type, a bad cursor. |
| 401 | unauthenticated | No token, or one that doesn't exist. |
| 403 | insufficient_scope, address_not_allowed, token_not_working, plan_lapsed, not_in_plan | The token can't do this, from this address, or now. message says why. |
| 404 | not_found | No such record in your company. A record of another company answers the same way. |
| 409 | idempotency_key_reused, request_in_progress | See Retrying safely. |
| 413 | too_large | The body is over its limit. |
| 422 | validation_failed | The workspace's own checks refused the change. fields names each field, with the words the workspace would show. |
| 429 | rate_limited | Too many requests. Wait for Retry-After seconds. |
Rate limits
| Limit | Per minute |
|---|---|
| Requests per token | 120 |
| Changes per token | 30 |
| File uploads per token | 10 |
| Requests per company, all tokens together | 600 |
/vulnerabilities per company (it can ask your scanners) | 6 |
Every answer carries RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset.
Retrying safely
Send an Idempotency-Key header (1 to 255 printable characters, for example a UUID) on a POST. For 24 hours, the same key with the same body from the same token returns the first answer again and changes nothing.
- The same key with a different body answers
409 idempotency_key_reused. - While the first request is still running, the key answers
409 request_in_progress. - A 5xx answer is not kept, so you can try again with the same key.
Changes follow the workspace
A change through the API runs the same checks as the same change in the workspace. It is logged in your company's activity log as made by the API token, and it notifies people the same way. A PATCH changes only the fields you send.