Skip to content
GitmoapAPIBeta
Organizeaccess
GET/groups/{group_id}/access/review

The organization's access review: every grant with a reason to look at it.

list_org_access_review
  • access:read
    A token needs the access:read scope: See who has access to a group or repository, and whyGranted by read_api, write_api.Every operation this scope unlocks
  • Single-resource

    x-gitmoap-isolation: {"kind":"single_or_self_scoped"}

  • Paginated
    Pass the next_token a page returns to get the next one.

Call it on the organization's top-level group. Only the organization's owners can read it.

Parameters

Path
  • group_idGroupId (string · uuid)The organization's top-level group
Query
  • reasonAccessReviewReasonexpiringsensitiveunusedredundantoutside_collaboratorservice_accountoptionalOnly grants in the review for this reason
  • limitinteger · int64optionalMaximum number of grants, 1-100 (default 50)
  • next_tokenstringoptionalPagination token. A page can be shorter than the limit while more remain: keep reading while one is returned

Responses

200Grants to review, oldest first, each with its reasonsapplication/json
  • itemsarray of AccessReviewItem
    • The AccessReviewItem schema
    • grantAccessGrant
      • The AccessGrant schema
      • created_atstring · date-time
      • grant_idGrantId (string · uuid)
      • scopeAccessScopeWhere the grant was made.
      • updated_atstring · date-time
      • expires_atstring · date-time or nulloptional
      • granted_byActorSummary or nulloptionalWho made the grant. Absent for access the platform created — the creator of a group or repository, or a copied membership.
      • last_exercised_atstring · date-time or nulloptionalWhen the grant last let somebody do something, to the day. Absent until it has.
      • reasonstring or nulloptional
    • reasonsarray of AccessReviewReason: one of expiring | sensitive | unused | redundant | outside_collaborator | service_account
    • covered_byarray of AccessGrantoptionalFor a redundant grant: the grants that already give everything it does, so the reviewer can see why revoking it takes nothing away.
      • The AccessGrant schema
      • created_atstring · date-time
      • grant_idGrantId (string · uuid)
      • scopeAccessScopeWhere the grant was made.
      • updated_atstring · date-time
      • expires_atstring · date-time or nulloptional
      • granted_byActorSummary or nulloptionalWho made the grant. Absent for access the platform created — the creator of a group or repository, or a copied membership.
      • last_exercised_atstring · date-time or nulloptionalWhen the grant last let somebody do something, to the day. Absent until it has.
      • reasonstring or nulloptional
  • next_tokenstring or nulloptional
200 exampleSynthesized example
{
"items": [
{
"grant": {
"created_at": "2026-10-15T07:22:42Z",
"grant_id": "6dee1172-ed98-4c9f-8a4e-b742299f44d5",
"role": {
"name": "payments-api",
"rank": "guest"
},
"scope": {
"full_path": "acme/payments-api",
"id": "id-22d6",
"type": "group"
},
"subject": {
"principal": {}
},
"updated_at": "2026-10-14T06:45:31Z"
},
"reasons": []
},
{
"grant": {
"created_at": "2026-10-09T12:23:46Z",
"grant_id": "4e221ce8-4d69-4ba2-8da5-d37886156c77",
"role": {
"name": "payments-api",
"rank": "guest"
},
"scope": {
"full_path": "acme/payments-api",
"id": "id-dc55",
"type": "group"
},
"subject": {
"principal": {}
},
"updated_at": "2026-10-12T08:52:51Z"
},
"reasons": []
}
],
"next_token": "next-token-e968"
}
400Not an organization's top-level group, or an invalid filter or pagination tokenapplication/json
Error codes
  • BAD_REQUESTThe request is malformed: a parameter or a body field is not a well-formed value of its type
  • NOT_AN_ORGANIZATIONOnly an organization — a top-level group — has teams and custom roles, and a name that can be reclaimed or held for it
  • errorErrorBody
    • The ErrorBody schema
    • codestringThe coarse category, tied to the status: NOT_FOUND, CONFLICT, INSUFFICIENT_SCOPE. Every error has one; the API reference's error catalogue lists them all.
    • messagestringWhat went wrong, for a person. Written to be read, not parsed: match on reason or code.
    • fieldstring or nulloptionalOn a 400 that refused one field's value, the field, as its JSON path: email, items[0].name. Put the message under that input. Absent on every other error.
    • reasonstring or nulloptionalThe specific code, when the error has one: LAST_ORGANIZATION_OWNER, BRANCH_PROTECTED. The message starts with it too. Match on this when it is present, and on code otherwise.
    • required_scopestring or nulloptionalThe scope the access token was missing, on INSUFFICIENT_SCOPE.
    • violationsanyoptionalPresent on the structured-validation errors (PROVIDER_VALIDATION_FAILED per-node, PIPELINE_VALIDATION_FAILED DAG): a JSON array of the offending elements, so a caller can fix every one in a single round-trip. Absent (omitted) on every other error.
