Roles

Assigns a role to a user. Returns 409 if role is already assigned.

post/v3/users/{userId}/assigned-roles

Request

  • Base URL
    https://global.api.konghq.com
  • Auth
    • HTTP bearer
    • or HTTP bearer
    • or HTTP bearer
    • or HTTP bearer

Path parameters

userId, string uuid required
Example:e81bc3e5-e9db-4764-b7dd-e81e39072cbe

The user ID

Request body

object required

An assigned role is a role that has been assigned to a user or team. Exactly one of entity_id or entity_ids must be provided.

role_name, 'Admin' | 'Appearance Maintainer' | 'Application Registration' | 'Certificate Admin' | 'Cloud Gateway Cluster Admin' | 'Cloud Gateway Cluster Viewer' | 'Consumer Admin' | 'Connector' | 'Creator' | 'Debug Session Creator' | 'Deployer' | 'Discovery Admin' | 'Discovery Viewer' | 'Editor' | 'Gateway Service Admin' | 'Integration Admin' | 'Integration Viewer' | 'Key Admin' | 'Maintainer' | 'Network Admin' | 'Network Creator' | 'Network Viewer' | 'Plugin Admin' | 'Plugins Admin' | 'Product Publisher' | 'Publisher' | 'Route Admin' | 'SNI Admin' | 'Scorecard Admin' | 'Scorecard Viewer' | 'Service Admin' | 'Service Creator' | 'Service Viewer' | 'Upstream Admin' | 'Vault Admin' | 'Viewer' | 'Registration Approver' | 'Content Editor' | 'Add On Admin' | 'Add On Viewer'

The desired role.

entity_id, string uuid

The ID of the entity. Mutually exclusive with entity_ids.

entity_ids, string[]

The IDs of the entities associated with this role assignment. Mutually exclusive with entity_id; exactly one of entity_id or entity_ids must be provided.

entity_type_name, 'Add Ons' | 'APIs' | 'API Products' | 'Application Auth Strategies' | 'Audit Logs' | 'Control Planes' | 'Dashboards' | 'DCR Providers' | 'Mesh Control Planes' | 'Networks' | 'Portals' | 'Reports' | 'Service Hub' | 'Auth Servers'

The type of entity.

entity_region, 'us' | 'eu' | 'au' | 'me' | 'in' | 'sg' | '*'

Region of the team.

Example request

{
  "role_name": "Viewer",
  "entity_id": "e67490ce-44dc-4cbd-b65e-b52c746fc26a",
  "entity_ids": [
    "817d0422-45c9-4d88-8d64-45aef05c1ae7",
    "18ee2573-dec0-4b83-be99-fa7700bcdc61"
  ],
  "entity_type_name": "Control Planes",
  "entity_region": "eu"
}

Response

A get action response of a single assigned role.

AssignedRole required

An assigned role is a role that has been assigned to a user or team.

id, string uuid

The ID of the role assignment.

role_name, string nullable

Name of the role being assigned.

entity_id, string uuid

A RBAC entity ID. Deprecated in favor of entity_ids

entity_ids, string[]

The IDs of the entities associated with this role assignment. Mutually exclusive with entity_id; exactly one of entity_id or entity_ids must be provided.

entity_type_name, string nullable

Name of the entity type the role is being assigned to.

entity_region, 'us' | 'eu' | 'au' | 'me' | 'in' | 'sg' | '*'

Region of the entity.

konnect_managed, boolean

Pre-release Feature This feature is currently in beta and is subject to change.

Indicates that the role is assigned and removed only by Konnect.

Example response

{
  "id": "54cc6168-ebb1-4300-8168-d62a0dd08fc8",
  "role_name": "Viewer",
  "entity_id": "18ee2573-dec0-4b83-be99-fa7700bcdc61",
  "entity_ids": [
    "18ee2573-dec0-4b83-be99-fa7700bcdc61"
  ],
  "entity_type_name": "Control Planes",
  "entity_region": "us"
}

Changes

    • breaking

      the request property entity_id became not nullable

    • info

      added the new optional request property entity_ids

    • info

      request property entity_id deprecated

    3 more changes in this revision