Query Colleague List
Query the colleague list.
Request URL
GET {base_url}/user/openapi/user/v1/colleagues
Request parameters
- Headers
-
Parameter Required Description User-Agent Yes Provide information about the user agent, such as the type of web browser, operating system, software version, etc., so as to help Yeastar Partner Portal to identify the user or the application that is making the request. Example:
User-Agent: OpenAPI.Authorization Yes Pass the access token in the header, so as to authenticate the API request. Format: Bearer {access_token}.
- Query parameters
-
Parameter Required Type Description pageSize No Integer Define how many records per page. Default value: 25
pageNo No Integer Define which page is displayed. Default value: 1
ownerId No String The unique ID of the user whose colleagues you want to query.
Note:- To query your own colleagues, do not pass this parameter.
- To query the colleagues of a subordinate user,
enter the unique ID of the subordinate user.
You can obtain subordinate user's ID using Query Subordinate User List the interface.
Response parameters
| Parameter | Type | Description |
|---|---|---|
| code | String | The response message of the API request. |
| detailMessage | String | The detailed error information. When the request is successful, this parameter returns empty. |
| requestId | String | The unique ID of the request, which can be used to quickly locate the request. |
| result | Object<Details> | The detailed information of the colleagues. |
| status | Integer | The HTTP status code of the API request. |
- Details
-
Parameter Type Description count Integer The total number of colleagues. pageNo Integer Which page is displayed. pageSize Integer How many records are displayed per page. results Array<Colleague_Info> The list of detailed colleague information. total Integer The total number of colleagues. totalPage Integer The total number of pages. - Colleague_Info
-
Parameter Type Description colleaguesId String The unique ID of the colleague. yeastarId String Yeastar ID. firstName String First Name. lastName String Last Name. userStatus String Account status. ActiveUnActiveFreeze
twoFactorAuthentication String Whether Two-Factor Authentication (2FA) is enabled. EnabledDisabled
remark String Remark. isRmUser String Whether RM role is assigned to the colleague. 0: No1: Yes
Example
Request example
Query the list of colleagues.
GET /user/openapi/user/v1/colleagues HTTP/1.1
Host: openapi.partner.yeastar.com
User-Agent: OpenAPI
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOlsicmVzMSJdLCJYLU1TLVVTRVIiOiJ7XCJleHByXCI6XCIwXCIsXCJ0eXBlXCI6XCJwYXJ0bmVyXCIsXCJ1Y0lkXCI6XCIzMDc2OTEzNjQ0ODkwODMyODk2XCIsXCJ1c2VyQ29kZVwiOlwiRGlzdHJpYnV0b3JcIixcInVzZXJJZFwiOlwiMzA3NjkxMzY0NDkxNTk5ODcyMFwiLFwidXNlcm5hbWVcIjpcImRpc3RyaWJ1dG9yZXhhbXBsZUBvdXRsb29rLmNvbVwifSIsInVzZXJfbmFtZSI6ImRpc3RyaWJ1dG9yZXhhbXBsZUBvdXRsb29rLmNvbSIsInNjb3BlIjpbImFsbCJdLCJleHAiOjE3Mzk1MzIwNjQsInRva2VuX3R5cGUiOiJvcGVuYXBpIiwianRpIjoibXVSZDFEb2JOYkpmUUJORXAxa3JHcHZtcXJNPSIsImF1dGhvcml0aWVzIjpbIjc3Il0sImNsaWVudF9pZCI6ImFjMGYyZTViZWU3NmI2ZDdmNDU0NTY5NmMyNGZjMWYzIn0.h8x-JgOmB-as-GQJ4CWKdxXQ21z_3PPSfm1G87dgoNQ
Response example
{
"code": "success",
"detailMessage": "",
"requestId": "6d97e05eba0850a5fdbda49b37419314",
"result": {
"count": 2,
"pageNo": 1,
"pageSize": 20,
"results": [
{
"colleaguesId": "3525087957434159104",
"firstName": "Demo",
"isRmUser": 0,
"lastName": "",
"remark": "",
"twoFactorAuthentication": "Disabled",
"userStatus": "Active",
"yeastarId": "colleagues@demo.com"
},
{
"colleaguesId": "3525087612670758912",
"firstName": "Colleagues",
"isRmUser": 0,
"lastName": "",
"remark": "",
"twoFactorAuthentication": "Disabled",
"userStatus": "Active",
"yeastarId": "colleagues@outlook.com"
}
],
"total": 2,
"totalPage": 1
},
"status": 200
}