Contract Usage (GET)
https://core.rock7.com/API3/Contract/{deviceSerial}/Usage
Returns the usage information for a particular device over a period of time.
| Parameter | Type | Description | Example/Possible Values |
|---|---|---|---|
| PATH PARAMS | |||
| deviceSerial | int32 | required The serial number of the device | 50075 |
| QUERY PARAMS | |||
| from | string | Datetime for start of usage period | 2017-01-01T00:00:00Z |
| to | string | Datetime for end of usage period | 2018-01-01T00:00:00Z |
Example with Parameters
curl --request GET \
--url 'https://core.rock7.com/API3/Contract/50075/Usage?from=2017-01-01T00:00:00Z&to=2018-01-01T00:00:00Z&username=myUsername&password=myPassword' \
--header 'accept: application/json'
Response
{
"serial": "300605",
"from": "2023-01-01T00:00:00.000Z",
"to": "2024-01-01T00:00:00.000Z",
"credit": 25448
}