Skip to content
GitmoapAPIBeta
Schema

AccessPreview

What a change to access would do, computed without writing anything.

Shape

  • 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
    • 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 changes stops short of everyone affected. The summary still counts them all.

Example

Synthesized example
{
"changes": [
{
"gains": [],
"losses": [],
"principal": {
"id": "1c841733-b46a-4b9c-8013-9247ce9a1fcc",
"kind": "user",
"username": "lin"
},
"scope": {
"full_path": "acme/payments-api",
"id": "id-bbe2",
"type": "group"
}
},
{
"gains": [],
"losses": [],
"principal": {
"id": "ff0d787c-2008-4215-ab56-ddbdfc0df22a",
"kind": "user",
"username": "tomas"
},
"scope": {
"full_path": "acme/payments-api",
"id": "id-e67a",
"type": "group"
}
}
],
"summary": {
"people_gaining": 78,
"people_losing": 67,
"scopes_affected": 50
},
"truncated": false
}

Graph

Used by