All Products
Search
Document Center

Alibaba Cloud DevOps:GetRole

Last Updated:Apr 03, 2025

Queries role information.

Prerequisites

  • Replace <domain> in your API request URL with the endpoint that you obtain. For more information, see Endpoint.

  • Obtain your access token. For more information, see Obtain an access token.

Authorization information

Application

Resource

Required permission

Administration

Role

Read-only

Request syntax

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

Request headers

Parameter

Type

Required

Description

Example

x-yunxiao-token

string

Yes

The access token.

pt-0fh3****0fbG_35af****0484

Request parameters

Parameter

Type

Location

Required

Description

Example

id

string

path

Yes

The role ID.

baef****accd

Sample request

curl -X 'GET' \
  'https://test.rdc.aliyuncs.com/oapi/v1/platform/organizations/roles/{id}' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'

Response parameters

Parameter

Type

Description

Example

-

object

id

string

Role ID.

99d1 **** 6124

name

string

Role name.

Sample Name

organizationId

string

Organization ID.

99d1 **** 6124

permissions

array[string]

Role permission list.

[base******]

Sample success responses

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

Error codes

For a list of error codes, see Service error codes.