ChartActiveCalls API

get active calls chart for account during time period

POST /api/rest/customer/v1/chart-active-calls

Parameters

Name Description
data[type] Resource type (chart-active-calls)
data[attributes][from-time] From time
data[attributes][to-time] To time
data[relationships][account] Account

Request

Headers

Version: HTTP/1.0
Accept: application/vnd.api+json
Content-Type: application/vnd.api+json
Authorization: eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOjE4LCJhdWQiOlsiY3VzdG9tZXItdjEiXSwiZXhwIjoxNzMxNTc4MjI2fQ.qNW80eyScVEpAAUWTfrtBYTIzg-P0xk3TmS3DbV02VE
Host: example.org
Cookie: 

Route

POST /api/rest/customer/v1/chart-active-calls

Body

{"data":{"type":"chart-active-calls","attributes":{"from-time":"2019-01-01 00:00:00","to-time":"2019-01-02 00:00:00"},"relationships":{"account":{"data":{"type":"accounts","id":"aac8a832-a26e-11ef-a008-0242ac120003"}}}}}

Response

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 0
X-Content-Type-Options: nosniff
X-Download-Options: noopen
X-Permitted-Cross-Domain-Policies: none
Referrer-Policy: strict-origin-when-cross-origin
Content-Type: application/vnd.api+json
Vary: Accept
ETag: W/"67f69dc4c08621178c058744346758c0"
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: 79bccf89-d0f4-45ab-87f1-8487550659df
X-Runtime: 0.016427
Content-Length: 693

Status

201 Created

Body

{
  "data": {
    "id": "b5799714-a57a-4c3c-b34b-5edcb837e1f3",
    "type": "chart-active-calls",
    "links": {
      "self": "http://example.org/api/rest/customer/v1/chart-active-calls/b5799714-a57a-4c3c-b34b-5edcb837e1f3"
    },
    "attributes": {
      "from-time": "2019-01-01T00:00:00.000Z",
      "to-time": "2019-01-02T00:00:00.000Z",
      "terminated-calls": [
        {
          "y": 15,
          "x": "2019-01-01T00:00:01.000Z"
        }
      ],
      "originated-calls": [
        {
          "y": 10,
          "x": "2019-01-01T00:00:01.000Z"
        }
      ]
    },
    "relationships": {
      "account": {
        "links": {
          "self": "http://example.org/api/rest/customer/v1/chart-active-calls/b5799714-a57a-4c3c-b34b-5edcb837e1f3/relationships/account",
          "related": "http://example.org/api/rest/customer/v1/chart-active-calls/b5799714-a57a-4c3c-b34b-5edcb837e1f3/account"
        }
      }
    }
  }
}