GitApprove

DevelopersPricingTerms of ServicePrivacy policy
GitApprove
HomeSign in

Developers

API reference

The GitApprove REST API gives you pull requests, tagged code chunks, review comments, reviewer guidance, syncs and billing status. Everything below is generated from the OpenAPI spec. To use the command-line tool, MCP server or SDKs, see the developer guide.

  • Authentication
  • Conventions and errors

PRs

  • getList PRs for the key's org
  • getPR detail with per-file change stats
  • getReviewer guidance for a PR
  • getEvidence run status for a PR (evidence beta)
  • getEvidence captures for a file range (evidence beta)

Chunks

  • getTagged code chunks per file

Comments

  • getList enriched comments on a PR
  • postPost a comment on a PR

Sync

  • postTrigger a full PR sync for the key's org

Billing

  • getSubscription state for the key's org

Audit

  • getThe key's org audit trail, newest first (High, BYOK and Passthrough plans)

Evidence variables

  • getList the org's evidence variables
  • postCreate an evidence variable
  • patchChange an evidence variable's name, scope, expiry or policy
  • deleteDelete an evidence variable and its history
  • postSet a new value for an evidence variable
  • getEvery value an evidence variable has had (never the values)
  • postSet new values for several evidence variables at once

Private registries

  • getList the org's private registries
  • postAdd a private registry
  • patchChange a private registry's path prefix, ecosystem, scopes or description
  • deleteDelete a private registry and its credential
  • postSet a new credential for a private registry

Private dependencies

  • getRead the org's private dependency repositories
  • putSet the org's private dependency repositories

Test network

  • getRead the org's sandbox test network
  • putSet the org's sandbox test network

Evidence from GitHub Actions

  • postAsk which tests the GitApprove/evidence action should run
  • postReport the runs GitApprove's authoring agent asked for
  • postUpload what the planned tests produced
  • Models

Authentication

All endpoints live under https://gitapprove.com/api/v1 and return JSON. Send an organization API key as a bearer token. Organization owners and admins create and revoke keys on the Team page; a key is shown once, when it is created.

Authorization: Bearer gtap_...

Keys carry scopes: read for the GET endpoints, comments:write to post comments and sync:write to trigger a sync. The developer guide covers key creation, the CLI, the MCP server and the SDKs. The machine-readable spec is at /openapi.json.

Conventions and errors

All timestamps are INTEGER epoch milliseconds. 404 on any PR endpoint means the PR does not exist or does not belong to the key's org.

Plans: every endpoint works on every plan (Standard, High, BYOK, Passthrough) and during the trial, except: - POST /api/v1/sync and POST /api/v1/prs/{id}/comments need an active subscription or trial (they answer 402 without one). - GET /api/v1/audit requires the High, BYOK or Passthrough plan (and the audit:read scope); on Standard it answers 403. - The evidence endpoints answer { "enabled": false } (or 404 for captures) unless the organization has joined the evidence beta. Operations limited to some plans list them in x-gitapprove-plans.

List endpoints return a nextCursor. Pass it back as cursor to read the next page, keeping the other filters unchanged. Errors use a standard HTTP status and a JSON body with an error message:

{
  "error": "Invalid or revoked API key."
}
  • 400The request is malformed, for example an invalid pagination cursor or tag.
  • 401The API key is missing, invalid or revoked.
  • 403The key lacks the required scope, or the GitHub token belongs to someone else.
  • 404The pull request does not exist or belongs to another organization.

Endpoints

get/api/v1/prsList PRs for the key's org
get/api/v1/prs/{id}PR detail with per-file change stats
get/api/v1/prs/{id}/guidanceReviewer guidance for a PR
get/api/v1/prs/{id}/evidenceEvidence run status for a PR (evidence beta)
get/api/v1/prs/{id}/evidence/capturesEvidence captures for a file range (evidence beta)
get/api/v1/prs/{id}/chunksTagged code chunks per file
get/api/v1/prs/{id}/commentsList enriched comments on a PR
post/api/v1/prs/{id}/commentsPost a comment on a PR
post/api/v1/syncTrigger a full PR sync for the key's org
get/api/v1/billing/statusSubscription state for the key's org
get/api/v1/auditThe key's org audit trail, newest first (High, BYOK and Passthrough plans)
get/api/v1/evidence/env-varsList the org's evidence variables
post/api/v1/evidence/env-varsCreate an evidence variable
patch/api/v1/evidence/env-vars/{varId}Change an evidence variable's name, scope, expiry or policy
delete/api/v1/evidence/env-vars/{varId}Delete an evidence variable and its history
post/api/v1/evidence/env-vars/{varId}/rotateSet a new value for an evidence variable
get/api/v1/evidence/env-vars/{varId}/historyEvery value an evidence variable has had (never the values)
post/api/v1/evidence/env-vars/bulk-rotateSet new values for several evidence variables at once
get/api/v1/evidence/registriesList the org's private registries
post/api/v1/evidence/registriesAdd a private registry
patch/api/v1/evidence/registries/{registryId}Change a private registry's path prefix, ecosystem, scopes or description
delete/api/v1/evidence/registries/{registryId}Delete a private registry and its credential
post/api/v1/evidence/registries/{registryId}/rotateSet a new credential for a private registry
get/api/v1/evidence/private-dependenciesRead the org's private dependency repositories
put/api/v1/evidence/private-dependenciesSet the org's private dependency repositories
get/api/v1/evidence/test-networkRead the org's sandbox test network
put/api/v1/evidence/test-networkSet the org's sandbox test network
post/api/v1/evidence/action/planAsk which tests the GitApprove/evidence action should run
post/api/v1/evidence/action/authorReport the runs GitApprove's authoring agent asked for
post/api/v1/evidence/action/resultsUpload what the planned tests produced

PRs

Pull request listings and details

List PRs for the key's org

get/api/v1/prs

Parameters

NameInTypeDescription
limitqueryintegermin 1 · max 100 · default 50
cursorquerystringOpaque nextCursor from the preceding page. Keep filters unchanged.
numberqueryintegermin 1

Example request

curl "https://gitapprove.com/api/v1/prs?limit=50" \
  -H "Authorization: Bearer $GITAPPROVE_API_KEY"

Responses

200PRs ordered by creation time and ID, newest first

PRPage

NameTypeDescription
itemsrequiredarray of PRSummary
nextCursorrequiredstring | null
{
  "items": [
    {
      "id": "pr_8f3a2c",
      "number": 142,
      "title": "Add rate limiting to the login endpoint",
      "state": "open",
      "repoFullName": "acme/api",
      "authorName": "Maya Chen",
      "additions": 86,
      "deletions": 12,
      "changedFiles": 4,
      "ciStatus": "passing",
      "headBranch": "feat/login-rate-limit",
      "updatedAt": 1761700000000
    }
  ],
  "nextCursor": "eyJ0IjoxNzYxNjk5OTAwMDAwfQ"
}

400Invalid pagination parameter

401Missing, invalid, or revoked API key

Error

NameTypeDescription
errorrequiredstring
{
  "error": "Invalid or revoked API key."
}

PR detail with per-file change stats

get/api/v1/prs/{id}

Parameters

NameInTypeDescription
idrequiredpathstringGitApprove PR id (opaque string)

Example request

curl "https://gitapprove.com/api/v1/prs/PR_ID" \
  -H "Authorization: Bearer $GITAPPROVE_API_KEY"

Responses

200PR detail

PRDetail

NameTypeDescription
idrequiredstring
numberrequiredinteger
titlerequiredstring
staterequiredstringopenmergedclosed
repoFullNamestring | null
authorNamestring
additionsinteger
deletionsinteger
changedFilesinteger
ciStatusstringpassingfailingpending
headBranchstring
updatedAtrequiredintegerEpoch milliseconds
descriptionstring | null
authorAvatarstring | null
baseBranchstring
headShastring
createdAtintegerEpoch milliseconds
filesarray of PRFileSummary
{
  "id": "pr_8f3a2c",
  "number": 142,
  "title": "Add rate limiting to the login endpoint",
  "state": "open",
  "repoFullName": "acme/api",
  "authorName": "Maya Chen",
  "additions": 86,
  "deletions": 12,
  "changedFiles": 4,
  "ciStatus": "passing",
  "headBranch": "feat/login-rate-limit",
  "updatedAt": 1761700000000,
  "description": "Limits failed sign-ins per IP address.",
  "authorAvatar": "https://avatars.githubusercontent.com/u/1?v=4",
  "baseBranch": "main",
  "headSha": "9fceb02d0ae598e95dc970b74767f19372d61af8",
  "createdAt": 1761700000000,
  "files": [
    {
      "filename": "src/auth/login.ts",
      "status": "added",
      "additions": 86,
      "deletions": 12,
      "reviewValue": "high"
    }
  ]
}

401Missing, invalid, or revoked API key

Error

NameTypeDescription
errorrequiredstring
{
  "error": "Invalid or revoked API key."
}

