Get cloud and enterprise agents units usage
GET {{baseUrl}}/usage/units/tests?aid=1234&startDate=2022-07-17T22:00:54Z&endDate=2022-07-18T22:00:54Z&cursor=
This endpoint returns the cloud and enterprise agents usage for all the tests for a specific time period, or the curent billing cycle if no time period is specified.
In the /v7/usage
API, an enterprise agent's usage is reported in the account group where the agent was created (i.e Primary Account Group). However in this API, the agent's usage is distributed among all the account groups where the tests are running on the particular agent. This API is also only available to customers on usage based pricing model.
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
aid | number | A unique identifier associated with your account group. You can retrieve your AccountGroupId from the /account-groups endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. | |
startDate | string | Use with the endDate parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with window . | |
endDate | string | Defaults to current time the request is made. Use with the startDate parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with window . | |
cursor | null | (Optional) Opaque cursor used for pagination. Clients should use next value from _links instead of this parameter. |
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Accept | string |
RESPONSES
status: OK
{"breakdowns":[{"testId":"1158","testName":"https://app.thousandeyes.com","testType":"Web-Page Load","enterpriseUnitsUsed":14050,"enterpriseUnitsProjected":340674,"cloudUnitsUsed":10000,"cloudUnitsProjected":12000,"aid":"1234","accountGroupName":"Support"},{"testId":"1221","testName":"https://app.thousandeyes.com","testType":"Web - HTTP Server","enterpriseUnitsUsed":194051,"enterpriseUnitsProjected":30622,"cloudUnitsUsed":12000,"cloudUnitsProjected":13000,"aid":"1234","accountGroupName":"Support"}],"_links":{"previous":{"href":"https://api.thousandeyes.com/v7/link/to/resource/id","templated":false,"type":"nulla","deprecation":"anim sit deserunt labore reprehenderit","name":"aliqua in dolor irur","profile":"laborum tempor dolor","title":"exercitation ex","hreflang":"dolor occaecat fugiat dolor"},"next":{"href":"https://api.thousandeyes.com/v7/link/to/resource/id","templated":false,"type":"non","deprecation":"in aliqua laboris","name":"Lorem nostrud sit proident","profile":"ad exercitation","title":"laboris","hreflang":"et nostrud magna non aliqua"},"self":{"href":"https://api.thousandeyes.com/v7/link/to/resource/id","templated":false,"type":"qui minim nulla laboris","deprecation":"ad eiusmod dolore","name":"proident dolor Excepteur","profile":"nostrud dolore nulla labore","title":"do","hreflang":"pariatur sed proide"}}}