ProdgatorDocs
API reference

Public REST API (v1)

Read pipeline runs, deployments, security alerts and compliance results with an organization API key, and approve deployments from automation.

Pas encore traduite. Cette page est affichée en anglais. Lire l’original en anglais.

The v1 API gives scripts, dashboards and CI jobs read access to your organization's data, plus deployment approval. It uses organization API keys, not user sessions.

The machine-readable spec is at (OpenAPI 3.1). Import it into Postman, Insomnia or a code generator.

The endpoint reference lists every route with its parameters, request and response schemas, required scope, and curl, JavaScript and Python samples. It is read-only: nothing on these pages sends a request. To try read operations from the app, use the API explorer.

  • Runs: list and read pipeline runs.
  • Deployments: list, read, approve and reject deployments.
  • Security: alerts, findings, issues and report uploads.
  • Compliance: policy results.
  • Provenance: signing keys and signed statements.
  • Any CI: record runs, reports, attestations and artifacts from any CI system, and open release gates.

Authentication

Create a key in Organization > API keys (Org admin role required). The full key is shown once, at creation. Send it as a bearer token:

Authorization: Bearer plk_live_xxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Production keys start with ; development keys start with . A key issued for one environment is rejected by the other. Every key carries a fixed set of scopes, granted when it was created:

ScopeGrants
,
,
, , ,
, , ,
,
With , approving or rejecting a deployment that a Block compliance policy holds. Grants no route on its own.
, ,
, , the report, attestation and artifact routes under , and . Must be the key's only scope.

Revoking a key in Organization > API keys takes effect within about 60 seconds.

Availability

The API requires a plan with API access, except the CI operations below, which every plan can use. A key created under a plan without it, or a plan that later drops it, gets on every request. Requests the gateway itself rejects, before a key is ever checked against a plan, get the gateway's own body instead of the envelope:

  • No header:
  • Malformed, revoked, expired, wrong-environment, or wrong-scope key:

Every other error responds with the envelope described below.

Pagination and time windows

List endpoints take (default 50, max 100), , and . Responses carry ( on the last page) and a block:

{
  "data": [ /* … */ ],
  "next_cursor": "eyJwayI6Ik9SRyMxMjMi...",
  "meta": {
    "since": "2026-08-01T00:00:00Z",
    "until": "2026-09-27T00:00:00Z",
    "retention_clamped": false
  }
}

Reuse the same and when following . If predates your plan's data retention window, the server moves it forward and sets to rather than erroring.

Errors

Every non-gateway error uses the same envelope:

{
  "error": {
    "code": "not_found",
    "message": "No run with that id.",
    "details": {}
  }
}
HTTP statusMeaning
400A query parameter failed validation.
400 is malformed, expired, or does not match /.
401No key, or a key the gateway could not accept.
402The organization's plan does not include API access.
403The key lacks the required scope, or the gateway rejected the key.
403The key is valid but missing the scope the route needs, or the scope an override of a compliance block needs. names the missing scope.
404No such item in your organization within your plan's data retention.
409The request conflicts with the resource's current state.
400An API key answered Prodgator's protection rule without a of 10-500 characters.
409The deployment waits for GitHub required reviewers. API keys cannot act as a GitHub user.
429Too many requests for the organization or the key; wait seconds.
500The request failed on the server.
503A write or attestation request could not be checked against the rate limit, or signing is unavailable. Wait seconds, then retry.

Rate limits

Every route counts requests per minute for your organization and for each API key, in fixed one-minute windows. A request over either limit gets with the code and a header with the seconds until the next window. One key cannot use the whole organization's allowance, and each organization is counted apart from every other. A per-route limit at the API gateway, shared by all callers, also applies; its is a plain message without the envelope or .

Route groupBusiness: organization / keyEnterprise: organization / key
Reads (runs, deployments, security findings and the rest)600 / 3001800 / 600
Signed attestations ()60 / 30180 / 60
Writes (approve and reject, creating and completing security uploads)120 / 60600 / 200

All numbers are requests per minute. Back off on , or spread requests over the minute. Cache the attestation keys from : they change rarely.

Approving deployments

and take a JSON body with a and an optional . An API key with can answer only Prodgator's own protection rule, and must give a of 10-500 characters (the same rule as an admin override in the app); without one the request fails with . Prodgator audits the answer as the key, records it on the deployment with principal , and posts a comment on the provider such as "Approved via Prodgator API key CI deploy (reason: Hotfix for the checkout outage)".

When a Block compliance policy covers the deployment's environment, the answer overrides a compliance decision, so the key also needs the scope. The same applies when Prodgator cannot read the compliance policies at that moment. Without the scope the request fails before anything is sent to the provider:

{
  "error": {
    "code": "insufficient_scope",
    "message": "A blocking compliance policy governs this environment, or its policies could not be read. Overriding it needs an API key with the write:compliance-override scope.",
    "details": { "requiredScope": "write:compliance-override" }
  }
}

A deployment gated by GitHub's own required reviewers can only be approved by a reviewer's own GitHub account, in the app or on GitHub. API keys cannot act as a GitHub user, and Prodgator never falls back to the organization's token, so a key gets . When a deployment has both gates, the key answers Prodgator's rule first; the response's stays until a reviewer answers the GitHub gate, and a further key request returns .

curl -s -X POST \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"reason": "Hotfix for the checkout outage"}' \
  https://api.prodgator.io/v1/deployments/$DEPLOYMENT_ID/approve

CI operations

The operations let a pipeline in any CI system record a run, send its reports and open a release gate. The command line calls them for you. They do not use the other routes' gateway authorizer: Prodgator checks the credential itself, which is one of:

  • An API key with the scope (see CI keys), sent as . It works on every plan and does not need API access. If the key has a repository allowlist, a run for another repository is refused with .
  • An OIDC token from an issuer your organization trusts (see Integrations), sent as . A request that disagrees with a mapped claim is refused with .

takes neither. It takes the poll token that returns (, valid for 12 hours), sent as a bearer token. That token reads one gate and nothing else, so a build log that leaks it cannot record runs.

Everything these routes store is self-reported (): policies ignore it unless a rule opts in, and it never counts as provider provenance. A gate answer is one of , , , or ; deploy only on and treat anything else as a refusal. Runs count toward your plan's run and pipeline limits. Requests are limited per credential (120 a minute) and per organization, and polling a gate to 12 a minute; a carries .

Further error codes: , , , , , , , , and (503, safe to retry).

Security findings

returns scan results paged with . Requires scope.

returns unique findings with (scan results in the finding) and (number of sources). Requires scope and Business plan or higher.

Uploading reports: see Upload a report for the , and routes. Requires scope.

Signed attestations

lists the public keys that verify Prodgator's signed attestations. It needs the scope and a plan with API access. The three statement routes return a signed in-toto statement in a DSSE envelope, as :

  • : the change record.
  • : the promotion path.
  • : a SLSA verification summary of the deployment.

They need and the Enterprise plan. A statement that cannot be signed in the record's current state answers with the cause in . If signing or storage is unavailable the answer is and nothing unsigned is returned. Attestations lists the causes and shows how to verify a statement offline.

Example

curl -s \
  -H "Authorization: Bearer $API_KEY" \
  "https://api.prodgator.io/v1/runs?status=failure&limit=25"

Sur cette page