Skip to content

List repository grants visible to this installation

GET
/v1/repository-grants
curl --request GET \
--url https://example.com/v1/repository-grants \
--header 'Authorization: Bearer <token>'

Requires wamp.cloud.repositories:read. Grant creation and revocation remain separate human organization-administrator operations; this installation endpoint returns only opaque grant ids and safe repository snapshots.

Active grants

Media typeapplication/json
object
repositoryGrants
required
Array<object>

An administrator-approved authority over one exact GitHub repository. Installation capabilities never imply repository access — a grant is the only thing that does, and only a human organization administrator can create or revoke one.

object
id
required

Grant id to send as source.grantId; persist it beside your own repository record, and re-resolve it through the replacement endpoint if an administrator re-grants the same repository

string format: uuid
repository
required

The exact repository the grant covers, with its fullName, defaultBranch and whether it is private

object
fullName
required
string
defaultBranch
required
string
private
required
boolean
operations
required

What this grant permits — CHECKOUT to clone into a sandbox and PUBLISH to push a branch and open a pull request; a grant may carry one without the other

Array<string>
unique items
Allowed values: CHECKOUT PUBLISH
Example
{
"repositoryGrants": [
{
"id": "74c5a903-8e6f-4b1d-a052-3c9e18d7f64b",
"repository": {
"fullName": "acme/checkout-service",
"defaultBranch": "main",
"private": true
},
"operations": [
"CHECKOUT",
"PUBLISH"
]
},
{
"id": "c81e40b7-3a95-42df-9b6c-5e70a1d29f38",
"repository": {
"fullName": "acme/billing-api",
"defaultBranch": "main",
"private": true
},
"operations": [
"CHECKOUT"
]
}
]
}

Missing, expired or wrong-audience bearer

Media typeapplication/json

Failure body returned with every non-2xx JSON response; branch on the machine code, never on prose or on the HTTP status alone.

object
error
required

Stable machine code

string
requiredScope

The installation capability the presented credential lacks, returned with insufficient_scope so an integrator knows exactly which capability to request

string
retryAfterSeconds

Advisory seconds to wait before retrying; returned on rate-limit denials, where the Retry-After header carries the same value

integer
>= 1
key
additional properties
any
Example
{
"error": "unauthorized"
}

Live installation, scope or organization policy denies the operation

Media typeapplication/json

Failure body returned with every non-2xx JSON response; branch on the machine code, never on prose or on the HTTP status alone.

object
error
required

Stable machine code

string
requiredScope

The installation capability the presented credential lacks, returned with insufficient_scope so an integrator knows exactly which capability to request

string
retryAfterSeconds

Advisory seconds to wait before retrying; returned on rate-limit denials, where the Retry-After header carries the same value

integer
>= 1
key
additional properties
any
Example
{
"error": "insufficient_scope",
"requiredScope": "wamp.cloud.sessions:create"
}