404PR not found (or not in the key's org)

Error

NameTypeDescription
errorrequiredstring
{
  "error": "Invalid or revoked API key."
}

Reviewer guidance for a PR

get/api/v1/prs/{id}/guidance

A concrete approve / comment / request-changes / skip recommendation with grounded rationale bullets, derived from diff scoring, CI checks, and diff stats.

Parameters

NameInTypeDescription
idrequiredpathstringGitApprove PR id (opaque string)

Example request

curl "https://gitapprove.com/api/v1/prs/PR_ID/guidance" \
  -H "Authorization: Bearer $GITAPPROVE_API_KEY"

Responses

200Guidance

Guidance

NameTypeDescription
recommendationrequiredstringapprovecommentrequest-changesskip
headlinerequiredstring
bulletsrequiredarray of string
{
  "recommendation": "approve",
  "headline": "Request changes: the new limiter is untested",
  "bullets": [
    "string"
  ]
}

401Missing, invalid, or revoked API key

Error

NameTypeDescription
errorrequiredstring
{
  "error": "Invalid or revoked API key."
}

404PR not found (or not in the key's org)

Error

NameTypeDescription
errorrequiredstring
{
  "error": "Invalid or revoked API key."
}

Evidence run status for a PR (evidence beta)

get/api/v1/prs/{id}/evidence

Whether evidence is enabled for the organization and the state of the newest run for this PR: what the repository's own tests did on the base and head revisions. { "enabled": false } when evidence is off. A run for an older commit has stale: true; its captures are never shown as current. previewLinks are the team's own preview deployments from the evidence configuration at the PR's base.

Parameters

NameInTypeDescription
idrequiredpathstringGitApprove PR id (opaque string)

Example request

curl "https://gitapprove.com/api/v1/prs/PR_ID/evidence" \
  -H "Authorization: Bearer $GITAPPROVE_API_KEY"

Responses

200Evidence status

EvidenceStatus

NameTypeDescription
enabledrequiredboolean
evidenceSourcestringWhere the organization's new evidence comes from.sandboxgithub-actionsboth
headShastring
previewLinksarray of object
runobject | null
{
  "enabled": true,
  "evidenceSource": "sandbox",
  "headSha": "9fceb02d0ae598e95dc970b74767f19372d61af8",
  "previewLinks": [
    {
      "site": "string",
      "url": "string"
    }
  ],
  "run": {
    "id": "pr_8f3a2c",
    "status": "waiting",
    "reason": "string",
    "source": "sandbox",
    "headSha": "9fceb02d0ae598e95dc970b74767f19372d61af8",
    "stale": true,
    "createdAt": 1761700000000,
    "startedAt": 1761700000000,
    "finishedAt": 1761700000000
  }
}

401Missing, invalid, or revoked API key

Error

NameTypeDescription
errorrequiredstring
{
  "error": "Invalid or revoked API key."
}

404PR not found (or not in the key's org)

Error

NameTypeDescription
errorrequiredstring
{
  "error": "Invalid or revoked API key."
}

Evidence captures for a file range (evidence beta)

get/api/v1/prs/{id}/evidence/captures

Captures (screenshots for frontend code, request/response pairs for backend code) for the changed code in a file range, for the PR's current head only, and only when the latest run is ready or partial. Backend captures are returned as summaries (breaking flag and changed field paths), never as bodies. Media bytes are not served by this API.

Parameters

NameInTypeDescription
idrequiredpathstringGitApprove PR id (opaque string)
filerequiredquerystringRepository-relative path of a file in the PR
startrequiredqueryintegerFirst line of the range (new side)min 1
endrequiredqueryintegerLast line of the range, not before `start`min 1

Example request

curl "https://gitapprove.com/api/v1/prs/PR_ID/evidence/captures?file=string&start=1&end=1" \
  -H "Authorization: Bearer $GITAPPROVE_API_KEY"

Responses

200Captures overlapping the range

EvidenceCaptures

NameTypeDescription
itemsarray of objectWhat GitApprove's authoring agent was asked to show for the changed chunks in the range, each with the captures (by id, from `captures`) that show it and the test behind them, or the reason it is not shown.
runStatusrequiredstring | null
partialrequiredboolean
sourcestring | nullWhere the tests behind these captures ran (`sandbox` or `github-actions`); null when there are none.
capturesrequiredarray of object
{
  "items": [
    {
      "id": "pr_8f3a2c",
      "file": "string",
      "startLine": 30,
      "endLine": 58,
      "kind": "ui",
      "description": "Limits failed sign-ins per IP address.",
      "route": "string",
      "method": "string",
      "status": "satisfied",
      "reason": "string",
      "note": "string",
      "captureIds": [
        "string"
      ],
      "test": {}
    }
  ],
  "runStatus": "string",
  "partial": true,
  "source": "string",
  "captures": [
    {
      "id": "pr_8f3a2c",
      "file": "string",
      "startLine": 30,
      "endLine": 58,
      "symbol": "verifyLogin",
      "site": "string",
      "state": "string",
      "kind": "screenshot",
      "pairing": "paired",
      "differs": true,
      "breaking": true,
      "testChanged": true,
      "mappingSignal": "string",
      "hasBaseMedia": true,
      "hasHeadMedia": true,
      "diffSummary": {},
      "test": {
        "kind": "repo",
        "path": "string",
        "id": "pr_8f3a2c",
        "basedOn": "string",
        "source": "string",
        "baseOutcome": "string"
      },
      "performance": {
        "v": 1,
        "kind": "backend",
        "headOnly": true,
        "note": "string",
        "lines": [
          {
            "metric": null,
            "unit": null,
            "base": null,
            "head": null,
            "delta": null,
            "deltaPct": null,
            "highlight": null,
            "labels": null,
            "source": null
          }
        ]
      }
    }
  ]
}

400Missing or invalid file, start or end

401Missing, invalid, or revoked API key

Error

NameTypeDescription
errorrequiredstring
{
  "error": "Invalid or revoked API key."
}

404PR not found (or not in the key's org)

Error

NameTypeDescription
errorrequiredstring
{
  "error": "Invalid or revoked API key."
}

Chunks

Tagged code chunks per file

Tagged code chunks per file

get/api/v1/prs/{id}/chunks

Logical code chunks (hunks attributed to their enclosing symbol) for every file in the PR, each carrying one or more tags from the fixed taxonomy, plus optional subtags that say why. tag and subtag may repeat; a chunk is returned when it matches ANY given tag or subtag (OR semantics — same as the web UI filter). With neither param it returns every chunk.

Parameters

NameInTypeDescription
idrequiredpathstringGitApprove PR id (opaque string)
tagqueryarray of stringChunk tag to filter by (repeatable, OR semantics)security sensitiveperformance sensitivereliabilitycore logictestsdata accessapi surfaceconfigdocsboilerplateuimigrations
subtagqueryarray of ChunkSubtagChunk subtag to filter by (repeatable). A chunk is returned when it matches ANY given `tag` or ANY given `subtag`. authsecretscryptountrusted inputegressprivacytenant isolationtransport securityfile handlingabuse protectionaudit trailhot pathquery volumeunbounded workmetered costmemorycachingpayload sizeblockingindexingrenderingconcurrencyerror handlingretriestimeoutspartial failurefallbackscleanupobservabilitymoneystate machineai prompttimeparsingvalidationalgorithmbusiness ruledestructive writetransactionraw querypublic contractbreaking changeerror contractinfradependenciesfeature flagenvironmentaccess scopesirreversiblebackfilllockingdeploy orderingweakened testflaky riskaccessibilitycopyclient state

Example request

curl "https://gitapprove.com/api/v1/prs/PR_ID/chunks?tag=security%20sensitive" \
  -H "Authorization: Bearer $GITAPPROVE_API_KEY"

Responses

200Chunks grouped by file

array of FileChunks

NameTypeDescription
filenamerequiredstring
chunksrequiredarray of CodeChunk
[
  {
    "filename": "src/auth/login.ts",
    "chunks": [
      {
        "id": "fil_6c2e91:0",
        "symbol": "verifyLogin",
        "tags": [
          "security sensitive"
        ],
        "subtags": [
          "auth"
        ],
        "reviewScore": 78,
        "startLine": 30,
        "endLine": 58
      }
    ]
  }
]

400Invalid request

Error

NameTypeDescription
errorrequiredstring
{
  "error": "Invalid or revoked API key."
}

401Missing, invalid, or revoked API key

Error

NameTypeDescription
errorrequiredstring
{
  "error": "Invalid or revoked API key."
}

404PR not found (or not in the key's org)

Error

NameTypeDescription
errorrequiredstring
{
  "error": "Invalid or revoked API key."
}

Comments

Line-level review comments

List enriched comments on a PR

get/api/v1/prs/{id}/comments

Parameters

NameInTypeDescription
idrequiredpathstringGitApprove PR id (opaque string)

Example request

curl "https://gitapprove.com/api/v1/prs/PR_ID/comments" \
  -H "Authorization: Bearer $GITAPPROVE_API_KEY"

Responses

200Comments, oldest first

array of Comment

NameTypeDescription
idrequiredstring
filenamerequiredstring
linerequiredinteger | null
sidestring | nullDiff side the comment is anchored to; null for legacy commentsnewoldnull
startLineinteger | nullFirst line of a multi-line comment; null for a single line
startSidestring | nullnewoldnull
bodyrequiredstring
convictionstring | nullHow sure the reviewer is; null when unsetlowmediumhighnull
importancestring | nullHow much the comment matters; null when unsetnitminormajorblockernull
createdAtrequiredintegerEpoch milliseconds
authorNamerequiredstringDisplay name of the commenting user (the API key creator for API-key-created comments)
githubCommentIdstring | nullGitHub-side comment id (string) when synced; null otherwise
[
  {
    "id": "cmt_3b71d4",
    "filename": "src/auth/login.ts",
    "line": 42,
    "side": "new",
    "startLine": 30,
    "startSide": "new",
    "body": "Rate limit key should include the tenant id.",
    "conviction": "low",
    "importance": "nit",
    "createdAt": 1761700000000,
    "authorName": "Maya Chen",
    "githubCommentId": "2012345678"
  }
]

401Missing, invalid, or revoked API key

Error

NameTypeDescription
errorrequiredstring
{
  "error": "Invalid or revoked API key."
}

404PR not found (or not in the key's org)

Error

NameTypeDescription
errorrequiredstring
{
  "error": "Invalid or revoked API key."
}

Post a comment on a PR

post/api/v1/prs/{id}/comments

Requires a creator-bound API key with comments:write scope and a GitHub user token for that same human in X-GitHub-Token. GitHub publishes the comment as its author. GitApprove stores the resulting GitHub comment ID. Conviction and importance appear in a compact footer when set.

Parameters

NameInTypeDescription
idrequiredpathstringGitApprove PR id (opaque string)
X-GitHub-TokenrequiredheaderstringGitHub user access token belonging to the API key creator. Demo mode does not require this token.

Request body (required) · application/json

NewComment

NameTypeDescription
filenamerequiredstring
lineinteger | nullLine number; null = file-level comment
sidestring | nullDiff side the comment anchors to ("new" = added/context line, "old" = deleted line). Defaults to "new" for line comments.newoldnull
startLineinteger | nullFirst line of a multi-line comment (GitHub's start_line); `line` is the last. Must come before `line` on the same side, or be on the "old" side when `line` is on the "new" side.
startSidestring | nullDiff side of `startLine`; defaults to `side`.newoldnull
bodyrequiredstringmax length 60000
convictionstring | nullOptional reviewer signal — how sure the reviewer islowmediumhighnull
importancestring | nullOptional reviewer signal — how much the comment matters. When set, synced to GitHub as a compact footer on the comment.nitminormajorblockernull
{
  "filename": "src/auth/login.ts",
  "line": 42,
  "side": "new",
  "startLine": 30,
  "startSide": "new",
  "body": "Rate limit key should include the tenant id.",
  "conviction": "low",
  "importance": "nit"
}

Example request

curl -X POST "https://gitapprove.com/api/v1/prs/PR_ID/comments" \
  -H "Authorization: Bearer $GITAPPROVE_API_KEY" \
  -H "X-GitHub-Token: $GITAPPROVE_GITHUB_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"filename":"src/auth/login.ts","line":42,"body":"Rate limit key should include the tenant id."}'

Responses

201Created comment

Comment

NameTypeDescription
idrequiredstring
filenamerequiredstring
linerequiredinteger | null
sidestring | nullDiff side the comment is anchored to; null for legacy commentsnewoldnull
startLineinteger | nullFirst line of a multi-line comment; null for a single line
startSidestring | nullnewoldnull
bodyrequiredstring
convictionstring | nullHow sure the reviewer is; null when unsetlowmediumhighnull
importancestring | nullHow much the comment matters; null when unsetnitminormajorblockernull
createdAtrequiredintegerEpoch milliseconds
authorNamerequiredstringDisplay name of the commenting user (the API key creator for API-key-created comments)
githubCommentIdstring | nullGitHub-side comment id (string) when synced; null otherwise
{
  "id": "cmt_3b71d4",
  "filename": "src/auth/login.ts",
  "line": 42,
  "side": "new",
  "startLine": 30,
  "startSide": "new",
  "body": "Rate limit key should include the tenant id.",
  "conviction": "low",
  "importance": "nit",
  "createdAt": 1761700000000,
  "authorName": "Maya Chen",
  "githubCommentId": "2012345678"
}

400Invalid request

Error

NameTypeDescription
errorrequiredstring
{
  "error": "Invalid or revoked API key."
}

401Missing, invalid, or revoked API key

Error

NameTypeDescription
errorrequiredstring
{
  "error": "Invalid or revoked API key."
}

402The organization has no active subscription or unused trial

403Missing write scope or mismatched human identity

404PR not found (or not in the key's org)

Error

NameTypeDescription
errorrequiredstring
{
  "error": "Invalid or revoked API key."
}

429Rate limit exceeded for this API key

Sync

GitHub sync triggers

Trigger a full PR sync for the key's org

post/api/v1/sync

Pulls the latest open PRs, file diffs, and CI checks from GitHub into GitApprove. Idempotent — re-running converges to the same rows.

Example request

curl -X POST "https://gitapprove.com/api/v1/sync" \
  -H "Authorization: Bearer $GITAPPROVE_API_KEY"

Responses

200Sync result

SyncResult

NameTypeDescription
okrequiredboolean
orgIdrequiredstring
reposrequiredinteger
prsrequiredinteger
lastSyncedAtrequiredintegerEpoch milliseconds
{
  "ok": true,
  "orgId": "org_41d9e0",
  "repos": 3,
  "prs": 27,
  "lastSyncedAt": 1761700000000
}

401Missing, invalid, or revoked API key

Error

NameTypeDescription
errorrequiredstring
{
  "error": "Invalid or revoked API key."
}

402The organization has no active subscription or unused trial

403The API key lacks the sync:write scope

429Rate limit exceeded for this API key

Billing

Subscription state

Subscription state for the key's org

get/api/v1/billing/status

Example request

curl "https://gitapprove.com/api/v1/billing/status" \
  -H "Authorization: Bearer $GITAPPROVE_API_KEY"

Responses

200Billing status

BillingStatus

NameTypeDescription
staterequiredstringSubscription statetrialtrialingactivepast_dueexpiredcanceled
seatsrequiredinteger
trialEndsAtrequiredinteger | nullEpoch milliseconds; null when not trialing
allowedrequiredbooleanTrue when the org may use paid features
{
  "state": "trial",
  "seats": 8,
  "trialEndsAt": 1761700000000,
  "allowed": true
}

401Missing, invalid, or revoked API key

Error

NameTypeDescription
errorrequiredstring
{
  "error": "Invalid or revoked API key."
}

Audit

The organization audit trail (audit:read scope)

The key's org audit trail, newest first (High, BYOK and Passthrough plans)

get/api/v1/audit

Requires the audit:read scope; a key with only read cannot read the audit trail. The key's creator must still be an org owner or admin, and the org must be on a plan that includes the audit log (not Standard). Events are kept 30 days (review actions) or 1 year (everything else). Unknown filter values return an empty page. api_version versions the event shape: new actions and categories are additive.

Parameters

NameInTypeDescription
limitqueryintegermin 1 · max 100 · default 50
cursorquerystringOpaque nextCursor from the preceding page. Keep filters unchanged.
actorquerystringA user id, or an API key or system actor id
actionquerystringEvent type, for example `credential.ai_key.set`
categoryquerystringreviewmembershipcredentialsorg_settingsbillingdatasystem
target_typequerystring
target_idquerystring
fromqueryintegerEarliest event time, epoch milliseconds
toqueryintegerLatest event time, epoch milliseconds

Example request

curl "https://gitapprove.com/api/v1/audit?limit=50" \
  -H "Authorization: Bearer $GITAPPROVE_API_KEY"

Responses

200Audit events, newest first

AuditPage

NameTypeDescription
api_versionrequiredinteger
itemsrequiredarray of AuditEvent
nextCursorrequiredstring | null
{
  "api_version": 1,
  "items": [
    {
      "id": "pr_8f3a2c",
      "org_id": "string",
      "occurred_at": 1,
      "actor": {
        "type": "user",
        "id": "pr_8f3a2c",
        "display": "string"
      },
      "action": "string",
      "category": "review",
      "target": {
        "type": "string",
        "id": "pr_8f3a2c"
      },
      "detail": null,
      "source_ip": "string"
    }
  ],
  "nextCursor": "eyJ0IjoxNzYxNjk5OTAwMDAwfQ"
}

401Missing, invalid, or revoked API key

Error

NameTypeDescription
errorrequiredstring
{
  "error": "Invalid or revoked API key."
}

403The key lacks the audit:read scope, or the plan does not include the audit log

429Rate limit exceeded for this API key

Evidence variables

Environment variables for evidence test runs, and their rotation (evidence:read to list and read history, evidence:write to change)

List the org's evidence variables

get/api/v1/evidence/env-vars

Environment variables the evidence runner gives the test phase of an evidence run (never the dependency install). Requires the evidence:read or evidence:write scope; the key's creator must still be an org owner or admin. A secret's value is never returned: value is null and the fingerprint and version show when it changed.

Example request

curl "https://gitapprove.com/api/v1/evidence/env-vars" \
  -H "Authorization: Bearer $GITAPPROVE_API_KEY"

Responses

200The variables, by name

EvidenceEnvVarList

NameTypeDescription
variablesrequiredarray of EvidenceEnvVar
{
  "variables": [
    {
      "id": "pr_8f3a2c",
      "name": "STAGING_API_TOKEN",
      "secret": true,
      "value": "string",
      "valueReadable": true,
      "repositories": [
        "string"
      ],
      "description": "Limits failed sign-ins per IP address.",
      "version": 1,
      "fingerprint": "string",
      "valueSetAt": 1761700000000,
      "expiresAt": 1761700000000,
      "rotateAfterDays": 1,
      "rotationStatus": "ok",
      "createdBy": "string",
      "createdAt": 1761700000000,
      "updatedBy": "string",
      "updatedAt": 1761700000000
    }
  ]
}

401Missing, invalid, or revoked API key

Error

NameTypeDescription
errorrequiredstring
{
  "error": "Invalid or revoked API key."
}

403The key has neither the evidence:read nor the evidence:write scope

429Rate limit exceeded for this API key

Create an evidence variable

post/api/v1/evidence/env-vars

Names are upper case, digits and underscores (^[A-Z_][A-Z0-9_]*$) and may not be one the runner sets or one that makes a runtime load code (PATH, HOME, NODE_OPTIONS, LD_PRELOAD, JAVA_TOOL_OPTIONS, EVIDENCE_*, …). secret defaults to true. There is no minimum length and an empty value is allowed (never redacted); a secret shorter than 6 characters is redacted from results only where it stands as a whole token. Two variables may share a name only when their repositories do not overlap; one scoped to a repository wins over an organization-wide one. At most 100 variables per organization.

Request body (required) · application/json

NewEvidenceEnvVar

NameTypeDescription
namerequiredstringmax length 128
valuerequiredstringAt most 32 KiB; may be empty
secretbooleandefault true
repositoriesarray of string | nullRepository full names (owner/name) or ids; null or absent means all
descriptionstring | nullmax length 300
expiresAtinteger | null
rotateAfterDaysinteger | nullmin 1 · max 3650
{
  "name": "string",
  "value": "string",
  "secret": true,
  "repositories": [
    "string"
  ],
  "description": "Limits failed sign-ins per IP address.",
  "expiresAt": 1761700000000,
  "rotateAfterDays": 1
}

Example request

curl -X POST "https://gitapprove.com/api/v1/evidence/env-vars" \
  -H "Authorization: Bearer $GITAPPROVE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"string","value":"string"}'

Responses

201Created variable

EvidenceEnvVar

NameTypeDescription
idrequiredstring
namerequiredstring
secretrequiredbooleanWrite-only value, redacted from results, never given to pull requests from forks
valuerequiredstring | nullA plain variable's value; always null for a secret
valueReadablerequiredbooleanFalse when the stored value cannot be decrypted (the encryption key changed); rotate it
repositoriesrequiredarray of string | nullRepository full names; null means every repository in the organization
descriptionrequiredstring | null
versionrequiredintegerGoes up each time the value is set
fingerprintrequiredstringKeyed hash of the value (12 hex characters); shows a change, reveals nothing
valueSetAtrequiredintegerWhen the current value was set (epoch ms)
expiresAtrequiredinteger | nullWhen the value stops working (epoch ms)
rotateAfterDaysrequiredinteger | nullRotation policy
rotationStatusrequiredstringdue-soon is within 7 days of expiry or of the policy's date; an expired variable is not given to runsokdue-soonoverdueexpired
createdByrequiredstring | null
createdAtrequiredinteger
updatedByrequiredstring | null
updatedAtrequiredinteger
{
  "id": "pr_8f3a2c",
  "name": "STAGING_API_TOKEN",
  "secret": true,
  "value": "string",
  "valueReadable": true,
  "repositories": [
    "string"
  ],
  "description": "Limits failed sign-ins per IP address.",
  "version": 1,
  "fingerprint": "string",
  "valueSetAt": 1761700000000,
  "expiresAt": 1761700000000,
  "rotateAfterDays": 1,
  "rotationStatus": "ok",
  "createdBy": "string",
  "createdAt": 1761700000000,
  "updatedBy": "string",
  "updatedAt": 1761700000000
}

400Invalid request

Error

NameTypeDescription
errorrequiredstring
{
  "error": "Invalid or revoked API key."
}

401Missing, invalid, or revoked API key

Error

NameTypeDescription
errorrequiredstring
{
  "error": "Invalid or revoked API key."
}

403The key lacks the evidence:write scope

409A variable of this name already applies to one of these repositories, or the organization has 100 variables

429Rate limit exceeded

Change an evidence variable's name, scope, expiry or policy

patch/api/v1/evidence/env-vars/{varId}

Every field is optional. A plain variable can be made secret; a secret cannot be made plain (delete it and create a plain one). A plain variable's value may be changed here (a new version); a secret's value is changed only with the rotate operation.

Parameters

NameInTypeDescription
varIdrequiredpathstringEvidence variable id (opaque string)

Request body (required) · application/json

EvidenceEnvVarPatch

NameTypeDescription
namestringmax length 128
valuestringPlain variables only
secretbooleanOnly true is accepted for a variable that is already secret
repositoriesarray of string | null
descriptionstring | nullmax length 300
expiresAtinteger | null
rotateAfterDaysinteger | nullmin 1 · max 3650
{
  "name": "string",
  "value": "string",
  "secret": true,
  "repositories": [
    "string"
  ],
  "description": "Limits failed sign-ins per IP address.",
  "expiresAt": 1761700000000,
  "rotateAfterDays": 1
}

Example request

curl -X PATCH "https://gitapprove.com/api/v1/evidence/env-vars/VARID" \
  -H "Authorization: Bearer $GITAPPROVE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

Responses

200Updated variable

EvidenceEnvVar

NameTypeDescription
idrequiredstring
namerequiredstring
secretrequiredbooleanWrite-only value, redacted from results, never given to pull requests from forks
valuerequiredstring | nullA plain variable's value; always null for a secret
valueReadablerequiredbooleanFalse when the stored value cannot be decrypted (the encryption key changed); rotate it
repositoriesrequiredarray of string | nullRepository full names; null means every repository in the organization
descriptionrequiredstring | null
versionrequiredintegerGoes up each time the value is set
fingerprintrequiredstringKeyed hash of the value (12 hex characters); shows a change, reveals nothing
valueSetAtrequiredintegerWhen the current value was set (epoch ms)
expiresAtrequiredinteger | nullWhen the value stops working (epoch ms)
rotateAfterDaysrequiredinteger | nullRotation policy
rotationStatusrequiredstringdue-soon is within 7 days of expiry or of the policy's date; an expired variable is not given to runsokdue-soonoverdueexpired
createdByrequiredstring | null
createdAtrequiredinteger
updatedByrequiredstring | null
updatedAtrequiredinteger
{
  "id": "pr_8f3a2c",
  "name": "STAGING_API_TOKEN",
  "secret": true,
  "value": "string",
  "valueReadable": true,
  "repositories": [
    "string"
  ],
  "description": "Limits failed sign-ins per IP address.",
  "version": 1,
  "fingerprint": "string",
  "valueSetAt": 1761700000000,
  "expiresAt": 1761700000000,
  "rotateAfterDays": 1,
  "rotationStatus": "ok",
  "createdBy": "string",
  "createdAt": 1761700000000,
  "updatedBy": "string",
  "updatedAt": 1761700000000
}

400Invalid request

Error

NameTypeDescription
errorrequiredstring
{
  "error": "Invalid or revoked API key."
}

401Missing, invalid, or revoked API key

Error

NameTypeDescription
errorrequiredstring
{
  "error": "Invalid or revoked API key."
}

403The key lacks the evidence:write scope

404No such variable in the key's org

409Name and repositories conflict with another variable, or the variable changed meanwhile

429Rate limit exceeded

Delete an evidence variable and its history

delete/api/v1/evidence/env-vars/{varId}

Parameters

NameInTypeDescription
varIdrequiredpathstringEvidence variable id (opaque string)

Example request

curl -X DELETE "https://gitapprove.com/api/v1/evidence/env-vars/VARID" \
  -H "Authorization: Bearer $GITAPPROVE_API_KEY"

Responses

200Deleted

Ok

NameTypeDescription
okrequiredboolean
{
  "ok": true
}

401Missing, invalid, or revoked API key

Error

NameTypeDescription
errorrequiredstring
{
  "error": "Invalid or revoked API key."
}

403The key lacks the evidence:write scope

404No such variable in the key's org

429Rate limit exceeded

Set a new value for an evidence variable

post/api/v1/evidence/env-vars/{varId}/rotate

The version goes up and the old value is not kept. expiresAt belongs to the value: omitted, the new value has no expiry. Rotation resets the rotation reminder. Runs already started keep the value they were given.

Parameters

NameInTypeDescription
varIdrequiredpathstringEvidence variable id (opaque string)

Request body (required) · application/json

EvidenceEnvVarRotation

NameTypeDescription
valuerequiredstring
expiresAtinteger | nullExpiry of the new value; absent means none
{
  "value": "string",
  "expiresAt": 1761700000000
}

Example request

curl -X POST "https://gitapprove.com/api/v1/evidence/env-vars/VARID/rotate" \
  -H "Authorization: Bearer $GITAPPROVE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"value":"string"}'

Responses

200The variable with its new version

EvidenceEnvVar

NameTypeDescription
idrequiredstring
namerequiredstring
secretrequiredbooleanWrite-only value, redacted from results, never given to pull requests from forks
valuerequiredstring | nullA plain variable's value; always null for a secret
valueReadablerequiredbooleanFalse when the stored value cannot be decrypted (the encryption key changed); rotate it
repositoriesrequiredarray of string | nullRepository full names; null means every repository in the organization
descriptionrequiredstring | null
versionrequiredintegerGoes up each time the value is set
fingerprintrequiredstringKeyed hash of the value (12 hex characters); shows a change, reveals nothing
valueSetAtrequiredintegerWhen the current value was set (epoch ms)
expiresAtrequiredinteger | nullWhen the value stops working (epoch ms)
rotateAfterDaysrequiredinteger | nullRotation policy
rotationStatusrequiredstringdue-soon is within 7 days of expiry or of the policy's date; an expired variable is not given to runsokdue-soonoverdueexpired
createdByrequiredstring | null
createdAtrequiredinteger
updatedByrequiredstring | null
updatedAtrequiredinteger
{
  "id": "pr_8f3a2c",
  "name": "STAGING_API_TOKEN",
  "secret": true,
  "value": "string",
  "valueReadable": true,
  "repositories": [
    "string"
  ],
  "description": "Limits failed sign-ins per IP address.",
  "version": 1,
  "fingerprint": "string",
  "valueSetAt": 1761700000000,
  "expiresAt": 1761700000000,
  "rotateAfterDays": 1,
  "rotationStatus": "ok",
  "createdBy": "string",
  "createdAt": 1761700000000,
  "updatedBy": "string",
  "updatedAt": 1761700000000
}

400Invalid request

Error

NameTypeDescription
errorrequiredstring
{
  "error": "Invalid or revoked API key."
}

401Missing, invalid, or revoked API key

Error

NameTypeDescription
errorrequiredstring
{
  "error": "Invalid or revoked API key."
}

403The key lacks the evidence:write scope

404No such variable in the key's org

409The variable changed meanwhile; retry

429Rate limit exceeded

Every value an evidence variable has had (never the values)

get/api/v1/evidence/env-vars/{varId}/history

Parameters

NameInTypeDescription
varIdrequiredpathstringEvidence variable id (opaque string)

Example request

curl "https://gitapprove.com/api/v1/evidence/env-vars/VARID/history" \
  -H "Authorization: Bearer $GITAPPROVE_API_KEY"

Responses

200Versions, newest first

EvidenceEnvVarHistory

NameTypeDescription
versionsrequiredarray of EvidenceEnvVarVersion
{
  "versions": [
    {
      "version": 1,
      "fingerprint": "string",
      "action": "create",
      "actor": {
        "type": "user",
        "id": "pr_8f3a2c",
        "display": "string"
      },
      "createdAt": 1761700000000
    }
  ]
}

401Missing, invalid, or revoked API key

Error

NameTypeDescription
errorrequiredstring
{
  "error": "Invalid or revoked API key."
}

403The key has neither the evidence:read nor the evidence:write scope

404No such variable in the key's org

Set new values for several evidence variables at once

post/api/v1/evidence/env-vars/bulk-rotate

Every item is validated before any is written; an invalid item fails the whole request with 400. A variable that changed meanwhile is reported in failed and the others are still rotated.

Request body (required) · application/json

EvidenceEnvVarBulkRotation

NameTypeDescription
itemsrequiredarray of object
{
  "items": [
    {
      "id": "pr_8f3a2c",
      "value": "string",
      "expiresAt": 1761700000000
    }
  ]
}

Example request

curl -X POST "https://gitapprove.com/api/v1/evidence/env-vars/bulk-rotate" \
  -H "Authorization: Bearer $GITAPPROVE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"items":[{"id":"pr_8f3a2c","value":"string","expiresAt":1761700000000}]}'

Responses

200What was rotated

EvidenceEnvVarBulkResult

NameTypeDescription
rotatedrequiredarray of EvidenceEnvVar
failedrequiredarray of object
{
  "rotated": [
    {
      "id": "pr_8f3a2c",
      "name": "STAGING_API_TOKEN",
      "secret": true,
      "value": "string",
      "valueReadable": true,
      "repositories": [
        "string"
      ],
      "description": "Limits failed sign-ins per IP address.",
      "version": 1,
      "fingerprint": "string",
      "valueSetAt": 1761700000000,
      "expiresAt": 1761700000000,
      "rotateAfterDays": 1,
      "rotationStatus": "ok",
      "createdBy": "string",
      "createdAt": 1761700000000,
      "updatedBy": "string",
      "updatedAt": 1761700000000
    }
  ],
  "failed": [
    {
      "id": "pr_8f3a2c",
      "error": "string"
    }
  ]
}

400Invalid request

Error

NameTypeDescription
errorrequiredstring
{
  "error": "Invalid or revoked API key."
}

401Missing, invalid, or revoked API key

Error

NameTypeDescription
errorrequiredstring
{
  "error": "Invalid or revoked API key."
}

403The key lacks the evidence:write scope

404An item names no variable in the key's org

429Rate limit exceeded

Private registries

Credentials for private package registries the evidence dependency install uses (evidence:read to list, evidence:write to change)

List the org's private registries

get/api/v1/evidence/registries

Package registries the evidence dependency install may reach for this organization, with a credential the install gateway adds to requests under the host and path prefix (never visible to the install or the tests, never used for pull requests from forks). Requires the evidence:read or evidence:write scope; the key's creator must still be an org owner or admin. The credential is never returned.

Example request

curl "https://gitapprove.com/api/v1/evidence/registries" \
  -H "Authorization: Bearer $GITAPPROVE_API_KEY"

Responses

200The registries

EvidenceRegistryList

NameTypeDescription
registriesrequiredarray of EvidenceRegistry
{
  "registries": [
    {
      "id": "pr_8f3a2c",
      "host": "acme.jfrog.io",
      "pathPrefix": "/artifactory/api/npm/npm-private",
      "ecosystem": "npm",
      "authType": "bearer",
      "headerName": "string",
      "scopes": [
        "string"
      ],
      "description": "Limits failed sign-ins per IP address.",
      "version": 1,
      "fingerprint": "string",
      "credentialReadable": true,
      "valueSetAt": 1761700000000,
      "createdBy": "string",
      "createdAt": 1761700000000,
      "updatedBy": "string",
      "updatedAt": 1761700000000
    }
  ]
}

401Missing, invalid, or revoked API key

Error

NameTypeDescription
errorrequiredstring
{
  "error": "Invalid or revoked API key."
}

403The key has neither the evidence:read nor the evidence:write scope

429Rate limit exceeded for this API key

Add a private registry

post/api/v1/evidence/registries

host is an exact host name (https, port 443). It cannot be a GitHub host (private repositories and GitHub Packages are set with the private dependencies operations) or a public registry the install already reaches, except registry.npmjs.org for npm organization scopes (ecosystem npm, with scopes, and no pathPrefix). Every other registry needs pathPrefix, the repository's path on the host (at least one segment, for example /artifactory/api/npm/npm-private/): the install reaches the host under that path only, and only those requests get the credential. A request gets it only when its path, with percent escapes of unreserved characters decoded, is under the prefix and holds no encoded / or \ (%2F, %5C), ;, .. or // (npm's @scope%2Fname right after the prefix aside); a response that repeats the credential (headers, or a body up to 1 MiB) is refused. At most 20 registries per organization.

Request body (required) · application/json

NewEvidenceRegistry

NameTypeDescription
hostrequiredstring
pathPrefixstring | nullRequired (the repository's path, at least one segment), except on registry.npmjs.org where it must be absentmax length 200
ecosystemrequiredEvidenceRegistryEcosystemWhat the registry serves. `go` registries are asked before proxy.golang.org; `npm` scopes are required on registry.npmjs.org.npmpypimavennugetrubygemscomposergoother
scopesarray of string
authrequiredEvidenceRegistryAuthThe credential (write-only). `bearer` sends `Authorization: Bearer <token>`; `basic` sends `Authorization: Basic` of user and password (an AWS CodeArtifact token is `basic` with user `aws`, or `bearer`); `header` sends `<name>: <value>` (for example `X-JFrog-Art-Api`). Printable ASCII on one line, at most 4096 characters each.
descriptionstring | nullmax length 300
{
  "host": "acme.jfrog.io",
  "pathPrefix": "/artifactory/api/npm/npm-private/",
  "ecosystem": "npm",
  "scopes": [
    "string"
  ],
  "auth": {
    "type": "bearer",
    "token": "string",
    "username": "string",
    "password": "string",
    "name": "string",
    "value": "string"
  },
  "description": "Limits failed sign-ins per IP address."
}

Example request

curl -X POST "https://gitapprove.com/api/v1/evidence/registries" \
  -H "Authorization: Bearer $GITAPPROVE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"host":"acme.jfrog.io","ecosystem":"npm","auth":{"type":"bearer","token":"string","username":"string","password":"string","name":"string","value":"string"}}'

Responses

201Created registry

EvidenceRegistry

NameTypeDescription
idrequiredstring
hostrequiredstring
pathPrefixrequiredstring | nullThe repository's path on the host; requests under it only. Null only on registry.npmjs.org (npm scopes decide)
ecosystemrequiredEvidenceRegistryEcosystemWhat the registry serves. `go` registries are asked before proxy.golang.org; `npm` scopes are required on registry.npmjs.org.npmpypimavennugetrubygemscomposergoother
authTyperequiredstringbearerbasicheader
headerNamerequiredstring | nullThe custom header's name (authType header); not secret
scopesrequiredarray of stringnpm scopes (`@acme`) the credential is for, or Go module path patterns (GONOSUMDB)
descriptionrequiredstring | null
versionrequiredintegerGoes up each time the credential is set
fingerprintrequiredstringKeyed hash of the credential (12 hex characters); shows a change, reveals nothing
credentialReadablerequiredbooleanFalse when the stored credential cannot be decrypted (the encryption key changed); rotate it
valueSetAtrequiredintegerWhen the current credential was set (epoch ms)
createdByrequiredstring | null
createdAtrequiredinteger
updatedByrequiredstring | null
updatedAtrequiredinteger
{
  "id": "pr_8f3a2c",
  "host": "acme.jfrog.io",
  "pathPrefix": "/artifactory/api/npm/npm-private",
  "ecosystem": "npm",
  "authType": "bearer",
  "headerName": "string",
  "scopes": [
    "string"
  ],
  "description": "Limits failed sign-ins per IP address.",
  "version": 1,
  "fingerprint": "string",
  "credentialReadable": true,
  "valueSetAt": 1761700000000,
  "createdBy": "string",
  "createdAt": 1761700000000,
  "updatedBy": "string",
  "updatedAt": 1761700000000
}

400Invalid request

Error

NameTypeDescription
errorrequiredstring
{
  "error": "Invalid or revoked API key."
}

401Missing, invalid, or revoked API key

Error

NameTypeDescription
errorrequiredstring
{
  "error": "Invalid or revoked API key."
}

403The key lacks the evidence:write scope

409A registry already exists for this host and prefix (or these npm scopes), or the organization has 20

429Rate limit exceeded

Change a private registry's path prefix, ecosystem, scopes or description

patch/api/v1/evidence/registries/{registryId}

Every field is optional. The host cannot change (delete the registry and add it again); the credential is changed with the rotate operation, except that a change sending it further (a path prefix that is not the old one or under it; on registry.npmjs.org, an added scope) needs auth again (409 without it), which then replaces the stored credential (version up). auth is refused on any other change.

Parameters

NameInTypeDescription
registryIdrequiredpathstringPrivate registry id (opaque string)

Request body (required) · application/json

EvidenceRegistryPatch

NameTypeDescription
pathPrefixstring | nullmax length 200
ecosystemEvidenceRegistryEcosystemWhat the registry serves. `go` registries are asked before proxy.golang.org; `npm` scopes are required on registry.npmjs.org.npmpypimavennugetrubygemscomposergoother
scopesarray of string
descriptionstring | nullmax length 300
authEvidenceRegistryAuthThe credential (write-only). `bearer` sends `Authorization: Bearer <token>`; `basic` sends `Authorization: Basic` of user and password (an AWS CodeArtifact token is `basic` with user `aws`, or `bearer`); `header` sends `<name>: <value>` (for example `X-JFrog-Art-Api`). Printable ASCII on one line, at most 4096 characters each.
{
  "pathPrefix": "string",
  "ecosystem": "npm",
  "scopes": [
    "string"
  ],
  "description": "Limits failed sign-ins per IP address.",
  "auth": {
    "type": "bearer",
    "token": "string",
    "username": "string",
    "password": "string",
    "name": "string",
    "value": "string"
  }
}

Example request

curl -X PATCH "https://gitapprove.com/api/v1/evidence/registries/REGISTRYID" \
  -H "Authorization: Bearer $GITAPPROVE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

Responses

200Updated registry

EvidenceRegistry

NameTypeDescription
idrequiredstring
hostrequiredstring
pathPrefixrequiredstring | nullThe repository's path on the host; requests under it only. Null only on registry.npmjs.org (npm scopes decide)
ecosystemrequiredEvidenceRegistryEcosystemWhat the registry serves. `go` registries are asked before proxy.golang.org; `npm` scopes are required on registry.npmjs.org.npmpypimavennugetrubygemscomposergoother
authTyperequiredstringbearerbasicheader
headerNamerequiredstring | nullThe custom header's name (authType header); not secret
scopesrequiredarray of stringnpm scopes (`@acme`) the credential is for, or Go module path patterns (GONOSUMDB)
descriptionrequiredstring | null
versionrequiredintegerGoes up each time the credential is set
fingerprintrequiredstringKeyed hash of the credential (12 hex characters); shows a change, reveals nothing
credentialReadablerequiredbooleanFalse when the stored credential cannot be decrypted (the encryption key changed); rotate it
valueSetAtrequiredintegerWhen the current credential was set (epoch ms)
createdByrequiredstring | null
createdAtrequiredinteger
updatedByrequiredstring | null
updatedAtrequiredinteger
{
  "id": "pr_8f3a2c",
  "host": "acme.jfrog.io",
  "pathPrefix": "/artifactory/api/npm/npm-private",
  "ecosystem": "npm",
  "authType": "bearer",
  "headerName": "string",
  "scopes": [
    "string"
  ],
  "description": "Limits failed sign-ins per IP address.",
  "version": 1,
  "fingerprint": "string",
  "credentialReadable": true,
  "valueSetAt": 1761700000000,
  "createdBy": "string",
  "createdAt": 1761700000000,
  "updatedBy": "string",
  "updatedAt": 1761700000000
}

400Invalid request

Error

NameTypeDescription
errorrequiredstring
{
  "error": "Invalid or revoked API key."
}

401Missing, invalid, or revoked API key

Error

NameTypeDescription
errorrequiredstring
{
  "error": "Invalid or revoked API key."
}

403The key lacks the evidence:write scope

404No such registry in the key's org

409Conflicts with another registry, widens where the credential goes without `auth`, or the registry changed meanwhile

429Rate limit exceeded

Delete a private registry and its credential

delete/api/v1/evidence/registries/{registryId}

Parameters

NameInTypeDescription
registryIdrequiredpathstringPrivate registry id (opaque string)

Example request

curl -X DELETE "https://gitapprove.com/api/v1/evidence/registries/REGISTRYID" \
  -H "Authorization: Bearer $GITAPPROVE_API_KEY"

Responses

200Deleted

Ok

NameTypeDescription
okrequiredboolean
{
  "ok": true
}

401Missing, invalid, or revoked API key

Error

NameTypeDescription
errorrequiredstring
{
  "error": "Invalid or revoked API key."
}

403The key lacks the evidence:write scope

404No such registry in the key's org

429Rate limit exceeded

Set a new credential for a private registry

post/api/v1/evidence/registries/{registryId}/rotate

The version goes up and the old credential is not kept. The kind of credential may change. Runs already installing keep the one they had.

Parameters

NameInTypeDescription
registryIdrequiredpathstringPrivate registry id (opaque string)

Request body (required) · application/json

EvidenceRegistryRotation

NameTypeDescription
authrequiredEvidenceRegistryAuthThe credential (write-only). `bearer` sends `Authorization: Bearer <token>`; `basic` sends `Authorization: Basic` of user and password (an AWS CodeArtifact token is `basic` with user `aws`, or `bearer`); `header` sends `<name>: <value>` (for example `X-JFrog-Art-Api`). Printable ASCII on one line, at most 4096 characters each.
{
  "auth": {
    "type": "bearer",
    "token": "string",
    "username": "string",
    "password": "string",
    "name": "string",
    "value": "string"
  }
}

Example request

curl -X POST "https://gitapprove.com/api/v1/evidence/registries/REGISTRYID/rotate" \
  -H "Authorization: Bearer $GITAPPROVE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"auth":{"type":"bearer","token":"string","username":"string","password":"string","name":"string","value":"string"}}'

Responses

200The registry with its new version

EvidenceRegistry

NameTypeDescription
idrequiredstring
hostrequiredstring
pathPrefixrequiredstring | nullThe repository's path on the host; requests under it only. Null only on registry.npmjs.org (npm scopes decide)
ecosystemrequiredEvidenceRegistryEcosystemWhat the registry serves. `go` registries are asked before proxy.golang.org; `npm` scopes are required on registry.npmjs.org.npmpypimavennugetrubygemscomposergoother
authTyperequiredstringbearerbasicheader
headerNamerequiredstring | nullThe custom header's name (authType header); not secret
scopesrequiredarray of stringnpm scopes (`@acme`) the credential is for, or Go module path patterns (GONOSUMDB)
descriptionrequiredstring | null
versionrequiredintegerGoes up each time the credential is set
fingerprintrequiredstringKeyed hash of the credential (12 hex characters); shows a change, reveals nothing
credentialReadablerequiredbooleanFalse when the stored credential cannot be decrypted (the encryption key changed); rotate it
valueSetAtrequiredintegerWhen the current credential was set (epoch ms)
createdByrequiredstring | null
createdAtrequiredinteger
updatedByrequiredstring | null
updatedAtrequiredinteger
{
  "id": "pr_8f3a2c",
  "host": "acme.jfrog.io",
  "pathPrefix": "/artifactory/api/npm/npm-private",
  "ecosystem": "npm",
  "authType": "bearer",
  "headerName": "string",
  "scopes": [
    "string"
  ],
  "description": "Limits failed sign-ins per IP address.",
  "version": 1,
  "fingerprint": "string",
  "credentialReadable": true,
  "valueSetAt": 1761700000000,
  "createdBy": "string",
  "createdAt": 1761700000000,
  "updatedBy": "string",
  "updatedAt": 1761700000000
}

400Invalid request

Error

NameTypeDescription
errorrequiredstring
{
  "error": "Invalid or revoked API key."
}

401Missing, invalid, or revoked API key

Error

NameTypeDescription
errorrequiredstring
{
  "error": "Invalid or revoked API key."
}

403The key lacks the evidence:write scope

404No such registry in the key's org

409The registry changed meanwhile; retry

429Rate limit exceeded

Private dependencies

Which of the GitHub App installation's repositories the evidence dependency install may read (evidence:read to read, evidence:write to change)

Read the org's private dependency repositories

get/api/v1/evidence/private-dependencies

For a pull request whose head is in the base repository, the evidence dependency install reads private GitHub dependencies (git over HTTPS, Go modules, GitHub archives) with a GitHub App token minted for that repository and the repositories listed here, or for every repository of the installation with allRepositories (which also lets GitHub Packages through). Default: none, the pull request's repository only. A pull request's code runs in the install, so it can read every repository the token covers. Pull requests from forks get no token for private content. available lists the installation's repositories. Requires evidence:read or evidence:write.

Example request

curl "https://gitapprove.com/api/v1/evidence/private-dependencies" \
  -H "Authorization: Bearer $GITAPPROVE_API_KEY"

Responses

200The setting and the repositories to choose from

EvidencePrivateDependencies

NameTypeDescription
allRepositoriesrequiredbooleanThe install's token reads every repository of the installation, and GitHub Packages
repositoriesrequiredarray of stringRepositories (`owner/name`) the install's token reads besides the pull request's own
availablerequiredarray of stringThe installation's repositories to choose from
{
  "allRepositories": true,
  "repositories": [
    "acme/shared-lib"
  ],
  "available": [
    "string"
  ]
}

401Missing, invalid, or revoked API key

Error

NameTypeDescription
errorrequiredstring
{
  "error": "Invalid or revoked API key."
}

403The key has neither the evidence:read nor the evidence:write scope

429Rate limit exceeded for this API key

Set the org's private dependency repositories

put/api/v1/evidence/private-dependencies

Either field may be left out to keep it. Each repository must be one of the installation's (owner/name, any case) or already listed; at most 100. Audited as evidence.private_dependencies.updated.

Request body (required) · application/json

EvidencePrivateDependenciesUpdate

NameTypeDescription
allRepositoriesboolean
repositoriesarray of string
{
  "allRepositories": true,
  "repositories": [
    "string"
  ]
}

Example request

curl -X PUT "https://gitapprove.com/api/v1/evidence/private-dependencies" \
  -H "Authorization: Bearer $GITAPPROVE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

Responses

200The new setting

EvidencePrivateDependencies

NameTypeDescription
allRepositoriesrequiredbooleanThe install's token reads every repository of the installation, and GitHub Packages
repositoriesrequiredarray of stringRepositories (`owner/name`) the install's token reads besides the pull request's own
availablerequiredarray of stringThe installation's repositories to choose from
{
  "allRepositories": true,
  "repositories": [
    "acme/shared-lib"
  ],
  "available": [
    "string"
  ]
}

400Invalid request

Error

NameTypeDescription
errorrequiredstring
{
  "error": "Invalid or revoked API key."
}

401Missing, invalid, or revoked API key

Error

NameTypeDescription
errorrequiredstring
{
  "error": "Invalid or revoked API key."
}

403The key lacks the evidence:write scope

429Rate limit exceeded

Test network

Whether the tests in GitApprove's sandbox may reach the network, and which hosts (evidence:read to read, evidence:write to change)

Read the org's sandbox test network

get/api/v1/evidence/test-network

By default (mode: none) the tests in GitApprove's sandbox have no outbound network. With allowlist, their requests go through GitApprove's egress gateway and may reach the public package registries the dependency install uses (registries) and the organization's hosts: api.example.com, *.example.com (any subdomain at any depth, not the apex), http://host (plain HTTP for that host only; everything else is HTTPS), a public IP address, or * (every public host; warning is set). No credential is added to these requests; addresses in private, loopback, link-local and metadata ranges are refused, also when a name resolves to one (checked at every request and redirect); every request is recorded as evidence. Runs in the organization's own GitHub Actions already have the runner's network; this setting does not apply to them. Requires evidence:read or evidence:write.

Example request

curl "https://gitapprove.com/api/v1/evidence/test-network" \
  -H "Authorization: Bearer $GITAPPROVE_API_KEY"

Responses

200The setting

EvidenceTestNetwork

NameTypeDescription
moderequiredstring`none`: no outbound network for sandbox tests (default)noneallowlist
hostsrequiredarray of string
registriesrequiredarray of stringThe public package registries also allowed with `allowlist`
warningrequiredstring | nullSet when `hosts` holds `*`
{
  "mode": "none",
  "hosts": [
    "api.example.com",
    "*.cdn.example.com"
  ],
  "registries": [
    "string"
  ],
  "warning": "string"
}

401Missing, invalid, or revoked API key

Error

NameTypeDescription
errorrequiredstring
{
  "error": "Invalid or revoked API key."
}

403The key has neither the evidence:read nor the evidence:write scope

429Rate limit exceeded for this API key

Set the org's sandbox test network

put/api/v1/evidence/test-network

Either field may be left out to keep it. At most 100 hosts; each is validated (host names in their IDNA form, no path, port or user; no private or reserved address; http:// and wildcards do not combine). Audited as evidence.test_network.updated.

Request body (required) · application/json

EvidenceTestNetworkUpdate

NameTypeDescription
modestringnoneallowlist
hostsarray of string
{
  "mode": "none",
  "hosts": [
    "string"
  ]
}

Example request

curl -X PUT "https://gitapprove.com/api/v1/evidence/test-network" \
  -H "Authorization: Bearer $GITAPPROVE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

Responses

200The new setting

EvidenceTestNetwork

NameTypeDescription
moderequiredstring`none`: no outbound network for sandbox tests (default)noneallowlist
hostsrequiredarray of string
registriesrequiredarray of stringThe public package registries also allowed with `allowlist`
warningrequiredstring | nullSet when `hosts` holds `*`
{
  "mode": "none",
  "hosts": [
    "api.example.com",
    "*.cdn.example.com"
  ],
  "registries": [
    "string"
  ],
  "warning": "string"
}

400Invalid request

Error

NameTypeDescription
errorrequiredstring
{
  "error": "Invalid or revoked API key."
}

401Missing, invalid, or revoked API key

Error

NameTypeDescription
errorrequiredstring
{
  "error": "Invalid or revoked API key."
}

403The key lacks the evidence:write scope

429Rate limit exceeded

Evidence from GitHub Actions

The GitApprove/evidence action runs the evidence runner in the organization's own workflow and sends the results (GitHub Actions OIDC token, no API key)

Ask which tests the GitApprove/evidence action should run

post/api/v1/evidence/action/plan

Called by the GitApprove/evidence action from a pull_request workflow job, after the job's own setup steps. Authentication is the job's GitHub Actions OIDC ID token (permissions: id-token: write) with the GitApprove URL as its audience; no API key. The token is verified against GitHub's published keys (issuer, audience, expiry, at most 15 minutes old). The organization is the one whose GitHub account id is the token's repository_owner_id; it needs the evidence add-on and "Accept evidence from GitHub Actions" on. The event must be pull_request (pull_request_target is refused) and the ref refs/pull/<n>/merge; GitHub must agree that the pull request's base repository is the token's repository_id, that it is not from a fork, and that its head is headSha.

GitApprove selects the tests from the uploaded index and the pull request's changed files, creates (or claims) an evidence run with source github-actions bound to the workflow run and attempt, and returns the plan. The same run and attempt asking again get the same plan. skip: true (200) means there is nothing to run: the organization's source is the sandbox, the monthly allowance is used up, a draft, or no eligible change.

Request body (required) · application/json

EvidenceActionPlanRequest

NameTypeDescription
protocolrequiredinteger1
headSharequiredstringThe pull request head the job ran for (40 hex characters)
checkoutrequiredstringWhether the job checked out the head itself or GitHub's merge commitheadmerge
checkoutSharequiredstring
indexrequiredobjectThe evidence runner's index of the checkout (tests, imports, routes)
actionobject
authoredTestsrequiredbooleanThe workflow's `authored-tests` input. False, GitApprove writes no tests for this job (it may still use the repository's own); items only a new test could show are reported as "not produced: authored tests disabled in this workflow".
{
  "protocol": 1,
  "headSha": "9fceb02d0ae598e95dc970b74767f19372d61af8",
  "checkout": "head",
  "checkoutSha": "string",
  "index": {},
  "action": {
    "version": "string"
  },
  "authoredTests": true
}

Example request

curl -X POST "https://gitapprove.com/api/v1/evidence/action/plan" \
  -H "Authorization: Bearer $GITAPPROVE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"protocol":1,"headSha":"9fceb02d0ae598e95dc970b74767f19372d61af8","checkout":"head","checkoutSha":"string","index":{},"authoredTests":true}'

Responses

200The plan, or why there is nothing to run

EvidenceActionPlan

NameTypeDescription
authoringanyThe authoring agent's first step, or null when the run has no agent.
skiprequiredboolean
reasonstringWith skip, why there is nothing to run
runIdstring
reviewUrlstring
baseShastring
headShastring
filesarray of stringTest files to run
leftarray of object
timeoutMsinteger
performanceRunsintegermin 0 · max 3
variablesarray of objectThe organization's plain evidence variables (secret ones are never sent)
withheldarray of object
limitsobject
{
  "authoring": null,
  "skip": true,
  "reason": "string",
  "runId": "string",
  "reviewUrl": "string",
  "baseSha": "string",
  "headSha": "9fceb02d0ae598e95dc970b74767f19372d61af8",
  "files": [
    "string"
  ],
  "left": [
    {
      "file": "string",
      "reason": "string"
    }
  ],
  "timeoutMs": 1,
  "performanceRuns": 0,
  "variables": [
    {
      "name": "string",
      "value": "string"
    }
  ],
  "withheld": [
    {
      "name": "string",
      "reason": "secret"
    }
  ],
  "limits": {
    "maxUploadRawBytes": 1,
    "maxFiles": 1,
    "maxFileBytes": 1,
    "maxArtifactBytes": 1,
    "maxRunUploadBytes": 1
  }
}

400Invalid request

Error

NameTypeDescription
errorrequiredstring
{
  "error": "Invalid or revoked API key."
}

401Missing or invalid OIDC token

403The setting is off, the account, repository or event is not accepted, or the pull request is from a fork

404The pull request is not on GitHub or not in GitApprove yet (retry)

409The head moved on, or GitApprove has not seen the commit yet (retry)

413Request body over 8 MiB

429Rate limit exceeded

503GitHub's keys or the pull request could not be read; retry

Report the runs GitApprove's authoring agent asked for

post/api/v1/evidence/action/author

When a plan carries authoring (a step of GitApprove's authoring agent), the action is the agent's test executor: it writes the step's files into the checkout of each revision a run needs (reserved gitapprove-evidence names; discard deleted), runs each of runs on its revision, and posts each run's artifact directory here, by run id. Authenticated like the plan and accepted only from the workflow run and attempt the plan was issued to, for the run's current step; a repeated report of an answered step gets the same answer. The answer is the agent's next step or, with final: true, the tests it kept (accept) and the repository's tests it used (include), to run with the plan's files on both revisions. Authored tests are never committed; the action deletes them before it ends.

Request body (required) · application/json

EvidenceActionAuthorRequest

NameTypeDescription
protocolrequiredinteger1
runIdrequiredstring
headSharequiredstring
roundrequiredinteger
indexrequiredobjectThe same index the plan was made from.
runsrequiredarray of EvidenceActionUploadSide + objectOne entry per run of the step, by its id.
{
  "protocol": 1,
  "runId": "string",
  "headSha": "9fceb02d0ae598e95dc970b74767f19372d61af8",
  "round": 1,
  "index": {},
  "runs": [
    {
      "files": [
        {
          "name": "string",
          "data": "string"
        }
      ],
      "durationMs": 1,
      "id": "pr_8f3a2c",
      "error": "string"
    }
  ]
}

Example request

curl -X POST "https://gitapprove.com/api/v1/evidence/action/author" \
  -H "Authorization: Bearer $GITAPPROVE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"protocol":1,"runId":"string","headSha":"9fceb02d0ae598e95dc970b74767f19372d61af8","round":1,"index":{},"runs":[{"files":[{"name":"string","data":"string"}],"durationMs":1,"id":"pr_8f3a2c","error":"string"}]}'

Responses

200The agent's next step

EvidenceAuthoringStep

NameTypeDescription
roundrequiredinteger
filesrequiredarray of EvidenceAuthoredFileThe agent's test files as they are now; write them over the checkout of each revision a run needs.
discardrequiredarray of stringAuthored files the agent deleted; delete them from the checkouts.
runsrequiredarray of objectTest runs to do, in order (at most 4). Empty with `final` false means report back at once.
finalrequiredbooleanWith `final`, `accept` and `include` hold the tests to run on both revisions.
acceptrequiredarray of EvidenceAuthoredFileWith `final`, the test files the agent kept.
includerequiredarray of stringWith `final`, the repository's own tests the agent used that the plan did not list.
{
  "round": 1,
  "files": [
    {
      "path": "string",
      "content": "string"
    }
  ],
  "discard": [
    "string"
  ],
  "runs": [
    {
      "id": "pr_8f3a2c",
      "revision": "head",
      "record": true,
      "files": [
        "string"
      ]
    }
  ],
  "final": true,
  "accept": [
    {
      "path": "string",
      "content": "string"
    }
  ],
  "include": [
    "string"
  ]
}

400Invalid request

Error

NameTypeDescription
errorrequiredstring
{
  "error": "Invalid or revoked API key."
}

401Missing or invalid OIDC token

403Not from the workflow run the plan was issued to, or the setting is off

404No such evidence run for this pull request

409Not the current step, the run finished, or the head moved on

413Request body too large

429Rate limit exceeded

Upload what the planned tests produced

post/api/v1/evidence/action/results

The manifests (manifest.json) and artifacts (screenshots, screen recordings) the runner wrote for the head and base revisions. Authenticated like the plan, and accepted only from the workflow run and attempt the plan was issued to, for the same head, while the pull request still has it. Everything is validated like a sandbox instance's output (names, sizes, the manifest schema, PNG structure and re-encoding), results for tests outside the plan are dropped, the organization's secret evidence variables are redacted, and the run is stored and shown in the review as "Ran in your GitHub Actions". The run counts one evidence minute per started block of 40 screenshots, at least one.

Two calls. The first carries the manifests (text) and names each artifact with its size; nothing is stored, and the answer (202) is where to upload each file: a short-lived signed URL for one PUT of exactly that size, or one per 16 MiB part for a multipart upload. The artifacts go straight to storage, never through GitApprove's API. The second call repeats the body with uploaded (each file, and each part's ETag); it completes the uploads and stores the run. An artifact is at most 100 MiB (screen recordings; the action re-encodes larger ones with ffmpeg, or leaves them out), all of a run's at most 300 MiB.

Idempotent: the second call claims the run before anything is stored, so the same results sent twice are stored once. A repeat of either call for results already stored gets the same 200 body again; one sent while the first is being stored gets 409 "...; retry".

Request body (required) · application/json

EvidenceActionResultsRequest

NameTypeDescription
protocolrequiredinteger1
runIdrequiredstring
headSharequiredstring
indexrequiredobjectThe same index the plan was made from
headrequiredEvidenceActionResultsSide
baserequiredany
uploadedarray of objectAbsent on the first call. On the second, what was uploaded to each issued URL, with each part's ETag for a multipart upload.
baseErrorstring | null
baseTestsrequiredarray of string
notesarray of string
{
  "protocol": 1,
  "runId": "string",
  "headSha": "9fceb02d0ae598e95dc970b74767f19372d61af8",
  "index": {},
  "head": {
    "manifest": "string",
    "artifacts": [
      {
        "name": "string",
        "size": 1
      }
    ],
    "durationMs": 1
  },
  "base": null,
  "uploaded": [
    {
      "side": "head",
      "name": "string",
      "parts": [
        {
          "partNumber": 1,
          "etag": "string"
        }
      ]
    }
  ],
  "baseError": "string",
  "baseTests": [
    "string"
  ],
  "notes": [
    "string"
  ]
}

Example request

curl -X POST "https://gitapprove.com/api/v1/evidence/action/results" \
  -H "Authorization: Bearer $GITAPPROVE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"protocol":1,"runId":"string","headSha":"9fceb02d0ae598e95dc970b74767f19372d61af8","index":{},"head":{"manifest":"string","artifacts":[{"name":"string","size":1}],"durationMs":1},"base":null,"baseTests":["string"]}'

Responses

200The stored run

EvidenceActionResults

NameTypeDescription
runIdstring
statusstring
reasonstring | null
reviewUrlstring
minutesinteger
testsobject
storedinteger
{
  "runId": "string",
  "status": "string",
  "reason": "string",
  "reviewUrl": "string",
  "minutes": 1,
  "tests": {
    "base": 1,
    "head": 1
  },
  "stored": 1
}

202Where to upload each artifact (the first call)

EvidenceActionUploadTickets

NameTypeDescription
uploadrequiredbooleantrue
runIdrequiredstring
uploadsrequiredarray of object
{
  "upload": true,
  "runId": "string",
  "uploads": [
    {
      "side": "head",
      "name": "string",
      "url": "string",
      "parts": [
        {
          "partNumber": 1,
          "url": "string",
          "size": 1
        }
      ]
    }
  ]
}

400Invalid request

Error

NameTypeDescription
errorrequiredstring
{
  "error": "Invalid or revoked API key."
}

401Missing or invalid OIDC token

403Not accepted (as for the plan), or not the workflow run the plan was issued to

404No such run for this pull request

409The run ended some other way (cancelled, timed out), the head moved on, or another upload of these results is being stored (retry)

413A body over 16 MiB, or the run's artifacts over 300 MiB

429Rate limit exceeded

503GitHub's keys or the pull request could not be read; retry

Models

Ok

NameTypeDescription
okrequiredboolean

EvidenceEnvVar

NameTypeDescription
idrequiredstring
namerequiredstring
secretrequiredbooleanWrite-only value, redacted from results, never given to pull requests from forks
valuerequiredstring | nullA plain variable's value; always null for a secret
valueReadablerequiredbooleanFalse when the stored value cannot be decrypted (the encryption key changed); rotate it
repositoriesrequiredarray of string | nullRepository full names; null means every repository in the organization
descriptionrequiredstring | null
versionrequiredintegerGoes up each time the value is set
fingerprintrequiredstringKeyed hash of the value (12 hex characters); shows a change, reveals nothing
valueSetAtrequiredintegerWhen the current value was set (epoch ms)
expiresAtrequiredinteger | nullWhen the value stops working (epoch ms)
rotateAfterDaysrequiredinteger | nullRotation policy
rotationStatusrequiredstringdue-soon is within 7 days of expiry or of the policy's date; an expired variable is not given to runsokdue-soonoverdueexpired
createdByrequiredstring | null
createdAtrequiredinteger
updatedByrequiredstring | null
updatedAtrequiredinteger

EvidenceRegistry

NameTypeDescription
idrequiredstring
hostrequiredstring
pathPrefixrequiredstring | nullThe repository's path on the host; requests under it only. Null only on registry.npmjs.org (npm scopes decide)
ecosystemrequiredEvidenceRegistryEcosystemWhat the registry serves. `go` registries are asked before proxy.golang.org; `npm` scopes are required on registry.npmjs.org.npmpypimavennugetrubygemscomposergoother
authTyperequiredstringbearerbasicheader
headerNamerequiredstring | nullThe custom header's name (authType header); not secret
scopesrequiredarray of stringnpm scopes (`@acme`) the credential is for, or Go module path patterns (GONOSUMDB)
descriptionrequiredstring | null
versionrequiredintegerGoes up each time the credential is set
fingerprintrequiredstringKeyed hash of the credential (12 hex characters); shows a change, reveals nothing
credentialReadablerequiredbooleanFalse when the stored credential cannot be decrypted (the encryption key changed); rotate it
valueSetAtrequiredintegerWhen the current credential was set (epoch ms)
createdByrequiredstring | null
createdAtrequiredinteger
updatedByrequiredstring | null
updatedAtrequiredinteger

EvidenceRegistryEcosystem

What the registry serves. `go` registries are asked before proxy.golang.org; `npm` scopes are required on registry.npmjs.org.

stringnpmpypimavennugetrubygemscomposergoother

EvidenceRegistryList

NameTypeDescription
registriesrequiredarray of EvidenceRegistry

EvidenceRegistryAuth

The credential (write-only). `bearer` sends `Authorization: Bearer <token>`; `basic` sends `Authorization: Basic` of user and password (an AWS CodeArtifact token is `basic` with user `aws`, or `bearer`); `header` sends `<name>: <value>` (for example `X-JFrog-Art-Api`). Printable ASCII on one line, at most 4096 characters each.

NameTypeDescription
typerequiredstringbearerbasicheader
tokenstringFor bearer
usernamestringFor basic; no ':'
passwordstringFor basic
namestringFor header: letters, digits and dashes
valuestringFor header

NewEvidenceRegistry

NameTypeDescription
hostrequiredstring
pathPrefixstring | nullRequired (the repository's path, at least one segment), except on registry.npmjs.org where it must be absentmax length 200
ecosystemrequiredEvidenceRegistryEcosystemWhat the registry serves. `go` registries are asked before proxy.golang.org; `npm` scopes are required on registry.npmjs.org.npmpypimavennugetrubygemscomposergoother
scopesarray of string
authrequiredEvidenceRegistryAuthThe credential (write-only). `bearer` sends `Authorization: Bearer <token>`; `basic` sends `Authorization: Basic` of user and password (an AWS CodeArtifact token is `basic` with user `aws`, or `bearer`); `header` sends `<name>: <value>` (for example `X-JFrog-Art-Api`). Printable ASCII on one line, at most 4096 characters each.
descriptionstring | nullmax length 300

EvidenceRegistryPatch

NameTypeDescription
pathPrefixstring | nullmax length 200
ecosystemEvidenceRegistryEcosystemWhat the registry serves. `go` registries are asked before proxy.golang.org; `npm` scopes are required on registry.npmjs.org.npmpypimavennugetrubygemscomposergoother
scopesarray of string
descriptionstring | nullmax length 300
authEvidenceRegistryAuthThe credential (write-only). `bearer` sends `Authorization: Bearer <token>`; `basic` sends `Authorization: Basic` of user and password (an AWS CodeArtifact token is `basic` with user `aws`, or `bearer`); `header` sends `<name>: <value>` (for example `X-JFrog-Art-Api`). Printable ASCII on one line, at most 4096 characters each.

EvidencePrivateDependencies

NameTypeDescription
allRepositoriesrequiredbooleanThe install's token reads every repository of the installation, and GitHub Packages
repositoriesrequiredarray of stringRepositories (`owner/name`) the install's token reads besides the pull request's own
availablerequiredarray of stringThe installation's repositories to choose from

EvidencePrivateDependenciesUpdate

NameTypeDescription
allRepositoriesboolean
repositoriesarray of string

EvidenceTestNetwork

NameTypeDescription
moderequiredstring`none`: no outbound network for sandbox tests (default)noneallowlist
hostsrequiredarray of string
registriesrequiredarray of stringThe public package registries also allowed with `allowlist`
warningrequiredstring | nullSet when `hosts` holds `*`

EvidenceTestNetworkUpdate

NameTypeDescription
modestringnoneallowlist
hostsarray of string

EvidenceRegistryRotation

NameTypeDescription
authrequiredEvidenceRegistryAuthThe credential (write-only). `bearer` sends `Authorization: Bearer <token>`; `basic` sends `Authorization: Basic` of user and password (an AWS CodeArtifact token is `basic` with user `aws`, or `bearer`); `header` sends `<name>: <value>` (for example `X-JFrog-Art-Api`). Printable ASCII on one line, at most 4096 characters each.

EvidenceEnvVarList

NameTypeDescription
variablesrequiredarray of EvidenceEnvVar

NewEvidenceEnvVar

NameTypeDescription
namerequiredstringmax length 128
valuerequiredstringAt most 32 KiB; may be empty
secretbooleandefault true
repositoriesarray of string | nullRepository full names (owner/name) or ids; null or absent means all
descriptionstring | nullmax length 300
expiresAtinteger | null
rotateAfterDaysinteger | nullmin 1 · max 3650

EvidenceEnvVarPatch

NameTypeDescription
namestringmax length 128
valuestringPlain variables only
secretbooleanOnly true is accepted for a variable that is already secret
repositoriesarray of string | null
descriptionstring | nullmax length 300
expiresAtinteger | null
rotateAfterDaysinteger | nullmin 1 · max 3650

EvidenceEnvVarRotation

NameTypeDescription
valuerequiredstring
expiresAtinteger | nullExpiry of the new value; absent means none

EvidenceEnvVarBulkRotation

NameTypeDescription
itemsrequiredarray of object

EvidenceEnvVarBulkResult

NameTypeDescription
rotatedrequiredarray of EvidenceEnvVar
failedrequiredarray of object

EvidenceEnvVarVersion

NameTypeDescription
versionrequiredinteger
fingerprintrequiredstring
actionrequiredstringcreaterotate
actorrequiredobject
createdAtrequiredinteger

EvidenceEnvVarHistory

NameTypeDescription
versionsrequiredarray of EvidenceEnvVarVersion

PRPage

NameTypeDescription
itemsrequiredarray of PRSummary
nextCursorrequiredstring | null

AuditEvent

NameTypeDescription
idrequiredstring
org_idrequiredstring
occurred_atrequiredintegerEpoch milliseconds
actorrequiredobject
actionrequiredstring
categoryrequiredstringreviewmembershipcredentialsorg_settingsbillingdatasystem
targetrequiredobject
detailrequiredany | nullRedacted JSON describing what changed. Never contains secrets or review text.
source_iprequiredstring | null

AuditPage

NameTypeDescription
api_versionrequiredinteger
itemsrequiredarray of AuditEvent
nextCursorrequiredstring | null

Error

NameTypeDescription
errorrequiredstring

ChunkTag

stringsecurity sensitiveperformance sensitivereliabilitycore logictestsdata accessapi surfaceconfigdocsboilerplateuimigrations

ChunkSubtag

A finer label under a chunk tag. A chunk that has a subtag always has the subtag's parent tag too (for example `egress` is under `security sensitive`). A chunk may have a parent tag with no subtag: subtags are optional and the list is not exhaustive.

stringauthsecretscryptountrusted inputegressprivacytenant isolationtransport securityfile handlingabuse protectionaudit trailhot pathquery volumeunbounded workmetered costmemorycachingpayload sizeblockingindexingrenderingconcurrencyerror handlingretriestimeoutspartial failurefallbackscleanupobservabilitymoneystate machineai prompttimeparsingvalidationalgorithmbusiness ruledestructive writetransactionraw querypublic contractbreaking changeerror contractinfradependenciesfeature flagenvironmentaccess scopesirreversiblebackfilllockingdeploy orderingweakened testflaky riskaccessibilitycopyclient state

PRSummary

NameTypeDescription
idrequiredstring
numberrequiredinteger
titlerequiredstring
staterequiredstringopenmergedclosed
repoFullNamestring | null
authorNamestring
additionsinteger
deletionsinteger
changedFilesinteger
ciStatusstringpassingfailingpending
headBranchstring
updatedAtrequiredintegerEpoch milliseconds

PRFileSummary

NameTypeDescription
filenamerequiredstring
statusrequiredstringaddedmodifiedremovedrenamed
additionsinteger
deletionsinteger
reviewValuestringhighmediumlow

PRDetail

NameTypeDescription
idrequiredstring
numberrequiredinteger
titlerequiredstring
staterequiredstringopenmergedclosed
repoFullNamestring | null
authorNamestring
additionsinteger
deletionsinteger
changedFilesinteger
ciStatusstringpassingfailingpending
headBranchstring
updatedAtrequiredintegerEpoch milliseconds
descriptionstring | null
authorAvatarstring | null
baseBranchstring
headShastring
createdAtintegerEpoch milliseconds
filesarray of PRFileSummary

CodeChunk

NameTypeDescription
idrequiredstringOpaque chunk id (file id + chunk index)
symbolrequiredstringEnclosing function/class/block or "module scope"
tagsrequiredarray of ChunkTagsecurity sensitiveperformance sensitivereliabilitycore logictestsdata accessapi surfaceconfigdocsboilerplateuimigrations
subtagsrequiredarray of ChunkSubtagFiner labels; each one's parent tag is also in `tags`authsecretscryptountrusted inputegressprivacytenant isolationtransport securityfile handlingabuse protectionaudit trailhot pathquery volumeunbounded workmetered costmemorycachingpayload sizeblockingindexingrenderingconcurrencyerror handlingretriestimeoutspartial failurefallbackscleanupobservabilitymoneystate machineai prompttimeparsingvalidationalgorithmbusiness ruledestructive writetransactionraw querypublic contractbreaking changeerror contractinfradependenciesfeature flagenvironmentaccess scopesirreversiblebackfilllockingdeploy orderingweakened testflaky riskaccessibilitycopyclient state
reviewScorerequiredintegermin 0 · max 100
startLinerequiredintegerNew-side start line, 1-based
endLinerequiredintegerNew-side end line, 1-based

FileChunks

NameTypeDescription
filenamerequiredstring
chunksrequiredarray of CodeChunk

NewComment

NameTypeDescription
filenamerequiredstring
lineinteger | nullLine number; null = file-level comment
sidestring | nullDiff side the comment anchors to ("new" = added/context line, "old" = deleted line). Defaults to "new" for line comments.newoldnull
startLineinteger | nullFirst line of a multi-line comment (GitHub's start_line); `line` is the last. Must come before `line` on the same side, or be on the "old" side when `line` is on the "new" side.
startSidestring | nullDiff side of `startLine`; defaults to `side`.newoldnull
bodyrequiredstringmax length 60000
convictionstring | nullOptional reviewer signal — how sure the reviewer islowmediumhighnull
importancestring | nullOptional reviewer signal — how much the comment matters. When set, synced to GitHub as a compact footer on the comment.nitminormajorblockernull

Comment

NameTypeDescription
idrequiredstring
filenamerequiredstring
linerequiredinteger | null
sidestring | nullDiff side the comment is anchored to; null for legacy commentsnewoldnull
startLineinteger | nullFirst line of a multi-line comment; null for a single line
startSidestring | nullnewoldnull
bodyrequiredstring
convictionstring | nullHow sure the reviewer is; null when unsetlowmediumhighnull
importancestring | nullHow much the comment matters; null when unsetnitminormajorblockernull
createdAtrequiredintegerEpoch milliseconds
authorNamerequiredstringDisplay name of the commenting user (the API key creator for API-key-created comments)
githubCommentIdstring | nullGitHub-side comment id (string) when synced; null otherwise

Guidance

NameTypeDescription
recommendationrequiredstringapprovecommentrequest-changesskip
headlinerequiredstring
bulletsrequiredarray of string

EvidenceActionPlanRequest

NameTypeDescription
protocolrequiredinteger1
headSharequiredstringThe pull request head the job ran for (40 hex characters)
checkoutrequiredstringWhether the job checked out the head itself or GitHub's merge commitheadmerge
checkoutSharequiredstring
indexrequiredobjectThe evidence runner's index of the checkout (tests, imports, routes)
actionobject
authoredTestsrequiredbooleanThe workflow's `authored-tests` input. False, GitApprove writes no tests for this job (it may still use the repository's own); items only a new test could show are reported as "not produced: authored tests disabled in this workflow".

EvidenceAuthoringStep

One step of GitApprove's authoring agent for its test executor.

NameTypeDescription
roundrequiredinteger
filesrequiredarray of EvidenceAuthoredFileThe agent's test files as they are now; write them over the checkout of each revision a run needs.
discardrequiredarray of stringAuthored files the agent deleted; delete them from the checkouts.
runsrequiredarray of objectTest runs to do, in order (at most 4). Empty with `final` false means report back at once.
finalrequiredbooleanWith `final`, `accept` and `include` hold the tests to run on both revisions.
acceptrequiredarray of EvidenceAuthoredFileWith `final`, the test files the agent kept.
includerequiredarray of stringWith `final`, the repository's own tests the agent used that the plan did not list.

EvidenceAuthoredFile

NameTypeDescription
pathrequiredstringA reserved `gitapprove-evidence` file name beside the tests it belongs with.
contentrequiredstring

EvidenceActionAuthorRequest

NameTypeDescription
protocolrequiredinteger1
runIdrequiredstring
headSharequiredstring
roundrequiredinteger
indexrequiredobjectThe same index the plan was made from.
runsrequiredarray of EvidenceActionUploadSide + objectOne entry per run of the step, by its id.

EvidenceActionPlan

NameTypeDescription
authoringanyThe authoring agent's first step, or null when the run has no agent.
skiprequiredboolean
reasonstringWith skip, why there is nothing to run
runIdstring
reviewUrlstring
baseShastring
headShastring
filesarray of stringTest files to run
leftarray of object
timeoutMsinteger
performanceRunsintegermin 0 · max 3
variablesarray of objectThe organization's plain evidence variables (secret ones are never sent)
withheldarray of object
limitsobject

EvidenceActionUploadSide

NameTypeDescription
filesrequiredarray of object
durationMsrequiredinteger

EvidenceActionResultsRequest

NameTypeDescription
protocolrequiredinteger1
runIdrequiredstring
headSharequiredstring
indexrequiredobjectThe same index the plan was made from
headrequiredEvidenceActionResultsSide
baserequiredany
uploadedarray of objectAbsent on the first call. On the second, what was uploaded to each issued URL, with each part's ETag for a multipart upload.
baseErrorstring | null
baseTestsrequiredarray of string
notesarray of string

EvidenceActionResultsSide

NameTypeDescription
manifestrequiredstringThe revision's manifest.json, as text (at most 4 MiB)
artifactsrequiredarray of objectEach artifact by name and size; the bytes go to the URLs the first call answers with
durationMsrequiredinteger

EvidenceActionUploadTickets

NameTypeDescription
uploadrequiredbooleantrue
runIdrequiredstring
uploadsrequiredarray of object

EvidenceActionResults

NameTypeDescription
runIdstring
statusstring
reasonstring | null
reviewUrlstring
minutesinteger
testsobject
storedinteger

EvidenceStatus

NameTypeDescription
enabledrequiredboolean
evidenceSourcestringWhere the organization's new evidence comes from.sandboxgithub-actionsboth
headShastring
previewLinksarray of object
runobject | null

EvidenceCaptures

NameTypeDescription
itemsarray of objectWhat GitApprove's authoring agent was asked to show for the changed chunks in the range, each with the captures (by id, from `captures`) that show it and the test behind them, or the reason it is not shown.
runStatusrequiredstring | null
partialrequiredboolean
sourcestring | nullWhere the tests behind these captures ran (`sandbox` or `github-actions`); null when there are none.
capturesrequiredarray of object

EvidencePerfSide

Median, sample count and spread (max minus min) of one revision's measured runs; null when nothing was measured.

NameTypeDescription
medianrequirednumber
nrequiredinteger
spreadrequirednumber

SyncResult

NameTypeDescription
okrequiredboolean
orgIdrequiredstring
reposrequiredinteger
prsrequiredinteger
lastSyncedAtrequiredintegerEpoch milliseconds

BillingStatus

NameTypeDescription
staterequiredstringSubscription statetrialtrialingactivepast_dueexpiredcanceled
seatsrequiredinteger
trialEndsAtrequiredinteger | nullEpoch milliseconds; null when not trialing
allowedrequiredbooleanTrue when the org may use paid features

Try it live

Paste an API key, pick an endpoint and send a real request to this server. Organization admins create keys on the Team page.

Try it out

no key

Fire live requests against this server. The key never leaves your browser except as the request's bearer token.

Loading API spec…