Menu

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 is multipart/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.

  • pageSize sets how many come back: 1 to 100, and 10 when you leave it out.
  • A list answers { "results": { "data": [...], "pageInfo": { "endCursor": "...", "hasNextPage": true } } }.
  • Send endCursor back as pageCursor to get the next page. When hasNextPage is 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." } } }
StatuscodeWhat it means
400invalid_requestThe request is malformed: an unknown field, a wrong type, a bad cursor.
401unauthenticatedNo token, or one that doesn't exist.
403insufficient_scope, address_not_allowed, token_not_working, plan_lapsed, not_in_planThe token can't do this, from this address, or now. message says why.
404not_foundNo such record in your company. A record of another company answers the same way.
409idempotency_key_reused, request_in_progressSee Retrying safely.
413too_largeThe body is over its limit.
422validation_failedThe workspace's own checks refused the change. fields names each field, with the words the workspace would show.
429rate_limitedToo many requests. Wait for Retry-After seconds.

Rate limits

LimitPer minute
Requests per token120
Changes per token30
File uploads per token10
Requests per company, all tokens together600
/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.