Query All the Cloud PBXs
Query the information of all the created Cloud PBXs.
Request URL
GET {base_url}/dm/open_api/v2/cloud_pbx/instances
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.
|
sort | No | String |
Define the sorting field. You can enter
Examples:
Note: If this parameter is omitted, the
response results will be displayed according to the create
time of Cloud PBXs by default.
|
search | No | String | Search keyword. Note: If this parameter
is omitted, the system will query all Cloud
PBXs. |
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 Cloud PBXs. |
list | Array <PBX_Info> | The information list of the Cloud PBX. |
- PBX_Info
-
Parameter Type Description cloudPbxId Long The ID of the Cloud PBX. pbxStatus String The running status of the Cloud PBX. Stopped
Starting
Running
Upgrading
Restoring
Provisioning
activationStatus String The activation status of the Cloud PBX. Activated
Unactivated
name String The name of the Cloud PBX. sn String The Serial Number (SN) of the Cloud PBX. plan String The subscribed plan of the Cloud PBX. Enterprise Plan
Ultimate Plan
Upgrading to Ultimate Plan
planExpirationDate Long The expiration time of the PBX subscribed plan. extensionCapacity Long The extension capacity of Cloud PBX. concurrentCallCapacity Long The concurrent call capacity of Cloud PBX. recordingStatus String Whether the call recording feature of Cloud PBX is enabled or not. Enabled
Disabled
recordingCapacity Long The call recording capacity of the Cloud PBX. region String The region where the Cloud PBX is launched. url String The URL of the Cloud PBX. type String The PBX type. Trial
Commercial
expirationDate Long The expiration time of Cloud PBX. version String The firmware version of Cloud PBX. group String The group to which the Cloud PBX belongs. creator Object <Creator_Info> The information of the Cloud PBX creator. creatorRole String The role of the Cloud PBX creator. My Colleague
Hosting User
Super Administrator
createTime Long The create time of Cloud PBX. initialStartUpTime Long When the Cloud PBX was first started. upgradeInPbx String Whether firmware upgrading on PBX side is enabled or not. Enabled
Disabled
im String Whether the internal chat feature (IM) of the PBX is enabled or not. Enabled
Disabled
passwordlessLogin String Whether passwordless login to PBX is enabled or not. Enabled
Disabled
allowSuperiorPasswordlessLogin String Whether passwordless login to PBX for your superior account is enabled or not. Enabled
Disabled
provisioningViaTemplate String Whether the PBX is allowed to be provisioned via a template. Enabled
Disabled
lastUsedTemplate String The last used provisioning template. lastUsedTime Long The last time the template was used to provision the PBX. activeCalls String The number of the current active calls on the PBX. usedExtensions String The number of created extensions on the PBX. usedRecording String The used recording capacity on the PBX (Unit: Minute). lastBackupTime Long The last time the PBX was backed up via task from Yeastar Central Management.
Example
Request example
Query all the Cloud PBXs:
- Display 2 records per page.
- Display Page 1.
- Sort the records by Cloud PBX ID in ascending order.
GET /dm/open_api/v2/cloud_pbx/instances?pageSize=2&pageNumber=1&sort=cloudPbxId HTTP/1.1
Host:ycm.yeastar.com
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjdXN0b21Kd3RQYXlsb2FkSW5mbyI6eyJncmFudFR5cGUiOiJjbGllbnRfY3JlZGVudGlhbHMiLCJ5c0lkIjoxNzg5NjM2MDM5MDg1MDI1NjY0NSwicmVmcmVzaFZlcnNpb24iOjE2MzkwMTIwODh9LCJzY29wZSI6WyJhbGwiXSwiZXhwIjoxNjM5MDEzODg4LCJhdXRob3JpdGllcyI6WyJST0xFX0NMSUVOVCJdLCJqdGkiOiI3MGI3N2NiOC03MzZjLTQxODctYjM2Yy0xNjM0MzNlZWJjNWEiLCJjbGllbnRfaWQiOiJ5QXN4ZzdITkRFczNxSHprQk1aUU5Pblo2NTBPRUNNWSJ9._I0umqPvrMKnL1tlkragMjkuGWcYg1SAoTimfyKl7i8
Response example
HTTP/1.1 200 OK
{
"data": {
"pageSize": 2,
"pageNumber": 1,
"total": 221,
"list": [
{
"cloudPbxId": 7715,
"pbxStatus": "Stopped",
"activationStatus": "Unactivated",
"name": "Yeastar P-Series Cloud PBX1",
"sn": "3658B431119XXXXX",
"plan": "Enterprise Plan",
"planExpirationDate": 1667035676,
"extensionCapacity": 10,
"concurrentCallCapacity": 5,
"recordingStatus": "Enabled",
"recordingCapacity": 500,
"region": "China(GuangDong)",
"url": "cloud.example.yeastarcloud.com",
"type": "Commercial",
"version": "84.8.0.25",
"group": "commercial PCE",
"creator":
{
"firstName": "Wayne",
"lastName": "William",
"email": "wayne@example.com"
},
"creatorRole": "Super Administrator",
"createTime": 1635737324,
"initialStartUpTime": 1671158324,
"upgradeInPbx": "Enabled",
"im": "Disabled",
"passwordlessLogin": "Disabled",
"provisioningViaTemplate": "Disabled",
"activeCalls": "2",
"usedExtensions": "5",
"usedRecording": "50",
"lastBackupTime": 1729786748
},
{
"cloudPbxId": 7738,
"pbxStatus": "Running",
"activationStatus": "Activated",
"name": "Yeastar P-Series Cloud PBX2",
"sn": "3658B431119XXXXX",
"plan": "Ultimate Plan",
"planExpirationDate": 1638427632,
"extensionCapacity": 15,
"concurrentCallCapacity": 15,
"recordingStatus": "Enabled",
"recordingCapacity": 500,
"region": "China(GuangDong)",
"url": "cloud2.example.yeastarcloud.com",
"type": "Commercial",
"expirationDate": 1638427632,
"version": "84.8.0.25",,
"group": "commercial PCE",
"creator":
{
"firstName": "Jane",
"lastName": "Smith",
"email": "jane@example.com"
},
"creatorRole": "Hosting User",
"createTime": 1635749236,
"initialStartUpTime": 1635749236,
"upgradeInPbx": "Enabled",
"im": "Enabled",
"passwordlessLogin": "Disabled",
"allowSuperiorPasswordlessLogin": "no",
"provisioningViaTemplate": "Enabled",
"lastUsedTemplate": "PCE-Provision-Template",
"lastUsedTime": 1680138886,
"activeCalls": "10",
"usedExtensions": "10",
"usedRecording": "150",
"lastBackupTime": 1729786748
}
]
},
"requestId": "5ed01d8b-44f2-44a7-a868-2c7ba3a090d4",
"status": "Success",
"time": 1639012740
}