Query member information

Updated at:

Use this API to query member information through 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.

Applicable editions

Enterprise Dedicated Edition, Enterprise Standard Edition

Service endpoints and authorization

  • Get the service endpoint to replace <domain> in the API request syntax with your endpoint.

  • Obtain the access token.

  • Obtain the organizationId. Go to the Lingma console and view the organization ID on the Basic Information page under Enterprise settings > Organization.

    Product

    Resource

    Required permission

    Organization Management

    Organization members

    Read-only

Request syntax

GET https://{domain}/oapi/v1/platform/organizations/{organizationId}/members:readByUser

Request header

Parameter

Type

Required

Description

Example

x-yunxiao-token

string

Yes

The personal access token.

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

Request parameters

Parameter

Type

Position

Required

Description

Example

organizationId

string

path

Yes

The organization ID.

99d1****71d4

userId

string

query

Yes

The user ID.

3ab3****b634

Request example

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

Response parameters

Parameter

Type

Description

Example

-

object

deptIds

array[string]

The list of organization departments to which the member belongs.

["99d1****6124"]

id

string

The member ID.

99d1****6124

joined

string

The date and time when the member joined. Same as the creation time in the database.

2023-08-31T03:59:16.201Z

name

string

The name of the member.

Example Name

organizationId

string

The organization ID.

99d1****6124

roleIds

array[string]

The information about the roles.

["99d1****6124"]

status

string

The status of the member. Valid values: ENABLED, DISABLED, UNDELETED, DELETED, NORMAL_USING, UNVISITED.

ENABLED

userId

string

The user ID.

99d1****6124

visited

string

The date and time of the last visit.

2023-08-31T03:59:16.201Z

Response example

{
    "deptIds": ["99d1****6124"],
    "id": "99d1****6124",
    "joined": "2023-08-31T03:59:16.201Z",
    "name": "Example Name",
    "organizationId": "99d1****6124",
    "roleIds": ["99d1****6124"],
    "status": "ENABLED",
    "userId": "99d1****6124",
    "visited": "2023-08-31T03:59:16.201Z"
}

Error codes

For more information, see Error code center.