ListAllProjectRoles - List all project roles

Updated at:

Applicable editions

Central edition, Region edition

Endpoints and authorization

  • Get endpoints: Replace {domain} in the request syntax with your endpoint.
  • Get a personal access token.
  • Get your organization ID from the Basic Information page in the organization management console. This is required only for Central edition.

Product

Resource

Required permission

Projex

project role

read-only

Request syntax

Central edition

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

Region edition

GET https://{domain}/oapi/v1/projex/roles

Request headers

Parameter

Type

Required

Description

Example

x-yunxiao-token

string

Yes

Your personal access token.

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

Request parameters

Parameter

Type

Location

Required

Description

Example

organizationId

string

path

  • Yes for Central edition

  • No for Region edition

The organization ID.

Request examples

Central edition

curl -X 'GET' \
  'https://{domain}/oapi/v1/projex/organizations/{organizationId}/roles' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'

Region edition

curl -X 'GET' \
  'https://{domain}/oapi/v1/projex/roles' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'

Response parameters

Parameter

Type

Description

Example

-

array

The list of project roles.

-

object

Details of a project role.

creator

object

The user who created the role.

id

string

The user ID.

674d96abd497cd558d68****

name

string

The username.

user-name-xxx

description

string

The role description.

Participant

gmtCreate

string

Creation timestamp.

gmtModified

string

Last update timestamp.

id

string

The role ID.

1111

modifier

object

The user who last modified the role.

id

string

The user ID.

674d96abd497cd558d68****

name

string

The username.

user-name-xxx

name

string

The role name.

Participant

Response example

[
    {
        "creator": {
            "id": "674d96abd497cd558d68****",
            "name": "user-name-xxx"
        },
        "description": "Participant",
        "gmtCreate": "",
        "gmtModified": "",
        "id": "1111",
        "modifier": {
            "id": "674d96abd497cd558d68****",
            "name": "user-name-xxx"
        },
        "name": "Participant"
    }
]

Error codes

For error codes, see the Error code center.