Query All the Groups
Query the information of all the groups.
Request URL
GET {base_url}/dm/open_api/v1/groups
Request parameters
Headers
| Parameter | Required | Type | Description |
|---|---|---|---|
| Authorization | Yes | String | Pass the access token in the header. Format: Bearer {access_token}. |
Query parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
| pageSize | No | Integer | Define how many records per page.
|
| pageNumber | No | Integer | Define which page is displayed.
|
| fqGroupName | No | String | Fuzzy search by group name. |
Response parameters
| Parameter | Type | Description |
|---|---|---|
| data | Object<Details> | The detailed information. |
| requestId | String | The unique ID of the request, which can be used to quickly locate the request. |
| status | String | Request result:
|
| time | Long | The response time. Note: The YCM API response returns a
timestamp, you can convert the timestamp to detailed
date and time as needed. For more information, see Convert Timestamp to Local Date and Time.
|
Details
| Parameter | Type | Description |
|---|---|---|
| pageSize | Integer | How many records are displayed per page. |
| pageNumber | Integer | Which page is displayed. |
| total | Integer | The total number of groups. |
| list | Array<Group_Info> | The information list of the groups. |
- Group_Info
-
Parameter Type Description id Integer The ID of the group. groupName String Group name. deviceNumber Integer Total number of devices in the group, including P-Series Cloud PBX and remotely connected devices.
Example
Request example
GET /dm/open_api/v1/groups HTTP/1.1
Host: ycm.yeastar.com
Authorization: Bearer ******
Response example
HTTP/1.1 200 OK { "data": { "pageSize": 3, "pageNumber": 1, "total": 3, "list": [ { "id": 20038, "groupName": "Group3", "deviceNumber": 3 }, { "id": 20037, "groupName": "Group2", "deviceNumber": 2 }, { "id": 20036, "groupName": "Group1", "deviceNumber": 6 } ] }, "requestId": "fd7674934b2053d933c5bdbd227756aa", "status": "Success", "time": 1775721086 }