Checking Usage¶
Usage combines all server costs, licensed operating system costs, egress costs, storage costs, and bandwidth costs for a project. Typically, committed services such as reserved hardware and other contract-based services get their own lines on your invoices and may not be reflected in usage.
Checking Your Project's Usage¶
Since billing is based on a per project basis, you can check your usage at the project level. Usage is tracked on the Usage Fees tab of the Project Settings page.
The default view displays Month to Date usage for all usage on the project. Use the drop-downs to select a different or custom time frame, or filter by usage type.
To see the usage for a project, send a GET
request to the /projects/{id}/usages
endpoint.
curl -X GET -H 'X-Auth-Token: <API_TOKEN>' https://api.equinix.com/metal/v1/projects/{id}/usages
Sending the request with no filters returns month to date usage. Note the start_date
field (if present) reflects the creation date of the object, not the start date of the usage.
To filter the response to a custom time period, use query parameters created[after]
and created[before]
with the datetimes in ISO 8601 format.
curl -g -X GET -H 'X-Auth-Token: <API_TOKEN>' "https://api.equinix.com/metal/v1/projects/{id}/usages?created[after]=2021-08-01T00:00:00:000Z&created[before]=2021-08-30T23:59:59:999Z"
Checking Device Usage¶
Usage information for an individual device can be found on its Overview, in the Usage panel.
A more detailed look at a device's bandwidth usage can be found on the Traffic page.
In the API, you can also check the usage for a single device in a project. Send a GET
request to the /devices/{id}/usages
endpoint.
curl -X GET -H 'X-Auth-Token: <API_TOKEN>' https://api.equinix.com/metal/v1/devices/{id}/usages
To filter the response to a custom time period, use query parameters created[after]
and created[before]
with the datetimes in ISO 8601 format.
curl -g -X GET -H 'X-Auth-Token: <API_TOKEN>' "https://api.equinix.com/metal/v1/projects/{id}/usages?created[after]=2021-08-01T00:00:00:000Z&created[before]=2021-08-30T23:59:59:999Z"
To get the bandwidth usage for a specific device, send a GET
request to the /devices/{id}/traffic
endpoint. The time period you wish to see, with the datetimes in ISO 8601 format, is required in the body of the request.
curl -X GET \
-H "Content-Type: application/json" \
-H "X-Auth-Token: <API_TOKEN>" \
"https://api.equinix.com/metal/v1/devices/{id}/traffic?direction=outbound" \
-d '{
"started_at": "2022-04-18T12:14:04.545Z",
"ended_at": "2022-04-19T12:14:04.545Z"
}'