ListOrganizations

Updated at:

Call this API to query the organization list.

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 information

Product

Resource

Required permission

Organization Management

Organization

Read Only

Request structure

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

Request description

Enterprise standard edition

Query the list of organizations a user has joined

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

Enterprise dedicated edition

Query the list of organizations a user has joined

curl -X 'GET' \
  'https://test-domain-***.rdc.aliyuncs.com/oapi/v1/platform/organizations?userId=99d1****6124&page=1&perPage=100' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'

Query all organization lists

curl -X 'GET' \
  'https://test-domain-***.rdc.aliyuncs.com/oapi/v1/platform/organizations?page=1&perPage=100' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'

Request headers (Headers)

x-yunxiao-token string (Required)

The access token. See Access token for details.

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

Request parameters

userId string (Optional)

User ID.

  • Standard Edition: Returns the list of organizations that the user corresponding to the personal access token has joined. This parameter is invalid.

  • Enterprise Dedicated Edition:

    • If empty, returns all organization lists.

    • If not empty, returns the list of organizations the user has joined.

page integer (Optional) Default value is 1

[Applicable only to Enterprise Dedicated Edition] Current page.

perPage integer (Optional) Default is 100

[Applicable only to Enterprise Dedicated Edition] Number of entries per page. Valid range: [1, 100].

Response parameters

Response example

[
    {
        "createdAt": "2023-08-31T03:59:16.201Z",
        "creatorId": "99d1****6124",
        "defaultRole": "99d1****6124",
        "description": "Example description",
        "id": "99d1****6124",
        "name": "Example name",
        "updateAt": "2023-08-31T03:59:16.201Z"
    }
]

createdAt string

The date and time when the organization is created.

creatorId string

The creator of the organization.

defaultRole string

Default role.

description string

Organization description.

id string

Organization ID.

name string

The name of the organization.

updateAt string

Update time.

Response headers

Parameter

Description

Example value

x-next-page

[Applicable only to Enterprise Dedicated Edition] Next page.

2

x-page

[Applicable only to Enterprise Dedicated Edition] Current page.

1

x-per-page

[Applicable only to Enterprise Dedicated Edition] Number of entries per page.

100

x-prev-page

[Applicable only to Enterprise Dedicated Edition] Previous page.

1

x-total

[Applicable only to Enterprise Dedicated Edition] Total number of entries.

2

x-total-pages

[Applicable only to Enterprise Dedicated Edition] Total number of pages.

1

Error codes

For more information, see Error code center.