Query Information of a Colleague

Query the detailed information of a colleague.

Request URL

GET {base_url}/user/openapi/user/v1/colleagues/{colleaguesId}

Request parameters

Path parameter
Parameter Required Type Description
colleaguesId Yes String

The unique ID of the colleague.

Note: You can obtain colleague ID using the Query Colleague List interface.
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}.

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 colleague.
status Integer The HTTP status code of the API request.
Details
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.
  • Active
  • UnActive
  • Freeze
twoFactorAuthentication String Whether Two-Factor Authentication (2FA) is enabled.
  • Enabled
  • Disabled
remark String Remark.
resourceIds Array The IDs of the permissions granted to the colleague.
Note: You can query the corresponding permissions using the Query User Permission interface.
isRmUser String Whether RM role is assigned to the colleague.
  • 0: No
  • 1: Yes

Example

Request example

Query information of a colleague (ID: 3525087957434159104).

GET /user/openapi/user/v1/colleagues/3525087957434159104 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": "ceb798423bf902623b24ef28a02d8cd8",
    "result": {
        "colleaguesId": "3525087957434159104",
        "firstName": "Demo",
        "isRmUser": 0,
        "lastName": "",
        "remark": "",
        "resourceIds": [
            "8",
            "10",
            "18",
            "19",
            "20",
            "405",
            "22",
            "407",
            "409",
            "29",
            "30",
            "31",
            "32",
            "33",
            "34",
            "291",
            "292",
            "293",
            "295",
            "297",
            "43",
            "44",
            "45",
            "315",
            "316",
            "318",
            "319",
            "320",
            "321",
            "328",
            "329",
            "330",
            "331",
            "205",
            "334",
            "207",
            "210",
            "214",
            "215",
            "216",
            "344",
            "217",
            "218",
            "219",
            "220",
            "221",
            "222",
            "226",
            "227",
            "483",
            "484",
            "229",
            "365",
            "366",
            "367",
            "369",
            "373",
            "374",
            "383"
        ],
        "twoFactorAuthentication": "Disabled",
        "userStatus": "Active",
        "yeastarId": "colleagues@demo.com"
    },
    "status": 200
}