Query Multiple Users

Query the basic information of users in bulk.

Request URL

GET {base_url}/services/openapi/v1.0/user/user_list?{query parameters}

Request parameters

Query parameters
Parameter Required Type Description
pageSize No Integer Define how many records per page.
pageNo No Integer Define which page is displayed.
query No String Search keyword.

You can search the user based on email address, user name, mobile phone number, or user group name.

Response parameters

Parameter Type Description
data Object <Details> The detailed information
status String The result of the request.
  • Success
  • Failed
requestId String The ID of the request, which can be used to quickly locate the request.
Details
Parameter Type Description
pageSize Integer How many records are displayed per page.
pageNo Integer Which page is displayed.
total Long The total number of records.
list Array <User_Info> The list of information.
User_Info
Parameter Type Description
userId Long User's account ID.
memberId Long User's member ID.
inviteStatus String Account invitation status.
  • outer: Inactive.
  • invite: Invited.
  • added: Joined.
email String Email address.
firstName String First name.
lastName String Last name.
groupIds Array <Long> The ID(s) of the group(s) that the user belongs to.
roleName String User role name.
preferredBuildingName String The name of the building where the user's workplace is located.
preferredFloorName String The name of the floor where the user's workplace is located.
phone String Mobile phone number.
idCode String The identification code that administrator set to identify the user.

Example

Request example

Query multiple users:
  • Display 2 records per page.
  • Display Page 1.
GET /services/openapi/v1.0/user/user_list?pageSize=2&pageNo=1 HTTP/1.1
Host: workplace.yeastar.com
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJncmFudF90eXBlIjoiY2xpZW50X2NyZWRlbnRpYWxzIiwic2NvcGUiOlsiL29wZW5hcGkvIl0sImVudGVycHJpc2VfaWQiOjEwMDQzMywicmVnaW9uIjoiR0wiLCJhdXRob3JpdGllcyI6WyJST0xFX0NMSUVOVCJdLCJqdGkiOiJjZjc3NTg4OC1mM2QwLTRkNDMtODJiYy00NjQ4NWZjYTY0MzIiLCJjbGllbnRfaWQiOiI3OTU2OGFhMC0wYjBkLTQyZjYtOGRiNC03OWExNmQ3MzQ3MmEiLCJ0cyI6MTY4OTkwNTE3MCwiZXhwX2luIjo4NjQwMH0.QULcMVk5CJWNnZFrHp2TYH-P1cdvPoFn4jYYEwSs0Ps
Response example
HTTP/1.1 200 OK
{
    "data": {
        "pageSize": 2,
        "pageNo": 1,
        "total": 16,
        "list": [
            {
                "userId": 10016,
                "memberId": 2669,
                "inviteStatus": "added",
                "email": "leoball@yeastar.com",
                "firstName": "Leo",
                "groupIds": [
                    1000127
                ],
                "roleName": "Administrator"
            },
            {
                "userId": 10047,
                "memberId": 42,
                "inviteStatus": "added",
                "email": "andy@yeastar.com",
                "firstName": "Andy",
                "groupIds": [
                    1000127
                ],
                "roleName": "User",
                "preferredBuildingName": "Yeastar"
            }
        ]
    },
    "status": "Success",
    "requestId": "0f7717f2119355dcf14a9bbea39c8c5a"
}