GET
/v7/usage
Obtaining usage details
This endpoint returns usage for the current period. This endpoint requires the View Billing
permission (a management permission), and provides visibility across all account groups within the organization. For users who have access to view billing in multiple organizations, query the endpoint using an aid querystring parameter (see optional parameters, below) from each organization.
Billing information (for past months) is not available via this endpoint; this will be implemented as a separate endpoint.
Optional Parameters
format=json|xml
optional, specifies the format of output requested. See Output Formats for more informationaid={aid}
optional, changes the account group context of the current request. If an invalid account group ID is specified as a parameter, the response will come back as an HTTP/400 error.
Request
- There is no request body for this request.
Example
$ curl https://api.thousandeyes.com/v7/usage.json \
-u noreply@thousandeyes.com:g351mw5xqhvkmh1vq6zfm51c62wyzib2
Response
Sends back detailed usage information about the organization. Users in roles with insufficient permissions will receive an HTTP/403 response.
Header
HTTP/1.1 200 OK
Server: nginx
Date: Mon, 09 May 2016 16:04:24 GMT
Content-Type: application/json;charset=UTF-8
Transfer-Encoding: chunked
Connection: keep-alive
Cache-Control: no-store
X-Organization-Rate-Limit-Limit: 240
X-Organization-Rate-Limit-Remaining: 234
X-Organization-Rate-Limit-Reset: 1493731080
X-Server-Name: 1-2
Body
{
"usage": {
"quota": {
"monthStart": "2016-04-28 00:00:00",
"monthEnd": "2016-05-28 00:00:00",
"cloudUnitsIncluded": 4320000000,
"devicesIncluded": 50,
"endpointAgentsIncluded": 200,
"enterpriseAgentsIncluded": 25
},
"cloudUnitsUsed": 8500489,
"cloudUnitsProjected": 20993812,
"cloudUnitsNextBillingPeriod": 25123456,
"enterpriseUnitsUsed": 0,
"enterpriseUnitsProjected": 0,
"enterpriseUnitsNextBillingPeriod": 0,
"devicesUsed": 23,
"endpointAgentsUsed": 42,
"enterpriseAgentsUsed": 8,
"tests": [
{
"aid": 315,
"testId": 1158,
"accountGroupName": "Documentation",
"testName": "https://app.thousandeyes.com",
"testType": "Web - Page Load",
"cloudUnitsUsed": 140540,
"cloudUnitsProjected": 340674
},
{
"aid": 315,
"testId": 1159,
"accountGroupName": "Documentation",
"testName": "https://support.thousandeyes.com",
"testType": "Web - HTTP Server",
"cloudUnitsUsed": 64390,
"cloudUnitsProjected": 164457
},
[...]
],
"devices": [
{
"aid": 7625,
"accountGroupName": "Support",
"devicesUsed": 16
},
{
"aid": 315,
"accountGroupName": "Documentation",
"devicesUsed": 4
},
[...]
],
"endpointAgents": [
{
"aid": 7625,
"accountGroupName": "Support",
"endpointAgentsUsed": 22
},
{
"aid": 315,
"accountGroupName": "Documentation",
"endpointAgentsUsed": 14
},
[...]
],
"enterpriseAgents": [
{
"aid": 7625,
"accountGroupName": "Support",
"enterpriseAgentsUsed": 7
},
{
"aid": 315,
"accountGroupName": "Documentation",
"enterpriseAgentsUsed": 1
},
[...]
]
}
}
For more information on our HTTP response status codes, see the response status codes documentation.