latestOpenAPI 3.0.02026-08-0819201.1 MB

411f9f98c01e

tenants

Update Tenant’s roles based on the specified Tenant Id

You need global.tenant.edit_roles permission to access this resource

patch/tenants/{tenant_id}/roles

Path parameters

tenant_idstring required

Tenant identifier

Request body

Example request

{
  "data": {
    "attributes": {
      "roles": [
        {
          "i18n": {
            "en": "new_role"
          },
          "role": "name_of_new_role",
          "permissions": [
            "workspaces.logs.read_all",
            "workspaces.vpn_agent.get",
            "workspaces.topic.get"
          ],
          "scope": "workspaces"
        }
      ]
    }
  }
}

Response

OK

metaobject required

Example response

{
  "data": {
    "id": "5b4f337bff4304610483ba67",
    "attributes": {
      "roles": [
        {
          "i18n": {
            "en": "Admin"
          },
          "role": "admin",
          "permissions": [
            "contracts.workspace.create",
            "contracts.workspace.listAll",
            "contracts.workspace.delete",
            "contracts.repository.edit",
            "contracts.devTeam.edit",
            "global.auth_clients.create",
            "global.auth_clients.get",
            "global.auth_clients.edit",
            "global.auth_clients.delete"
          ],
          "scope": "contracts"
        }
      ]
    },
    "relationships": {
      "tenant": {
        "data": {
          "id": "5b4f337bff4304610483ba67"
        },
        "links": {
          "self": "/v2/tenants/5b4f337bff4304610483ba67\""
        }
      }
    }
  },
  "links": {
    "self": "/v2/tenants/5b4f337bff4304610483ba67/roles"
  }
}