usage.connection.history

The usage.connection.history command gets historical connection statistics.

Connection history can be requested by specifying the following:

  • A definite time period using a start and end date

  • A time period defined by the "last period of time" style query (for example, last "24h")

TR50 Request


                        // Definite time period request
{
  "get": {
    "command": "usage.connection.history",
    "params": {
      "includeSubOrgs": false,
      "showAll": false,
      "start": "2014-03-26T00:00:00.000-00:00",
      "end": "2014-03-30T00:00:00.000-00:00",
      "series": "day"
    }
  }
}
 
// Last period of time request
{
  "get": {
    "command": "usage.connection.history",
    "params": {
      "includeSubOrgs": false,
      "showAll": false,
      "last": "120h",
      "series": "day"
    }
  }
}
      

Request Parameters

Name

Type

Required

Description

dimension

String

 

If set to "org" returns counters grouped by org, only displaying the totals per org.

includeSubOrgs

Boolean

 

If sub-org totals should be included in the results.

showAll

Boolean

 

If all organizations should be included in the results. Requires Super-Ops.

last

String

 

Valid time units are seconds (s), minutes (m), hours (h), or days (d).

start

String

 

Timestamp.

end

String

 

Timestamp.

series

String

 

How the data should be aggregated. Valid options are "hour" and "day". Defaults to "hour".

TR50 Response

If the command is sent successfully a success message and the statistics are returned. Otherwise, an error and error message will be returned.


                        {
  "get": {
    "success": true,
    "params": {
      "hasRatePlan": [0, 0, 1, 1, 1],
      "activated": [0, 0, 0, 1, 1],
      "inSession": [0, 0, 0, 0, 1],
      "total": [1, 1, 1, 1, 1],
      "ts": [
        "2014-01-26T00:00:00-05:00",
        "2014-01-27T00:00:00-05:00",
        "2014-01-28T00:00:00-05:00",
        "2014-01-29T00:00:00-05:00",
        "2014-01-30T00:00:00-05:00"
      ]
    }
  }
}
      

Response Parameters

Name

Type

Description

hasRatePlan

Array

An array of the total number of connections that have a rate plan during the time period in the corresponding position in the ts array below.

activated

Array

An array of the total number of connections that were activated during the time period in the corresponding position in the ts array below.

inSession

Array

An array of the total number of connections that were in session during the time period in the corresponding position in the ts array below.

total

Array

An array of the total number of connections during the time period in the corresponding position in the ts array below.

ts

Array

An array of the timestamps associated with the above values.