AccessGrantChange
What changing a grant did — or, with dry_run=true, what it would do.
Shape
grantAccessGrant or nulloptionalThe grant as it stands after the change. For a preview, as it would stand.
- The AccessGrant schema
- created_atstring · date-time
- grant_idGrantId (string · uuid)
roleRoleView
- The RoleView schema
- namestringThe role's display name: a built-in name such as
Developer, or the custom role's name. - rankAccessLevelguestreporterdevelopermaintainerownerThe built-in rank the role counts as wherever a rank is compared, such as a protected branch's minimum.
- builtinAccessLevelguestreporterdevelopermaintainerowneror nulloptionalSet when the role is built in.
- customRoleId (string · uuid) or nulloptionalSet when the role is one the organization defined.
scopeAccessScopeWhere the grant was made.
- The AccessScope schema
- full_pathstring
- idstring
- typeScopeTypegrouprepository
- subjectGrantSubject
- 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.
- The ActorSummary schema
- emailstring
- idstring
- usernamestring
- avatar_urlstring or nulloptional
- last_exercised_atstring · date-time or nulloptionalWhen the grant last let somebody do something, to the day. Absent until it has.
- reasonstring or nulloptional
previewAccessPreview or nulloptional
- The AccessPreview schema
changesarray of AccessDeltaEach person whose access would change at the group or repository the change is made on.
- The AccessDelta schema
- gainsarray of stringPermissions they would hold that they do not hold now, by key.
- lossesarray of stringPermissions they hold now that they would no longer hold, by key.
principalPrincipalSummary
- The PrincipalSummary schema
- idPrincipalId (string · uuid)
- kindPrincipalKinduserservice_accountagentA person, a service account or an AI organization's agent.
- usernamestring
- avatar_urlstring or nulloptional
scopeAccessScope
- The AccessScope schema
- full_pathstring
- idstring
- typeScopeTypegrouprepository
- rank_afterAccessLevelguestreporterdevelopermaintainerowneror nulloptional
- rank_beforeAccessLevelguestreporterdevelopermaintainerowneror nulloptional
summaryAccessPreviewSummary
- The AccessPreviewSummary schema
- people_gaininginteger · int320–∞
- people_losinginteger · int320–∞
- scopes_affectedinteger · int64The group or repository the change is made on, plus every one beneath it that inherits access and so changes with it.
- truncatedbooleanWhether
changesstops short of everyone affected. The summary still counts them all.
Example
Synthesized example{
"grant": {
"created_at": "2026-10-14T08:05:50Z",
"grant_id": "ad58cacf-7fab-42dc-9bf8-12f55c831cc6",
"role": {
"name": "payments-api",
"rank": "guest",
"builtin": "guest",
"custom": "d224f3eb-d869-4448-8890-fca208b13209"
},
"scope": {
"full_path": "acme/payments-api",
"id": "id-850d",
"type": "group"
},
"subject": {
"principal": {
"id": "e811482c-fdd9-4569-9577-f9959cd0a527",
"kind": "user",
"username": "lin",
"avatar_url": "https://gitmoap.example/acme/e13a4649"
}
},
"updated_at": "2026-10-13T03:48:45Z",
"expires_at": "2026-10-10T02:25:56Z",
"granted_by": {
"email": "tomas@acme.example",
"id": "id-3d39",
"username": "tomas",
"avatar_url": "https://gitmoap.example/acme/d18aa4f5"
},
"last_exercised_at": "2026-10-16T09:46:11Z",
"reason": "reason-041d"
},
"preview": {
"changes": [
{
"gains": [],
"losses": [],
"principal": {
"id": "a99bf54b-7761-431f-8646-e6fd5811ba9f",
"kind": "user",
"username": "lin"
},
"scope": {
"full_path": "acme/payments-api",
"id": "id-8747",
"type": "group"
}
},
{
"gains": [],
"losses": [],
"principal": {
"id": "4265796c-3505-498c-b900-a4a21222d4a7",
"kind": "user",
"username": "lin"
},
"scope": {
"full_path": "acme/payments-api",
"id": "id-bd1b",
"type": "group"
}
}
],
"summary": {
"people_gaining": 20,
"people_losing": 56,
"scopes_affected": 65
},
"truncated": false
}
}
Graph
Used inside
No schema contains this one.
Contains
Used by
Sent by 0 operations
No operation takes it as a request body.
Returned by 1 operation