Response Results

The YCM API returns the results in JSON format.

Success response example

The HTTP status code for a successful response is 200.

A successful response consists of the following parameters:

Table 1.
Parameter Type Description
data Object The detailed information of the responded data.
requestId String The unique ID of the request, which can be used to quickly locate the request.
status String Request result:
  • Success
  • Failed
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.

Success response example

Query all the Cloud PBXs。
HTTP/1.1 200 OK
{
    "data": {
        "pageSize": 1,
        "pageNumber": 1,
        "total": 50,
        "list": [
                  {
                     "cloudPbxId": 7715,
                     "pbxStatus": "Running",
                     "activationStatus": "Activated",
                     "name": "Yeastar P-Series Cloud PBX",
                     "sn": "3658B4311196XXXX",
                     "plan": "Enterprise Plan",
                     "planExpirationDate": 1667035676,
                     "extensionCapacity": 20,
                     "concurrentCallCapacity": 5,
                     "recordingStatus": "Enabled",
                     "recordingCapacity": 500,
                     "region": "China(Guangdong)",
                     "url": "cloud.example.yeastar.com",
                     "type": "Commercial",
                     "version": "84.8.0.25",
                     "creator": 
                                 {
                                    "firstName": "Leo",
                                    "lastName": "Ball",
                                    "email": "leo@yeastar.com"
                                 },
                    
                      "createTime": 1635737324, 
                      "upgradeInPbx": "Enabled",
                      "passwordlessLogin": "Disabled"
                    }
                  ]
                 },
    "requestId": "5ed01d8b-44f2-44a7-a868-2c7ba3a090d4",
    "status": "Success",
    "time": 1639012740
}

Error response example

An error response consists of the following parameters:
Table 2.
Parameter Type Description
requestId String The unique ID for this request, which can be used to quickly locate the request and troubleshoot the problem.
Status String Request result status:
  • Success
  • Failed
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.
errCode Integer Error code. For more information, see Error Code.
errMsg String Error message.

Error response example

{
    "errCode": 1000035,
    "errMsg": "TOKEN_EXPIRED",
    "requestId": "6f221147-367d-4fcd-b919-8ba0c9074372",
    "status": "Failed",
    "time": 1638860250
}