Skip to content
GitmoapAPIBeta
Schema

TeamUsage

Where a team is named besides its grants — what someone joining it is also signing up for: the approvals they will be asked for, the deployments they can approve, the protected branches they can push to, the services they will own, and the code they will be a required reviewer of.

Each place is listed only when you can see it there; the rest are counted, never named.

Shape

  • approval_rulesarray of TeamUsageRule
  • branch_rulesarray of TeamUsageBranchRule
    • The TeamUsageBranchRule schema
    • atAccessScopeThe group or repository the rule protects branches of.
    • branch_patternBranchPattern (string)
    • branch_rule_idBranchRuleId (string · uuid)
    • mergebooleanWhether the team may merge into them.
    • pushbooleanWhether the team may push to the branches the rule protects.
  • codeownersarray of TeamUsageCodeownersLineCODEOWNERS lines naming the team, as each repository's default branch had them at its last push or merge.
    • The TeamUsageCodeownersLine schema
    • atAccessScopeThe repository whose file it is.
    • file_pathstringCODEOWNERS or .gitmoap/CODEOWNERS, on the repository's default branch.
    • lineinteger · int320–∞The line, counting from 1.
    • patternstringThe paths the line covers, as written.
  • environmentsarray of TeamUsageEnvironment
    • The TeamUsageEnvironment schema
    • atAccessScopeThe group or repository that owns the environment.
    • environment_idEnvironmentId (string · uuid)
    • slugEnvironmentSlug (string)
    • tierEnvironmentTierdevelopmenttestingstagingproductionWhat kind of environment this is, whatever it is called: development, testing, staging or production. A production environment is protected by default.
  • hiddenbooleanWhether the team is named somewhere you cannot see.
  • servicesarray of TeamUsageService
  • truncatedbooleanWhether a list stops short: each holds at most 100.

Example

Synthesized example
{
"approval_rules": [
{
"at": {
"full_path": "acme/payments-api",
"id": "id-e1e8",
"type": "group"
},
"name": "payments-api",
"rule_id": "d11ef488-4400-46fe-a8f9-47ec9d6c64a3"
}
],
"branch_rules": [
{
"at": {
"full_path": "acme/payments-api",
"id": "id-2dbf",
"type": "group"
},
"branch_pattern": "branch-pattern-dca2",
"branch_rule_id": "4e47b252-75f6-4815-a675-149da57990b7",
"merge": false,
"push": false
},
{
"at": {
"full_path": "acme/payments-api",
"id": "id-ce73",
"type": "group"
},
"branch_pattern": "branch-pattern-0bf2",
"branch_rule_id": "259b6c76-ceb5-4d4b-9c56-f4ca2327acb7",
"merge": false,
"push": false
}
],
"codeowners": [
{
"at": {
"full_path": "acme/payments-api",
"id": "id-26f5",
"type": "group"
},
"file_path": "file-path-1d86",
"line": 7,
"pattern": "pattern-d326"
}
],
"environments": [
{
"at": {
"full_path": "acme/payments-api",
"id": "id-bd3a",
"type": "group"
},
"environment_id": "b1680565-1017-4d50-8090-45f0e0e5821e",
"slug": "slug-c3ce",
"tier": "development"
},
{
"at": {
"full_path": "acme/payments-api",
"id": "id-b646",
"type": "group"
},
"environment_id": "718d8869-2089-4234-8fe5-c9a47d42fd48",
"slug": "slug-7045",
"tier": "development"
}
],
"hidden": false,
"services": [
{
"at": {
"full_path": "acme/payments-api",
"id": "id-fbee",
"type": "group"
},
"display_name": "Mara Okafor",
"service_id": "a2087e7e-ba09-4ad7-953d-4ac0d44e6713",
"slug": "slug-a47b"
}
],
"truncated": false
}

Graph

Used by

Sent by 0 operations

No operation takes it as a request body.