List repository grants visible to this installation
const url = 'https://example.com/v1/repository-grants';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”Active grants
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
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
The exact repository the grant covers, with its fullName, defaultBranch and whether it is private
object
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
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
Failure body returned with every non-2xx JSON response; branch on the machine code, never on prose or on the HTTP status alone.
object
Stable machine code
The installation capability the presented credential lacks, returned with insufficient_scope so an integrator knows exactly which capability to request
Advisory seconds to wait before retrying; returned on rate-limit denials, where the Retry-After header carries the same value
Example
{ "error": "unauthorized"}Live installation, scope or organization policy denies the operation
Failure body returned with every non-2xx JSON response; branch on the machine code, never on prose or on the HTTP status alone.
object
Stable machine code
The installation capability the presented credential lacks, returned with insufficient_scope so an integrator knows exactly which capability to request
Advisory seconds to wait before retrying; returned on rate-limit denials, where the Retry-After header carries the same value
Example
{ "error": "insufficient_scope", "requiredScope": "wamp.cloud.sessions:create"}