Role and grant

Lists all roles assigned to users in your organization.

get/authz/user_role

Request

  • Base URL
    https://api.nullplatform.com
  • URL
    https://api.nullplatform.com/authz/user_role
  • Auth
    HTTP bearer

Query parameters

user_idinteger required

Filter roles by user ID.

nrnstring required

Filter roles by NRN.

include'pending' | 'actions' | 'pending,actions'

Comma-separated extras to include in the response.

• pending: Include roles that are pending acceptance.

• actions: Add an actions array with every action the user can grant to an API key at this NRN: the actions of the roles they hold on it or on a parent, plus the actions of the roles they may assign to a key there. Requires exactly one user_id and one nrn. This is the ceiling the fine-grained API key picker offers.

Response

The operation was successful.

user_idinteger required

The unique ID of the user that has been assigned roles.

actionsstring[]

Present when the request includes include=actions: the actions the user can grant to an API key at the requested NRN. An action that has an alias is listed under the alias, not under the name it is stored as.

Example response

[
  {
    "user_id": 789,
    "grants": [
      {
        "id": 12345,
        "nrn": "organization=1:account=1:namespace=1:application=4",
        "status": "active",
        "role": {
          "id": 696188987,
          "name": "Admin",
          "slug": "admin",
          "description": "Manage all the resources",
          "can_assign_roles": [
            {
              "id": 700317756,
              "name": "Developer",
              "slug": "developer",
              "description": "Can create builds and releases, scopes, and start deployments"
            }
          ]
        }
      }
    ],
    "actions": [
      "application:read",
      "deployment:create"
    ]
  }
]

Changes

    • breaking

      the response property became optional for the status

    • breaking

      the response property became optional for the status

    • breaking

      removed the required property from the response with the status

    • breaking

      removed the required property from the response with the status

    • breaking

      removed the required property from the response with the status

    • breaking

      removed the required property from the response with the status

    • info

      media type application/json was changed to a more specific media type application/problem+json for the response status

    • info

      media type application/json was changed to a more specific media type application/problem+json for the response status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      response property message deprecated

    • info

      response property message deprecated

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the new enum value actions to the query request parameter include

    • info

      added the new enum value pending,actions to the query request parameter include

    • info

      added the optional property / to the response with the status