v5

latestOpenAPI 3.0.3Apache 2.0raw.githubusercontent.com2026-02-283466592.5 MB
Custom roles

Get custom role

Get a single custom role by key or ID

get/api/v2/roles/{customRoleKey}

Path parameters

customRoleKeystring string required

The custom role key or ID

The custom role key or ID

Response

Custom role response

_idstring required

The ID of the custom role

_linksobject required

The location and content type of related resources

descriptionstring

The description of the custom role

keystring required

The key of the custom role

namestring required

The name of the custom role

basePermissionsstring
resourceCategorystring
_presetBundleVersioninteger

If created from a preset, the preset bundle version

Example response

{
  "_id": "1234a56b7c89d012345e678f",
  "_access": {
    "denied": [
      {
        "reason": {
          "resources": [
            "proj/*:env/*;qa_*:/flag/*"
          ],
          "actions": [
            "*"
          ],
          "effect": "allow"
        }
      }
    ],
    "allowed": [
      {
        "reason": {
          "resources": [
            "proj/*:env/*;qa_*:/flag/*"
          ],
          "actions": [
            "*"
          ],
          "effect": "allow"
        }
      }
    ]
  },
  "description": "This custom role is just an example",
  "key": "example-custom-role",
  "name": "Example custom role",
  "policy": [
    {
      "resources": [
        "proj/*:env/*;qa_*:/flag/*"
      ],
      "actions": [
        "*"
      ],
      "effect": "allow"
    }
  ],
  "_presetStatements": [
    {
      "resources": [
        "proj/*:env/*;qa_*:/flag/*"
      ],
      "actions": [
        "*"
      ],
      "effect": "allow"
    }
  ]
}