Entity Information
Data type: Status, fields listPlease note, that status contains 3 different fields for odometer value:
- Odometer - value in miles or kilometers depending on division configuration;
- OdometerUnits - distance units. Either "km" or "miles" depending on division configuration;
- OdometerMeters -value in meters.
Divisions can have different distance units, since an API client can request data from child divisions in the same query, it is possible to get statuses in different distance units. Odometer units value can be used in user interface to show distanis provided for your convenience, so you don't need to query for terminal, asset and finally division to find out distance units in particular division.
By default status object doesn't have details about sensors: DigitalSensorDatas, AnalogSensorsDatas and ExtraData fields will be empty. In order to get this information, includesensorsdata=true parameter should be passed via query string.
1. Get latest status (1 status per asset)
URL: /api/statuses/latest
Sort order: reverse chronological (using CreatedOn field)
Query parameter | Required | Type | Default | Description |
---|---|---|---|---|
assetId | No | Numeric | - | If specified, returns only 1 latest status for this asset. If not specified, returns multiple results: 1 status per every asset in division |
assetIds | No | Comma-delimited list of numbers | - | Similar to assetId, but returns 1 latest status for every asset in list. Can't be used together with assetId query parameter |
includechilddivisions | No | True/False | False | Search statuses from assets in subdivisions |
includedisabledterminals | No | True/False | False | Include statuses from disabled terminals |
includesensorsdata | No | True/False | False | Include sensors information: DigitalSensorsDatas, AnalogSensorsDatas, ExtraData |
includedisabledsensors | No | True/False | False | Include information from disabled sensors |
includefuel | No | True/False | False | Include fuel information |
includeinvalidstatuses | No | True/False | False | Include statuses with invalid coordinates (latitude / longitude) |
odometercalculated | No | True/False | False | Return only statuses with calculated odometer value |
hourmetercalculated | No | True/False | False | Return only statuses with calculated hourmeter value |
buffered | No | True/False | - | If specified, returns only statuses with Buffered flag set to this value |
datetime | No | DateTime | - | Return latest statuses by specified Date/Time. Both UTC and local dates are accepted. Check Dates Handling for details |
2. Get all statuses by assets, filtered
URL: /api/statuses?assetId=0000
Sort order: reverse chronological (using CreatedOn field)
Query parameter | Required | Type | Default | Description |
---|---|---|---|---|
assetId | Yes | Numeric | - | Id of your asset |
includechilddivisions | No | True/False | False | Search statuses from assets in subdivisions |
includedisabledterminals | No | True/False | False | Include statuses from disabled terminals |
includesensorsdata | No | True/False | False | Include sensors information: DigitalSensorsDatas, AnalogSensorsDatas, ExtraData |
includedisabledsensors | No | True/False | False | Include information from disabled sensors |
includefuel | No | True/False | False | Include fuel information |
includeinvalidstatuses | No | True/False | False | Include statuses with invalid coordinates (latitude / longitude) |
includehistory | No | True/False | False | If set to false, the query will use the cache which stores 200 most recent statuses. If set to true, the query will ignore the cache and search data back to the when the device was enabled. Setting to true will slow down the query |
startdatetime | No | DateTime | - | Returns only statuses registered at specified Date/Time or after it. Both UTC and local dates are accepted. Check Dates Handling for details |
enddatetime | No | DateTime | - | Returns only statuses registered at specified Date/Time or before it. Both UTC and local dates are accepted. Check Dates Handling for details |
messagecodes | No | Text | - | Comma-separated list of message code names. If specified, returns all messages with the given message code names |
odometercalculated | No | True/False | False | Return only statuses with calculated odometer value |
hourmetercalculated | No | True/False | False | Return only statuses with calculated hourmeter value |
buffered | No | True/False | - | If specified, returns only statuses with Buffered flag set to this value |
3. Get specific status details by ID
URL: /api/statuses/{statusId}
statusId - ID of requested status
Sort order: reverse chronological (using CreatedOn field)
Query parameter | Required | Type | Default | Description |
---|---|---|---|---|
includechilddivisions | No | True/False | False | Search status from assets in subdivisions |
includedisabledterminals | No | True/False | False | Search status from disabled terminals |
includesensorsdata | No | True/False | False | Include sensors information: DigitalSensorsDatas, AnalogSensorsDatas, ExtraData |
includedisabledsensors | No | True/False | False | Include information from disabled sensors |
includefuel | No | True/False | False | Include fuel information |
includeinvalidstatuses | No | True/False | False | Return status even if it has invalid coordinates (latitude / longitude) |