400 exampleSynthesized example
{
"error": {
"code": "code-a48c",
"message": "Stream pipeline status into the run header"
}
}
401Authentication requiredapplication/json
Error codes
  • UNAUTHORIZEDNo credential was sent, or the one sent is invalid, expired or revoked
  • errorErrorBody
    • The ErrorBody schema
    • codestringThe coarse category, tied to the status: NOT_FOUND, CONFLICT, INSUFFICIENT_SCOPE. Every error has one; the API reference's error catalogue lists them all.
    • messagestringWhat went wrong, for a person. Written to be read, not parsed: match on reason or code.
    • fieldstring or nulloptionalOn a 400 that refused one field's value, the field, as its JSON path: email, items[0].name. Put the message under that input. Absent on every other error.
    • reasonstring or nulloptionalThe specific code, when the error has one: LAST_ORGANIZATION_OWNER, BRANCH_PROTECTED. The message starts with it too. Match on this when it is present, and on code otherwise.
    • required_scopestring or nulloptionalThe scope the access token was missing, on INSUFFICIENT_SCOPE.
    • violationsanyoptionalPresent on the structured-validation errors (PROVIDER_VALIDATION_FAILED per-node, PIPELINE_VALIDATION_FAILED DAG): a JSON array of the offending elements, so a caller can fix every one in a single round-trip. Absent (omitted) on every other error.
401 exampleSynthesized example
{
"error": {
"code": "code-b2de",
"message": "Stream pipeline status into the run header"
}
}
403The caller is not an owner of the organizationapplication/json
Error codes
  • FORBIDDENYou are signed in but may not do this here; reason names the permission or the rule that refused it
  • INSUFFICIENT_SCOPEThe access token lacks the scope this operation needs; required_scope names it
  • PERMISSION_REQUIREDYou need a permission you do not hold here; the message names it
  • errorErrorBody
    • The ErrorBody schema
    • codestringThe coarse category, tied to the status: NOT_FOUND, CONFLICT, INSUFFICIENT_SCOPE. Every error has one; the API reference's error catalogue lists them all.
    • messagestringWhat went wrong, for a person. Written to be read, not parsed: match on reason or code.
    • fieldstring or nulloptionalOn a 400 that refused one field's value, the field, as its JSON path: email, items[0].name. Put the message under that input. Absent on every other error.
    • reasonstring or nulloptionalThe specific code, when the error has one: LAST_ORGANIZATION_OWNER, BRANCH_PROTECTED. The message starts with it too. Match on this when it is present, and on code otherwise.
    • required_scopestring or nulloptionalThe scope the access token was missing, on INSUFFICIENT_SCOPE.
    • violationsanyoptionalPresent on the structured-validation errors (PROVIDER_VALIDATION_FAILED per-node, PIPELINE_VALIDATION_FAILED DAG): a JSON array of the offending elements, so a caller can fix every one in a single round-trip. Absent (omitted) on every other error.
403 exampleSynthesized example
{
"error": {
"code": "code-b5bd",
"message": "Stream pipeline status into the run header"
}
}
404Group not foundapplication/json
Error codes
  • NOT_FOUNDThe resource does not exist — or exists and you cannot see it: a private resource you have no access to answers exactly as an absent one does
  • errorErrorBody
    • The ErrorBody schema
    • codestringThe coarse category, tied to the status: NOT_FOUND, CONFLICT, INSUFFICIENT_SCOPE. Every error has one; the API reference's error catalogue lists them all.
    • messagestringWhat went wrong, for a person. Written to be read, not parsed: match on reason or code.
    • fieldstring or nulloptionalOn a 400 that refused one field's value, the field, as its JSON path: email, items[0].name. Put the message under that input. Absent on every other error.
    • reasonstring or nulloptionalThe specific code, when the error has one: LAST_ORGANIZATION_OWNER, BRANCH_PROTECTED. The message starts with it too. Match on this when it is present, and on code otherwise.
    • required_scopestring or nulloptionalThe scope the access token was missing, on INSUFFICIENT_SCOPE.
    • violationsanyoptionalPresent on the structured-validation errors (PROVIDER_VALIDATION_FAILED per-node, PIPELINE_VALIDATION_FAILED DAG): a JSON array of the offending elements, so a caller can fix every one in a single round-trip. Absent (omitted) on every other error.
404 exampleSynthesized example
{
"error": {
"code": "code-5355",
"message": "Draw the region map from operation density"
}
}

CLI

gitmoap access list-org-access-review

  • --group-ididThe organization's top-level group (id or group path)
  • --limitnumberoptionalMaximum number of grants, 1-100 (default 50)
  • --next-tokenstringoptionalPagination token. A page can be shorter than the limit while more remain: keep reading while one is returned
  • --reasonexpiring | sensitive | unused | redundant | outside_collaborator | service_accountoptionalOnly grants in the review for this reason

Used in these guides