Developers
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.
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.
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."
}| get | /api/v1/prs | List PRs for the key's org |
| get | /api/v1/prs/{id} | PR detail with per-file change stats |
| get | /api/v1/prs/{id}/guidance | Reviewer guidance for a PR |
| get | /api/v1/prs/{id}/evidence | Evidence run status for a PR (evidence beta) |
| get | /api/v1/prs/{id}/evidence/captures | Evidence captures for a file range (evidence beta) |
| get | /api/v1/prs/{id}/chunks | Tagged code chunks per file |
| get | /api/v1/prs/{id}/comments | List enriched comments on a PR |
| post | /api/v1/prs/{id}/comments | Post a comment on a PR |
| post | /api/v1/sync | Trigger a full PR sync for the key's org |
| get | /api/v1/billing/status | Subscription state for the key's org |
| get | /api/v1/audit | The key's org audit trail, newest first (High, BYOK and Passthrough plans) |
| get | /api/v1/evidence/env-vars | List the org's evidence variables |
| post | /api/v1/evidence/env-vars | Create 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}/rotate | Set a new value for an evidence variable |
| get | /api/v1/evidence/env-vars/{varId}/history | Every value an evidence variable has had (never the values) |
| post | /api/v1/evidence/env-vars/bulk-rotate | Set new values for several evidence variables at once |
| get | /api/v1/evidence/registries | List the org's private registries |
| post | /api/v1/evidence/registries | Add 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}/rotate | Set a new credential for a private registry |
| get | /api/v1/evidence/private-dependencies | Read the org's private dependency repositories |
| put | /api/v1/evidence/private-dependencies | Set the org's private dependency repositories |
| get | /api/v1/evidence/test-network | Read the org's sandbox test network |
| put | /api/v1/evidence/test-network | Set the org's sandbox test network |
| post | /api/v1/evidence/action/plan | Ask which tests the GitApprove/evidence action should run |
| post | /api/v1/evidence/action/author | Report the runs GitApprove's authoring agent asked for |
| post | /api/v1/evidence/action/results | Upload what the planned tests produced |
Pull request listings and details
get/api/v1/prs
| Name | In | Type | Description |
|---|---|---|---|
limit | query | integer | min 1 · max 100 · default 50 |
cursor | query | string | Opaque nextCursor from the preceding page. Keep filters unchanged. |
number | query | integer | min 1 |
curl "https://gitapprove.com/api/v1/prs?limit=50" \
-H "Authorization: Bearer $GITAPPROVE_API_KEY"200PRs ordered by creation time and ID, newest first
| Name | Type | Description |
|---|---|---|
itemsrequired | array of PRSummary | |
nextCursorrequired | string | 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
get/api/v1/prs/{id}
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | GitApprove PR id (opaque string) |
curl "https://gitapprove.com/api/v1/prs/PR_ID" \
-H "Authorization: Bearer $GITAPPROVE_API_KEY"200PR detail
| Name | Type | Description |
|---|---|---|
idrequired | string | |
numberrequired | integer | |
titlerequired | string | |
staterequired | string | openmergedclosed |
repoFullName | string | null | |
authorName | string | |
additions | integer | |
deletions | integer | |
changedFiles | integer | |
ciStatus | string | passingfailingpending |
headBranch | string | |
updatedAtrequired | integer | Epoch milliseconds |
description | string | null | |
authorAvatar | string | null | |
baseBranch | string | |
headSha | string | |
createdAt | integer | Epoch milliseconds |
files | array 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
404PR not found (or not in the key's org)
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.
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | GitApprove PR id (opaque string) |
curl "https://gitapprove.com/api/v1/prs/PR_ID/guidance" \
-H "Authorization: Bearer $GITAPPROVE_API_KEY"200Guidance
| Name | Type | Description |
|---|---|---|
recommendationrequired | string | approvecommentrequest-changesskip |
headlinerequired | string | |
bulletsrequired | array of string |
{
"recommendation": "approve",
"headline": "Request changes: the new limiter is untested",
"bullets": [
"string"
]
}401Missing, invalid, or revoked API key
404PR not found (or not in the key's org)
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.
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | GitApprove PR id (opaque string) |
curl "https://gitapprove.com/api/v1/prs/PR_ID/evidence" \
-H "Authorization: Bearer $GITAPPROVE_API_KEY"200Evidence status
| Name | Type | Description |
|---|---|---|
enabledrequired | boolean | |
evidenceSource | string | Where the organization's new evidence comes from.sandboxgithub-actionsboth |
headSha | string | |
previewLinks | array of object | |
run | object | 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
404PR not found (or not in the key's org)
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.
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | GitApprove PR id (opaque string) |
filerequired | query | string | Repository-relative path of a file in the PR |
startrequired | query | integer | First line of the range (new side)min 1 |
endrequired | query | integer | Last line of the range, not before `start`min 1 |
curl "https://gitapprove.com/api/v1/prs/PR_ID/evidence/captures?file=string&start=1&end=1" \
-H "Authorization: Bearer $GITAPPROVE_API_KEY"200Captures overlapping the range
| Name | Type | Description |
|---|---|---|
items | array of object | What 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. |
runStatusrequired | string | null | |
partialrequired | boolean | |
source | string | null | Where the tests behind these captures ran (`sandbox` or `github-actions`); null when there are none. |
capturesrequired | array 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
404PR not found (or not in the key's org)
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.
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | GitApprove PR id (opaque string) |
tag | query | array of string | Chunk tag to filter by (repeatable, OR semantics)security sensitiveperformance sensitivereliabilitycore logictestsdata accessapi surfaceconfigdocsboilerplateuimigrations |
subtag | query | array of ChunkSubtag | Chunk 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 |
curl "https://gitapprove.com/api/v1/prs/PR_ID/chunks?tag=security%20sensitive" \
-H "Authorization: Bearer $GITAPPROVE_API_KEY"200Chunks grouped by file
array of FileChunks
| Name | Type | Description |
|---|---|---|
filenamerequired | string | |
chunksrequired | array 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
401Missing, invalid, or revoked API key
404PR not found (or not in the key's org)
Line-level review comments
get/api/v1/prs/{id}/comments
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | GitApprove PR id (opaque string) |
curl "https://gitapprove.com/api/v1/prs/PR_ID/comments" \
-H "Authorization: Bearer $GITAPPROVE_API_KEY"200Comments, oldest first
array of Comment
| Name | Type | Description |
|---|---|---|
idrequired | string | |
filenamerequired | string | |
linerequired | integer | null | |
side | string | null | Diff side the comment is anchored to; null for legacy commentsnewoldnull |
startLine | integer | null | First line of a multi-line comment; null for a single line |
startSide | string | null | newoldnull |
bodyrequired | string | |
conviction | string | null | How sure the reviewer is; null when unsetlowmediumhighnull |
importance | string | null | How much the comment matters; null when unsetnitminormajorblockernull |
createdAtrequired | integer | Epoch milliseconds |
authorNamerequired | string | Display name of the commenting user (the API key creator for API-key-created comments) |
githubCommentId | string | null | GitHub-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
404PR not found (or not in the key's org)
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.
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | GitApprove PR id (opaque string) |
X-GitHub-Tokenrequired | header | string | GitHub user access token belonging to the API key creator. Demo mode does not require this token. |
| Name | Type | Description |
|---|---|---|
filenamerequired | string | |
line | integer | null | Line number; null = file-level comment |
side | string | null | Diff side the comment anchors to ("new" = added/context line, "old" = deleted line). Defaults to "new" for line comments.newoldnull |
startLine | integer | null | First 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. |
startSide | string | null | Diff side of `startLine`; defaults to `side`.newoldnull |
bodyrequired | string | max length 60000 |
conviction | string | null | Optional reviewer signal — how sure the reviewer islowmediumhighnull |
importance | string | null | Optional 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"
}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."}'201Created comment
| Name | Type | Description |
|---|---|---|
idrequired | string | |
filenamerequired | string | |
linerequired | integer | null | |
side | string | null | Diff side the comment is anchored to; null for legacy commentsnewoldnull |
startLine | integer | null | First line of a multi-line comment; null for a single line |
startSide | string | null | newoldnull |
bodyrequired | string | |
conviction | string | null | How sure the reviewer is; null when unsetlowmediumhighnull |
importance | string | null | How much the comment matters; null when unsetnitminormajorblockernull |
createdAtrequired | integer | Epoch milliseconds |
authorNamerequired | string | Display name of the commenting user (the API key creator for API-key-created comments) |
githubCommentId | string | null | GitHub-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
401Missing, 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)
429Rate limit exceeded for this API key
GitHub sync triggers
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.
curl -X POST "https://gitapprove.com/api/v1/sync" \
-H "Authorization: Bearer $GITAPPROVE_API_KEY"200Sync result
| Name | Type | Description |
|---|---|---|
okrequired | boolean | |
orgIdrequired | string | |
reposrequired | integer | |
prsrequired | integer | |
lastSyncedAtrequired | integer | Epoch milliseconds |
{
"ok": true,
"orgId": "org_41d9e0",
"repos": 3,
"prs": 27,
"lastSyncedAt": 1761700000000
}401Missing, 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
Subscription state
get/api/v1/billing/status
curl "https://gitapprove.com/api/v1/billing/status" \
-H "Authorization: Bearer $GITAPPROVE_API_KEY"200Billing status
| Name | Type | Description |
|---|---|---|
staterequired | string | Subscription statetrialtrialingactivepast_dueexpiredcanceled |
seatsrequired | integer | |
trialEndsAtrequired | integer | null | Epoch milliseconds; null when not trialing |
allowedrequired | boolean | True when the org may use paid features |
{
"state": "trial",
"seats": 8,
"trialEndsAt": 1761700000000,
"allowed": true
}401Missing, invalid, or revoked API key
The organization audit trail (audit:read scope)
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.
| Name | In | Type | Description |
|---|---|---|---|
limit | query | integer | min 1 · max 100 · default 50 |
cursor | query | string | Opaque nextCursor from the preceding page. Keep filters unchanged. |
actor | query | string | A user id, or an API key or system actor id |
action | query | string | Event type, for example `credential.ai_key.set` |
category | query | string | reviewmembershipcredentialsorg_settingsbillingdatasystem |
target_type | query | string | |
target_id | query | string | |
from | query | integer | Earliest event time, epoch milliseconds |
to | query | integer | Latest event time, epoch milliseconds |
curl "https://gitapprove.com/api/v1/audit?limit=50" \
-H "Authorization: Bearer $GITAPPROVE_API_KEY"200Audit events, newest first
| Name | Type | Description |
|---|---|---|
api_versionrequired | integer | |
itemsrequired | array of AuditEvent | |
nextCursorrequired | string | 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
403The key lacks the audit:read scope, or the plan does not include the audit log
429Rate limit exceeded for this API key
Environment variables for evidence test runs, and their rotation (evidence:read to list and read history, evidence:write to change)
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.
curl "https://gitapprove.com/api/v1/evidence/env-vars" \
-H "Authorization: Bearer $GITAPPROVE_API_KEY"200The variables, by name
| Name | Type | Description |
|---|---|---|
variablesrequired | array 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
403The key has neither the evidence:read nor the evidence:write scope
429Rate limit exceeded for this API key
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.
| Name | Type | Description |
|---|---|---|
namerequired | string | max length 128 |
valuerequired | string | At most 32 KiB; may be empty |
secret | boolean | default true |
repositories | array of string | null | Repository full names (owner/name) or ids; null or absent means all |
description | string | null | max length 300 |
expiresAt | integer | null | |
rotateAfterDays | integer | null | min 1 · max 3650 |
{
"name": "string",
"value": "string",
"secret": true,
"repositories": [
"string"
],
"description": "Limits failed sign-ins per IP address.",
"expiresAt": 1761700000000,
"rotateAfterDays": 1
}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"}'201Created variable
| Name | Type | Description |
|---|---|---|
idrequired | string | |
namerequired | string | |
secretrequired | boolean | Write-only value, redacted from results, never given to pull requests from forks |
valuerequired | string | null | A plain variable's value; always null for a secret |
valueReadablerequired | boolean | False when the stored value cannot be decrypted (the encryption key changed); rotate it |
repositoriesrequired | array of string | null | Repository full names; null means every repository in the organization |
descriptionrequired | string | null | |
versionrequired | integer | Goes up each time the value is set |
fingerprintrequired | string | Keyed hash of the value (12 hex characters); shows a change, reveals nothing |
valueSetAtrequired | integer | When the current value was set (epoch ms) |
expiresAtrequired | integer | null | When the value stops working (epoch ms) |
rotateAfterDaysrequired | integer | null | Rotation policy |
rotationStatusrequired | string | due-soon is within 7 days of expiry or of the policy's date; an expired variable is not given to runsokdue-soonoverdueexpired |
createdByrequired | string | null | |
createdAtrequired | integer | |
updatedByrequired | string | null | |
updatedAtrequired | integer |
{
"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
401Missing, 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
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.
| Name | In | Type | Description |
|---|---|---|---|
varIdrequired | path | string | Evidence variable id (opaque string) |
| Name | Type | Description |
|---|---|---|
name | string | max length 128 |
value | string | Plain variables only |
secret | boolean | Only true is accepted for a variable that is already secret |
repositories | array of string | null | |
description | string | null | max length 300 |
expiresAt | integer | null | |
rotateAfterDays | integer | null | min 1 · max 3650 |
{
"name": "string",
"value": "string",
"secret": true,
"repositories": [
"string"
],
"description": "Limits failed sign-ins per IP address.",
"expiresAt": 1761700000000,
"rotateAfterDays": 1
}curl -X PATCH "https://gitapprove.com/api/v1/evidence/env-vars/VARID" \
-H "Authorization: Bearer $GITAPPROVE_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'200Updated variable
| Name | Type | Description |
|---|---|---|
idrequired | string | |
namerequired | string | |
secretrequired | boolean | Write-only value, redacted from results, never given to pull requests from forks |
valuerequired | string | null | A plain variable's value; always null for a secret |
valueReadablerequired | boolean | False when the stored value cannot be decrypted (the encryption key changed); rotate it |
repositoriesrequired | array of string | null | Repository full names; null means every repository in the organization |
descriptionrequired | string | null | |
versionrequired | integer | Goes up each time the value is set |
fingerprintrequired | string | Keyed hash of the value (12 hex characters); shows a change, reveals nothing |
valueSetAtrequired | integer | When the current value was set (epoch ms) |
expiresAtrequired | integer | null | When the value stops working (epoch ms) |
rotateAfterDaysrequired | integer | null | Rotation policy |
rotationStatusrequired | string | due-soon is within 7 days of expiry or of the policy's date; an expired variable is not given to runsokdue-soonoverdueexpired |
createdByrequired | string | null | |
createdAtrequired | integer | |
updatedByrequired | string | null | |
updatedAtrequired | integer |
{
"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
401Missing, 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/api/v1/evidence/env-vars/{varId}
| Name | In | Type | Description |
|---|---|---|---|
varIdrequired | path | string | Evidence variable id (opaque string) |
curl -X DELETE "https://gitapprove.com/api/v1/evidence/env-vars/VARID" \
-H "Authorization: Bearer $GITAPPROVE_API_KEY"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.
| Name | In | Type | Description |
|---|---|---|---|
varIdrequired | path | string | Evidence variable id (opaque string) |
| Name | Type | Description |
|---|---|---|
valuerequired | string | |
expiresAt | integer | null | Expiry of the new value; absent means none |
{
"value": "string",
"expiresAt": 1761700000000
}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"}'200The variable with its new version
| Name | Type | Description |
|---|---|---|
idrequired | string | |
namerequired | string | |
secretrequired | boolean | Write-only value, redacted from results, never given to pull requests from forks |
valuerequired | string | null | A plain variable's value; always null for a secret |
valueReadablerequired | boolean | False when the stored value cannot be decrypted (the encryption key changed); rotate it |
repositoriesrequired | array of string | null | Repository full names; null means every repository in the organization |
descriptionrequired | string | null | |
versionrequired | integer | Goes up each time the value is set |
fingerprintrequired | string | Keyed hash of the value (12 hex characters); shows a change, reveals nothing |
valueSetAtrequired | integer | When the current value was set (epoch ms) |
expiresAtrequired | integer | null | When the value stops working (epoch ms) |
rotateAfterDaysrequired | integer | null | Rotation policy |
rotationStatusrequired | string | due-soon is within 7 days of expiry or of the policy's date; an expired variable is not given to runsokdue-soonoverdueexpired |
createdByrequired | string | null | |
createdAtrequired | integer | |
updatedByrequired | string | null | |
updatedAtrequired | integer |
{
"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
401Missing, 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
get/api/v1/evidence/env-vars/{varId}/history
| Name | In | Type | Description |
|---|---|---|---|
varIdrequired | path | string | Evidence variable id (opaque string) |
curl "https://gitapprove.com/api/v1/evidence/env-vars/VARID/history" \
-H "Authorization: Bearer $GITAPPROVE_API_KEY"200Versions, newest first
| Name | Type | Description |
|---|---|---|
versionsrequired | array 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
403The key has neither the evidence:read nor the evidence:write scope
404No such variable in the key's org
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.
| Name | Type | Description |
|---|---|---|
itemsrequired | array of object |
{
"items": [
{
"id": "pr_8f3a2c",
"value": "string",
"expiresAt": 1761700000000
}
]
}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}]}'200What was rotated
| Name | Type | Description |
|---|---|---|
rotatedrequired | array of EvidenceEnvVar | |
failedrequired | array 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
401Missing, 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
Credentials for private package registries the evidence dependency install uses (evidence:read to list, evidence:write to change)
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.
curl "https://gitapprove.com/api/v1/evidence/registries" \
-H "Authorization: Bearer $GITAPPROVE_API_KEY"200The registries
| Name | Type | Description |
|---|---|---|
registriesrequired | array 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
403The key has neither the evidence:read nor the evidence:write scope
429Rate limit exceeded for this API key
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.
| Name | Type | Description |
|---|---|---|
hostrequired | string | |
pathPrefix | string | null | Required (the repository's path, at least one segment), except on registry.npmjs.org where it must be absentmax length 200 |
ecosystemrequired | EvidenceRegistryEcosystem | What the registry serves. `go` registries are asked before proxy.golang.org; `npm` scopes are required on registry.npmjs.org.npmpypimavennugetrubygemscomposergoother |
scopes | array of string | |
authrequired | 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. |
description | string | null | max 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."
}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"}}'201Created registry
| Name | Type | Description |
|---|---|---|
idrequired | string | |
hostrequired | string | |
pathPrefixrequired | string | null | The repository's path on the host; requests under it only. Null only on registry.npmjs.org (npm scopes decide) |
ecosystemrequired | EvidenceRegistryEcosystem | What the registry serves. `go` registries are asked before proxy.golang.org; `npm` scopes are required on registry.npmjs.org.npmpypimavennugetrubygemscomposergoother |
authTyperequired | string | bearerbasicheader |
headerNamerequired | string | null | The custom header's name (authType header); not secret |
scopesrequired | array of string | npm scopes (`@acme`) the credential is for, or Go module path patterns (GONOSUMDB) |
descriptionrequired | string | null | |
versionrequired | integer | Goes up each time the credential is set |
fingerprintrequired | string | Keyed hash of the credential (12 hex characters); shows a change, reveals nothing |
credentialReadablerequired | boolean | False when the stored credential cannot be decrypted (the encryption key changed); rotate it |
valueSetAtrequired | integer | When the current credential was set (epoch ms) |
createdByrequired | string | null | |
createdAtrequired | integer | |
updatedByrequired | string | null | |
updatedAtrequired | integer |
{
"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
401Missing, 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
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.
| Name | In | Type | Description |
|---|---|---|---|
registryIdrequired | path | string | Private registry id (opaque string) |
| Name | Type | Description |
|---|---|---|
pathPrefix | string | null | max length 200 |
ecosystem | EvidenceRegistryEcosystem | What the registry serves. `go` registries are asked before proxy.golang.org; `npm` scopes are required on registry.npmjs.org.npmpypimavennugetrubygemscomposergoother |
scopes | array of string | |
description | string | null | max length 300 |
auth | 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. |
{
"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"
}
}curl -X PATCH "https://gitapprove.com/api/v1/evidence/registries/REGISTRYID" \
-H "Authorization: Bearer $GITAPPROVE_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'200Updated registry
| Name | Type | Description |
|---|---|---|
idrequired | string | |
hostrequired | string | |
pathPrefixrequired | string | null | The repository's path on the host; requests under it only. Null only on registry.npmjs.org (npm scopes decide) |
ecosystemrequired | EvidenceRegistryEcosystem | What the registry serves. `go` registries are asked before proxy.golang.org; `npm` scopes are required on registry.npmjs.org.npmpypimavennugetrubygemscomposergoother |
authTyperequired | string | bearerbasicheader |
headerNamerequired | string | null | The custom header's name (authType header); not secret |
scopesrequired | array of string | npm scopes (`@acme`) the credential is for, or Go module path patterns (GONOSUMDB) |
descriptionrequired | string | null | |
versionrequired | integer | Goes up each time the credential is set |
fingerprintrequired | string | Keyed hash of the credential (12 hex characters); shows a change, reveals nothing |
credentialReadablerequired | boolean | False when the stored credential cannot be decrypted (the encryption key changed); rotate it |
valueSetAtrequired | integer | When the current credential was set (epoch ms) |
createdByrequired | string | null | |
createdAtrequired | integer | |
updatedByrequired | string | null | |
updatedAtrequired | integer |
{
"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
401Missing, 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/api/v1/evidence/registries/{registryId}
| Name | In | Type | Description |
|---|---|---|---|
registryIdrequired | path | string | Private registry id (opaque string) |
curl -X DELETE "https://gitapprove.com/api/v1/evidence/registries/REGISTRYID" \
-H "Authorization: Bearer $GITAPPROVE_API_KEY"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.
| Name | In | Type | Description |
|---|---|---|---|
registryIdrequired | path | string | Private registry id (opaque string) |
| Name | Type | Description |
|---|---|---|
authrequired | 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. |
{
"auth": {
"type": "bearer",
"token": "string",
"username": "string",
"password": "string",
"name": "string",
"value": "string"
}
}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"}}'200The registry with its new version
| Name | Type | Description |
|---|---|---|
idrequired | string | |
hostrequired | string | |
pathPrefixrequired | string | null | The repository's path on the host; requests under it only. Null only on registry.npmjs.org (npm scopes decide) |
ecosystemrequired | EvidenceRegistryEcosystem | What the registry serves. `go` registries are asked before proxy.golang.org; `npm` scopes are required on registry.npmjs.org.npmpypimavennugetrubygemscomposergoother |
authTyperequired | string | bearerbasicheader |
headerNamerequired | string | null | The custom header's name (authType header); not secret |
scopesrequired | array of string | npm scopes (`@acme`) the credential is for, or Go module path patterns (GONOSUMDB) |
descriptionrequired | string | null | |
versionrequired | integer | Goes up each time the credential is set |
fingerprintrequired | string | Keyed hash of the credential (12 hex characters); shows a change, reveals nothing |
credentialReadablerequired | boolean | False when the stored credential cannot be decrypted (the encryption key changed); rotate it |
valueSetAtrequired | integer | When the current credential was set (epoch ms) |
createdByrequired | string | null | |
createdAtrequired | integer | |
updatedByrequired | string | null | |
updatedAtrequired | integer |
{
"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
401Missing, 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
Which of the GitHub App installation's repositories the evidence dependency install may read (evidence:read to read, evidence:write to change)
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.
curl "https://gitapprove.com/api/v1/evidence/private-dependencies" \
-H "Authorization: Bearer $GITAPPROVE_API_KEY"200The setting and the repositories to choose from
| Name | Type | Description |
|---|---|---|
allRepositoriesrequired | boolean | The install's token reads every repository of the installation, and GitHub Packages |
repositoriesrequired | array of string | Repositories (`owner/name`) the install's token reads besides the pull request's own |
availablerequired | array of string | The installation's repositories to choose from |
{
"allRepositories": true,
"repositories": [
"acme/shared-lib"
],
"available": [
"string"
]
}401Missing, invalid, or revoked API key
403The key has neither the evidence:read nor the evidence:write scope
429Rate limit exceeded for this API key
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.
EvidencePrivateDependenciesUpdate
| Name | Type | Description |
|---|---|---|
allRepositories | boolean | |
repositories | array of string |
{
"allRepositories": true,
"repositories": [
"string"
]
}curl -X PUT "https://gitapprove.com/api/v1/evidence/private-dependencies" \
-H "Authorization: Bearer $GITAPPROVE_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'200The new setting
| Name | Type | Description |
|---|---|---|
allRepositoriesrequired | boolean | The install's token reads every repository of the installation, and GitHub Packages |
repositoriesrequired | array of string | Repositories (`owner/name`) the install's token reads besides the pull request's own |
availablerequired | array of string | The installation's repositories to choose from |
{
"allRepositories": true,
"repositories": [
"acme/shared-lib"
],
"available": [
"string"
]
}400Invalid request
401Missing, invalid, or revoked API key
403The key lacks the evidence:write scope
429Rate limit exceeded
Whether the tests in GitApprove's sandbox may reach the network, and which hosts (evidence:read to read, evidence:write to change)
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.
curl "https://gitapprove.com/api/v1/evidence/test-network" \
-H "Authorization: Bearer $GITAPPROVE_API_KEY"200The setting
| Name | Type | Description |
|---|---|---|
moderequired | string | `none`: no outbound network for sandbox tests (default)noneallowlist |
hostsrequired | array of string | |
registriesrequired | array of string | The public package registries also allowed with `allowlist` |
warningrequired | string | null | Set when `hosts` holds `*` |
{
"mode": "none",
"hosts": [
"api.example.com",
"*.cdn.example.com"
],
"registries": [
"string"
],
"warning": "string"
}401Missing, invalid, or revoked API key
403The key has neither the evidence:read nor the evidence:write scope
429Rate limit exceeded for this API key
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.
| Name | Type | Description |
|---|---|---|
mode | string | noneallowlist |
hosts | array of string |
{
"mode": "none",
"hosts": [
"string"
]
}curl -X PUT "https://gitapprove.com/api/v1/evidence/test-network" \
-H "Authorization: Bearer $GITAPPROVE_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'200The new setting
| Name | Type | Description |
|---|---|---|
moderequired | string | `none`: no outbound network for sandbox tests (default)noneallowlist |
hostsrequired | array of string | |
registriesrequired | array of string | The public package registries also allowed with `allowlist` |
warningrequired | string | null | Set when `hosts` holds `*` |
{
"mode": "none",
"hosts": [
"api.example.com",
"*.cdn.example.com"
],
"registries": [
"string"
],
"warning": "string"
}400Invalid request
401Missing, invalid, or revoked API key
403The key lacks the evidence:write scope
429Rate limit exceeded
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)
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.
| Name | Type | Description |
|---|---|---|
protocolrequired | integer | 1 |
headSharequired | string | The pull request head the job ran for (40 hex characters) |
checkoutrequired | string | Whether the job checked out the head itself or GitHub's merge commitheadmerge |
checkoutSharequired | string | |
indexrequired | object | The evidence runner's index of the checkout (tests, imports, routes) |
action | object | |
authoredTestsrequired | boolean | The 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
}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}'200The plan, or why there is nothing to run
| Name | Type | Description |
|---|---|---|
authoring | any | The authoring agent's first step, or null when the run has no agent. |
skiprequired | boolean | |
reason | string | With skip, why there is nothing to run |
runId | string | |
reviewUrl | string | |
baseSha | string | |
headSha | string | |
files | array of string | Test files to run |
left | array of object | |
timeoutMs | integer | |
performanceRuns | integer | min 0 · max 3 |
variables | array of object | The organization's plain evidence variables (secret ones are never sent) |
withheld | array of object | |
limits | object |
{
"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
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
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.
| Name | Type | Description |
|---|---|---|
protocolrequired | integer | 1 |
runIdrequired | string | |
headSharequired | string | |
roundrequired | integer | |
indexrequired | object | The same index the plan was made from. |
runsrequired | array of EvidenceActionUploadSide + object | One 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"
}
]
}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"}]}'200The agent's next step
| Name | Type | Description |
|---|---|---|
roundrequired | integer | |
filesrequired | array of EvidenceAuthoredFile | The agent's test files as they are now; write them over the checkout of each revision a run needs. |
discardrequired | array of string | Authored files the agent deleted; delete them from the checkouts. |
runsrequired | array of object | Test runs to do, in order (at most 4). Empty with `final` false means report back at once. |
finalrequired | boolean | With `final`, `accept` and `include` hold the tests to run on both revisions. |
acceptrequired | array of EvidenceAuthoredFile | With `final`, the test files the agent kept. |
includerequired | array of string | With `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
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
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".
| Name | Type | Description |
|---|---|---|
protocolrequired | integer | 1 |
runIdrequired | string | |
headSharequired | string | |
indexrequired | object | The same index the plan was made from |
headrequired | EvidenceActionResultsSide | |
baserequired | any | |
uploaded | array of object | Absent on the first call. On the second, what was uploaded to each issued URL, with each part's ETag for a multipart upload. |
baseError | string | null | |
baseTestsrequired | array of string | |
notes | array 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"
]
}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"]}'200The stored run
| Name | Type | Description |
|---|---|---|
runId | string | |
status | string | |
reason | string | null | |
reviewUrl | string | |
minutes | integer | |
tests | object | |
stored | integer |
{
"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)
| Name | Type | Description |
|---|---|---|
uploadrequired | boolean | true |
runIdrequired | string | |
uploadsrequired | array of object |
{
"upload": true,
"runId": "string",
"uploads": [
{
"side": "head",
"name": "string",
"url": "string",
"parts": [
{
"partNumber": 1,
"url": "string",
"size": 1
}
]
}
]
}400Invalid request
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
| Name | Type | Description |
|---|---|---|
okrequired | boolean |
| Name | Type | Description |
|---|---|---|
idrequired | string | |
namerequired | string | |
secretrequired | boolean | Write-only value, redacted from results, never given to pull requests from forks |
valuerequired | string | null | A plain variable's value; always null for a secret |
valueReadablerequired | boolean | False when the stored value cannot be decrypted (the encryption key changed); rotate it |
repositoriesrequired | array of string | null | Repository full names; null means every repository in the organization |
descriptionrequired | string | null | |
versionrequired | integer | Goes up each time the value is set |
fingerprintrequired | string | Keyed hash of the value (12 hex characters); shows a change, reveals nothing |
valueSetAtrequired | integer | When the current value was set (epoch ms) |
expiresAtrequired | integer | null | When the value stops working (epoch ms) |
rotateAfterDaysrequired | integer | null | Rotation policy |
rotationStatusrequired | string | due-soon is within 7 days of expiry or of the policy's date; an expired variable is not given to runsokdue-soonoverdueexpired |
createdByrequired | string | null | |
createdAtrequired | integer | |
updatedByrequired | string | null | |
updatedAtrequired | integer |
| Name | Type | Description |
|---|---|---|
idrequired | string | |
hostrequired | string | |
pathPrefixrequired | string | null | The repository's path on the host; requests under it only. Null only on registry.npmjs.org (npm scopes decide) |
ecosystemrequired | EvidenceRegistryEcosystem | What the registry serves. `go` registries are asked before proxy.golang.org; `npm` scopes are required on registry.npmjs.org.npmpypimavennugetrubygemscomposergoother |
authTyperequired | string | bearerbasicheader |
headerNamerequired | string | null | The custom header's name (authType header); not secret |
scopesrequired | array of string | npm scopes (`@acme`) the credential is for, or Go module path patterns (GONOSUMDB) |
descriptionrequired | string | null | |
versionrequired | integer | Goes up each time the credential is set |
fingerprintrequired | string | Keyed hash of the credential (12 hex characters); shows a change, reveals nothing |
credentialReadablerequired | boolean | False when the stored credential cannot be decrypted (the encryption key changed); rotate it |
valueSetAtrequired | integer | When the current credential was set (epoch ms) |
createdByrequired | string | null | |
createdAtrequired | integer | |
updatedByrequired | string | null | |
updatedAtrequired | integer |
What the registry serves. `go` registries are asked before proxy.golang.org; `npm` scopes are required on registry.npmjs.org.
npmpypimavennugetrubygemscomposergoother| Name | Type | Description |
|---|---|---|
registriesrequired | array of EvidenceRegistry |
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.
| Name | Type | Description |
|---|---|---|
typerequired | string | bearerbasicheader |
token | string | For bearer |
username | string | For basic; no ':' |
password | string | For basic |
name | string | For header: letters, digits and dashes |
value | string | For header |
| Name | Type | Description |
|---|---|---|
hostrequired | string | |
pathPrefix | string | null | Required (the repository's path, at least one segment), except on registry.npmjs.org where it must be absentmax length 200 |
ecosystemrequired | EvidenceRegistryEcosystem | What the registry serves. `go` registries are asked before proxy.golang.org; `npm` scopes are required on registry.npmjs.org.npmpypimavennugetrubygemscomposergoother |
scopes | array of string | |
authrequired | 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. |
description | string | null | max length 300 |
| Name | Type | Description |
|---|---|---|
pathPrefix | string | null | max length 200 |
ecosystem | EvidenceRegistryEcosystem | What the registry serves. `go` registries are asked before proxy.golang.org; `npm` scopes are required on registry.npmjs.org.npmpypimavennugetrubygemscomposergoother |
scopes | array of string | |
description | string | null | max length 300 |
auth | 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. |
| Name | Type | Description |
|---|---|---|
allRepositoriesrequired | boolean | The install's token reads every repository of the installation, and GitHub Packages |
repositoriesrequired | array of string | Repositories (`owner/name`) the install's token reads besides the pull request's own |
availablerequired | array of string | The installation's repositories to choose from |
| Name | Type | Description |
|---|---|---|
allRepositories | boolean | |
repositories | array of string |
| Name | Type | Description |
|---|---|---|
moderequired | string | `none`: no outbound network for sandbox tests (default)noneallowlist |
hostsrequired | array of string | |
registriesrequired | array of string | The public package registries also allowed with `allowlist` |
warningrequired | string | null | Set when `hosts` holds `*` |
| Name | Type | Description |
|---|---|---|
mode | string | noneallowlist |
hosts | array of string |
| Name | Type | Description |
|---|---|---|
authrequired | 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. |
| Name | Type | Description |
|---|---|---|
variablesrequired | array of EvidenceEnvVar |
| Name | Type | Description |
|---|---|---|
namerequired | string | max length 128 |
valuerequired | string | At most 32 KiB; may be empty |
secret | boolean | default true |
repositories | array of string | null | Repository full names (owner/name) or ids; null or absent means all |
description | string | null | max length 300 |
expiresAt | integer | null | |
rotateAfterDays | integer | null | min 1 · max 3650 |
| Name | Type | Description |
|---|---|---|
name | string | max length 128 |
value | string | Plain variables only |
secret | boolean | Only true is accepted for a variable that is already secret |
repositories | array of string | null | |
description | string | null | max length 300 |
expiresAt | integer | null | |
rotateAfterDays | integer | null | min 1 · max 3650 |
| Name | Type | Description |
|---|---|---|
valuerequired | string | |
expiresAt | integer | null | Expiry of the new value; absent means none |
| Name | Type | Description |
|---|---|---|
itemsrequired | array of object |
| Name | Type | Description |
|---|---|---|
rotatedrequired | array of EvidenceEnvVar | |
failedrequired | array of object |
| Name | Type | Description |
|---|---|---|
versionrequired | integer | |
fingerprintrequired | string | |
actionrequired | string | createrotate |
actorrequired | object | |
createdAtrequired | integer |
| Name | Type | Description |
|---|---|---|
versionsrequired | array of EvidenceEnvVarVersion |
| Name | Type | Description |
|---|---|---|
itemsrequired | array of PRSummary | |
nextCursorrequired | string | null |
| Name | Type | Description |
|---|---|---|
idrequired | string | |
org_idrequired | string | |
occurred_atrequired | integer | Epoch milliseconds |
actorrequired | object | |
actionrequired | string | |
categoryrequired | string | reviewmembershipcredentialsorg_settingsbillingdatasystem |
targetrequired | object | |
detailrequired | any | null | Redacted JSON describing what changed. Never contains secrets or review text. |
source_iprequired | string | null |
| Name | Type | Description |
|---|---|---|
api_versionrequired | integer | |
itemsrequired | array of AuditEvent | |
nextCursorrequired | string | null |
| Name | Type | Description |
|---|---|---|
errorrequired | string |
security sensitiveperformance sensitivereliabilitycore logictestsdata accessapi surfaceconfigdocsboilerplateuimigrationsA 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.
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| Name | Type | Description |
|---|---|---|
idrequired | string | |
numberrequired | integer | |
titlerequired | string | |
staterequired | string | openmergedclosed |
repoFullName | string | null | |
authorName | string | |
additions | integer | |
deletions | integer | |
changedFiles | integer | |
ciStatus | string | passingfailingpending |
headBranch | string | |
updatedAtrequired | integer | Epoch milliseconds |
| Name | Type | Description |
|---|---|---|
filenamerequired | string | |
statusrequired | string | addedmodifiedremovedrenamed |
additions | integer | |
deletions | integer | |
reviewValue | string | highmediumlow |
| Name | Type | Description |
|---|---|---|
idrequired | string | |
numberrequired | integer | |
titlerequired | string | |
staterequired | string | openmergedclosed |
repoFullName | string | null | |
authorName | string | |
additions | integer | |
deletions | integer | |
changedFiles | integer | |
ciStatus | string | passingfailingpending |
headBranch | string | |
updatedAtrequired | integer | Epoch milliseconds |
description | string | null | |
authorAvatar | string | null | |
baseBranch | string | |
headSha | string | |
createdAt | integer | Epoch milliseconds |
files | array of PRFileSummary |
| Name | Type | Description |
|---|---|---|
idrequired | string | Opaque chunk id (file id + chunk index) |
symbolrequired | string | Enclosing function/class/block or "module scope" |
tagsrequired | array of ChunkTag | security sensitiveperformance sensitivereliabilitycore logictestsdata accessapi surfaceconfigdocsboilerplateuimigrations |
subtagsrequired | array of ChunkSubtag | Finer 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 |
reviewScorerequired | integer | min 0 · max 100 |
startLinerequired | integer | New-side start line, 1-based |
endLinerequired | integer | New-side end line, 1-based |
| Name | Type | Description |
|---|---|---|
filenamerequired | string | |
chunksrequired | array of CodeChunk |
| Name | Type | Description |
|---|---|---|
filenamerequired | string | |
line | integer | null | Line number; null = file-level comment |
side | string | null | Diff side the comment anchors to ("new" = added/context line, "old" = deleted line). Defaults to "new" for line comments.newoldnull |
startLine | integer | null | First 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. |
startSide | string | null | Diff side of `startLine`; defaults to `side`.newoldnull |
bodyrequired | string | max length 60000 |
conviction | string | null | Optional reviewer signal — how sure the reviewer islowmediumhighnull |
importance | string | null | Optional reviewer signal — how much the comment matters. When set, synced to GitHub as a compact footer on the comment.nitminormajorblockernull |
| Name | Type | Description |
|---|---|---|
idrequired | string | |
filenamerequired | string | |
linerequired | integer | null | |
side | string | null | Diff side the comment is anchored to; null for legacy commentsnewoldnull |
startLine | integer | null | First line of a multi-line comment; null for a single line |
startSide | string | null | newoldnull |
bodyrequired | string | |
conviction | string | null | How sure the reviewer is; null when unsetlowmediumhighnull |
importance | string | null | How much the comment matters; null when unsetnitminormajorblockernull |
createdAtrequired | integer | Epoch milliseconds |
authorNamerequired | string | Display name of the commenting user (the API key creator for API-key-created comments) |
githubCommentId | string | null | GitHub-side comment id (string) when synced; null otherwise |
| Name | Type | Description |
|---|---|---|
recommendationrequired | string | approvecommentrequest-changesskip |
headlinerequired | string | |
bulletsrequired | array of string |
| Name | Type | Description |
|---|---|---|
protocolrequired | integer | 1 |
headSharequired | string | The pull request head the job ran for (40 hex characters) |
checkoutrequired | string | Whether the job checked out the head itself or GitHub's merge commitheadmerge |
checkoutSharequired | string | |
indexrequired | object | The evidence runner's index of the checkout (tests, imports, routes) |
action | object | |
authoredTestsrequired | boolean | The 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". |
One step of GitApprove's authoring agent for its test executor.
| Name | Type | Description |
|---|---|---|
roundrequired | integer | |
filesrequired | array of EvidenceAuthoredFile | The agent's test files as they are now; write them over the checkout of each revision a run needs. |
discardrequired | array of string | Authored files the agent deleted; delete them from the checkouts. |
runsrequired | array of object | Test runs to do, in order (at most 4). Empty with `final` false means report back at once. |
finalrequired | boolean | With `final`, `accept` and `include` hold the tests to run on both revisions. |
acceptrequired | array of EvidenceAuthoredFile | With `final`, the test files the agent kept. |
includerequired | array of string | With `final`, the repository's own tests the agent used that the plan did not list. |
| Name | Type | Description |
|---|---|---|
pathrequired | string | A reserved `gitapprove-evidence` file name beside the tests it belongs with. |
contentrequired | string |
| Name | Type | Description |
|---|---|---|
protocolrequired | integer | 1 |
runIdrequired | string | |
headSharequired | string | |
roundrequired | integer | |
indexrequired | object | The same index the plan was made from. |
runsrequired | array of EvidenceActionUploadSide + object | One entry per run of the step, by its id. |
| Name | Type | Description |
|---|---|---|
authoring | any | The authoring agent's first step, or null when the run has no agent. |
skiprequired | boolean | |
reason | string | With skip, why there is nothing to run |
runId | string | |
reviewUrl | string | |
baseSha | string | |
headSha | string | |
files | array of string | Test files to run |
left | array of object | |
timeoutMs | integer | |
performanceRuns | integer | min 0 · max 3 |
variables | array of object | The organization's plain evidence variables (secret ones are never sent) |
withheld | array of object | |
limits | object |
| Name | Type | Description |
|---|---|---|
filesrequired | array of object | |
durationMsrequired | integer |
| Name | Type | Description |
|---|---|---|
protocolrequired | integer | 1 |
runIdrequired | string | |
headSharequired | string | |
indexrequired | object | The same index the plan was made from |
headrequired | EvidenceActionResultsSide | |
baserequired | any | |
uploaded | array of object | Absent on the first call. On the second, what was uploaded to each issued URL, with each part's ETag for a multipart upload. |
baseError | string | null | |
baseTestsrequired | array of string | |
notes | array of string |
| Name | Type | Description |
|---|---|---|
manifestrequired | string | The revision's manifest.json, as text (at most 4 MiB) |
artifactsrequired | array of object | Each artifact by name and size; the bytes go to the URLs the first call answers with |
durationMsrequired | integer |
| Name | Type | Description |
|---|---|---|
uploadrequired | boolean | true |
runIdrequired | string | |
uploadsrequired | array of object |
| Name | Type | Description |
|---|---|---|
runId | string | |
status | string | |
reason | string | null | |
reviewUrl | string | |
minutes | integer | |
tests | object | |
stored | integer |
| Name | Type | Description |
|---|---|---|
enabledrequired | boolean | |
evidenceSource | string | Where the organization's new evidence comes from.sandboxgithub-actionsboth |
headSha | string | |
previewLinks | array of object | |
run | object | null |
| Name | Type | Description |
|---|---|---|
items | array of object | What 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. |
runStatusrequired | string | null | |
partialrequired | boolean | |
source | string | null | Where the tests behind these captures ran (`sandbox` or `github-actions`); null when there are none. |
capturesrequired | array of object |
Median, sample count and spread (max minus min) of one revision's measured runs; null when nothing was measured.
| Name | Type | Description |
|---|---|---|
medianrequired | number | |
nrequired | integer | |
spreadrequired | number |
| Name | Type | Description |
|---|---|---|
okrequired | boolean | |
orgIdrequired | string | |
reposrequired | integer | |
prsrequired | integer | |
lastSyncedAtrequired | integer | Epoch milliseconds |
| Name | Type | Description |
|---|---|---|
staterequired | string | Subscription statetrialtrialingactivepast_dueexpiredcanceled |
seatsrequired | integer | |
trialEndsAtrequired | integer | null | Epoch milliseconds; null when not trialing |
allowedrequired | boolean | True when the org may use paid features |
Paste an API key, pick an endpoint and send a real request to this server. Organization admins create keys on the Team page.
Fire live requests against this server. The key never leaves your browser except as the request's bearer token.
Loading API spec…