Query role information

Updated at:

Queries information about a specific role via OpenAPI.

Important

The new Qoder CN documentation site is now available. Content on this site may not reflect the latest product features and changes. Visit docs.qoder.cn for the latest product documentation.

Supported editions

Enterprise Dedicated Edition, Enterprise Standard Edition

Service endpoints

Get the service endpoint and replace {domain} in the API request syntax with your endpoint .

Authorization

Product

Resource

Required permission

organization management

Organization role

Read-only

Request syntax

GET https://{domain}/oapi/v1/platform/organizations/{organizationId}/roles/{id}

Request

Enterprise Standard Edition

Example

curl -X 'GET' \
  'https://openapi-rdc.aliyuncs.com/oapi/v1/platform/organizations/99d1****71d4/roles/baef****accd' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'

Enterprise Dedicated Edition

Example

curl -X 'GET' \
  'https://test-domain-***.rdc.aliyuncs.com/oapi/v1/platform/organizations/99d1****71d4/roles/baef****accd' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'

Request headers

x-yunxiao-token string (Required)

The access token. See Access token for details.

Example: pt-0fh3****0fbG_35af****0484.

Request parameters

organizationId string (Required)

Organization ID.You can go to the Basic Information page in the organization management console to obtain the organization ID (organizationId).

id string (Required)

The role ID. You can obtain this ID by calling the ListRoles operation.

Response parameters

Response example

[
    {
        "id": "99d1****6124",
        "name": "Example name",
        "organizationId": "99d1****6124",
        "permissions": ["base******"]
    }
]

id string

The unique ID of the role.

name string

The name of the role.

organizationIdstring

The ID of the organization.

permissions array[string]

A list of permissions granted to the role.

Error codes

For more information, see Error code center.