CreateAccessGrantsResponse
What granting access did — or, with dry_run=true, what it would do.
Shape
grantsarray of AccessGrantThe grants made. Empty for a preview.
- 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
unchangedarray of UnchangedGrantSubjects that already held the role here and were left as they were.
- The UnchangedGrant schema
- grant_idGrantId (string · uuid)
- reasonUnchangedReasonalready_granted_same_roleWhy a subject named in a create request was left as it was.
- subjectSubjectRef
previewAccessPreview or nulloptionalPresent only for a preview: who would gain what. Nothing was written.
- 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{
"grants": [
{
"created_at": "2026-10-10T22:29:36Z",
"grant_id": "85fc3892-5e58-46b0-bc14-a59607053644",
"role": {
"name": "payments-api",
"rank": "guest"
},
"scope": {
"full_path": "acme/payments-api",
"id": "id-07af",
"type": "group"
},
"subject": {
"principal": {
"id": "b74583fe-295c-4d2d-a51b-8b90f186a8da",
"kind": "user",
"username": "lin"
}
},
"updated_at": "2026-10-09T19:49:41Z"
}
],
"unchanged": [
{
"grant_id": "cd910657-f276-42ad-85cc-530642375af4",
"reason": "already_granted_same_role",
"subject": {
"principal": "d4091551-6163-4039-a7e5-1b5839c8fe4b"
}
},
{
"grant_id": "62a8db26-89a7-4668-8372-e3ef870cb2b7",
"reason": "already_granted_same_role",
"subject": {
"principal": "cc55ae85-b490-4de5-bb9d-e4bd07fa6407"
}
}
],
"preview": {
"changes": [
{
"gains": [],
"losses": [],
"principal": {
"id": "c735a65d-b2e1-4d67-bc07-e161602430fb",
"kind": "user",
"username": "tomas"
},
"scope": {
"full_path": "acme/payments-api",
"id": "id-33d2",
"type": "group"
}
}
],
"summary": {
"people_gaining": 65,
"people_losing": 63,
"scopes_affected": 80
},
"truncated": false
}
}
Graph
Used inside
No schema contains this one.
Used by
Sent by 0 operations
No operation takes it as a request body.