v1

latestOpenAPI 3.1.0BSD-32026-07-2471176175.5 KB
roles

Create a new Role

post/v2/roles

Headers

cloudzero-test-keystring

If passed, the operation executes in the namespace specified by this key. Resource mutations in the namespace last for 1 hour.

Request body

namestring required

Display name for the role

descriptionstring nullable

Optional description of the role

permission_set_idsstring[] required

Set of permission set IDs assigned to this role

Example request

{
  "name": "Engineering Read-Only",
  "description": "Read-only access for engineering team members",
  "permission_set_ids": [
    "dashboards/read",
    "dimensions/read",
    "views/read"
  ],
  "data_access_filter": {
    "filter_type": "LIMITED_ACCESS",
    "dynamic_filter_dimensions": {
      "account": "cz_account_ids"
    }
  }
}

Response

Successful Operation

Example response

{
  "role": {
    "id": "a1b2c3d4-5678-4abc-9def-012345678901",
    "name": "Engineering Read-Only",
    "description": "Read-only access for engineering team members",
    "permission_set_ids": [
      "dashboards/read",
      "dimensions/read",
      "views/read"
    ],
    "data_access_filter": {
      "dynamic_filter_dimensions": {
        "account": "cz_account_ids"
      }
    },
    "created_at": "2024-01-15T10:30:00Z",
    "created_by": "api-key-abc123",
    "last_updated_at": "2024-03-10T14:22:00Z",
    "last_updated_by": "api-key-abc123"
  }
}