Skip to main content

Getting Started

The GitKraken API lets you programmatically access your organization's GitKraken data. This portal documents the public subset of the API, available to external developers using an API key.

  • Base URL: https://staging-api.gitkraken.dev
  • Format: JSON over HTTPS
  • Auth: a bearer API key (see Authentication)

Prerequisites

Using the public API requires the public-api.access entitlement on your organization. If your API calls return 403, confirm your organization's plan includes public API access.

1. Create an API key

Create a key from your GitKraken account:

  1. Open your Profile → Security settings.
  2. Under API keys, click Create API key.
  3. Enter a Name (e.g. CI pipeline), choose the Organization the key acts on behalf of, and an Expiration (default 30 days).
  4. Copy the generated key (gk_tkn_…) — it's shown once. Keep it secret, like a password.

See Authentication for how keys work, expiration, and revocation.

2. Make your first call

Pass the key as a bearer token. This fetches a DORA deployment-frequency summary:

curl https://staging-api.gitkraken.dev/v1/insights/dora/deploy_frequency/summary \
-H "Authorization: Bearer gk_tkn_xxxxxxxxxxxxxxxx"

Response envelope

All responses are wrapped in a standard envelope. Payloads live under data; list endpoints include pagination metadata alongside it:

{
"data": { "...": "..." }
}

Pagination

List/search endpoints accept page and pageSize query parameters and return page, pageSize, totalCount, and totalPages so you can iterate:

curl "https://staging-api.gitkraken.dev/v1/insights/repositories?page=1&pageSize=50" \
-H "Authorization: Bearer gk_tkn_xxxxxxxxxxxxxxxx"

Rate limiting

Requests are rate limited at the gateway. If you exceed the limit you'll receive 429 Too Many Requests — back off and retry. Design clients to handle 429 gracefully rather than hammering the endpoint.

Next steps