Vehicles - Analysis
This interface allows for access to statistics data. The base url for this interface is at:
/api/vehicle-statistics
A JSON file with OpenAPI data about all vehicle-related statistics APIs can be downloaded here
.
A valid JWT is required for all statistics access.
Get non operative vehicles count
Counts currently non-operative vehicles
- GET /v1/analysis/vehicle-not-operative
Count currently non-operative vehicles
- Status Codes
200 OK – Success
Returns a Json positive response with the requested data or a plain Json negative response if there was an error retrieving the data:
[
{
CategoryGuid: "53155c4a-b2a0-412f-ab41-552d9ccdf784", // Guid
Labels: "{\"en\":\"Sedan\",...}", // String (JSON Dictionary)
NotOperativeByAdmin: // Object Array
[
{
Day: "2020-01-01T00:00:00Z", // DateTime
Measure: 0 // Int
},
...
],
NotOperativeBySystem: // Object Array
[
{
Day: "2020-01-01T00:00:00Z", // DateTime
Measure: 0 // Int
},
...
],
},
...
]
NotOperativeByAdmin
indicates how many vehicles have been declared inoperative by the admin for each individual day
NotOperativeBySystem
indicates how many vehicles have been declared inoperative by system for each individual day
The field Labels
contains a stringified Json containing pairs “language code”:”localized value”
Get connections statistics
Counts currently unreachable vehicles:
- GET /v1/analysis/vehicle-connection-statistics
Count currently unreachable vehicles
- Status Codes
200 OK – Success
Returns a Json positive response with the requested data or a plain Json negative response if there was an error retrieving the data:
[
{
CategoryGuid: "53155c4a-b2a0-412f-ab41-552d9ccdf784", // Guid
Labels: "{\"en\":\"Sedan\",...}", // String (JSON Dictionary)
MonthlyOnlineFacts: [ // Object Array
{
Day: "2020-01-01T00:00:00Z", // DateTime
Measure: 0 // Int
},
...
],
WeeklyOnlineFacts: [ // Object Array
{
Day: "2020-03-09T13:55:46Z", // DateTime
Measure: 0 // Int
},
...
],
MonthlyOfflineFacts: [ // Object Array
{
Day: "2020-03-09T13:55:46Z", // DateTime
Measure: 0 // Int
},
...
],
WeeklyOfflineFacts: [ // Object Array
{
Day: "2020-03-09T13:55:46Z", // DateTime
Measure: 0 // Int
},
...
]
},
...
]
MonthlyOnlineFacts
and MonthlyOfflineFacts
contain the number of events, in a month, which indicate how many times they went online or offline. The day is the first of the month
WeeklyOnlineFacts
and WeeklyOfflineFacts
contain the number of events, in a week, which indicate how many times they went online or offline. The day is the first of the week
The field Labels
contains a stringified Json containing pairs “language code”:”localized value”
Get Event Occurrence Statistics
Counts various event occurrences for the vehicles:
- GET /v1/analysis/vehicle-event-occurrence
Count various event occurrences for the vehicles
- Status Codes
200 OK – Success
Returns a Json positive response with the requested data or a plain Json negative response if there was an error retrieving the data:
[
{
CategoryGuid: "53155c4a-b2a0-412f-ab41-552d9ccdf784", // Guid
Labels: "{\"en\":\"Sedan\",...}", // String (JSON Dictionary)
LowSoC: [ // Object Array
{
Day: "2020-03-09T13:55:46Z", // DateTime
Measure: 0 // Int
},
...
],
WithoutTripsForLong: [ // Object Array
{
Day: "2020-03-09T13:55:46Z", // DateTime
Measure: 0 // Int
},
...
],
TotalFacts: [ // Object Array
{
Day: "2020-03-09T13:55:46Z", // DateTime
Measure: 0 // Int
},
...
]
},
...
]
The field LowSoC
indicates the number of times there have been too low fuel or battery events, broken down by day
The field WithoutTripsForLong
indicates the number of times there have been vehicle stops for too long, broken down by day
The field TotalFacts
indicates the number of recorded events, divided by day
The field Labels
contains a stringified Json containing pairs “language code”:”localized value”
Get Status Statistics
Calculate average vehicle status duration:
- GET /v1/analysis/vehicle-status-mean-times
Calculate average vehicle status duration
- Status Codes
200 OK – Success
Returns a Json positive response with the requested data or a plain Json negative response if there was an error retrieving the data:
[
{
CategoryGuid: "53155c4a-b2a0-412f-ab41-552d9ccdf784", // Guid
Labels: "{\"en\":\"Sedan\",...}", // String (JSON Dictionary)
MonthlyAvailableFacts: [ // Object Array
{
Day: "2020-03-09T13:55:46Z", // DateTime
Measure: 0 // Int
},
...
],
WeeklyAvailableFacts: [ // Object Array
{
Day: "2020-03-09T13:55:46Z", // DateTime
Measure: 0 // Int
},
...
],
MonthlyBusyFacts: [ // Object Array
{
Day: "2020-03-09T13:55:46Z", // DateTime
Measure: 0 // Int
},
...
],
WeeklyBusyFacts: [ // Object Array
{
Day: "2020-03-09T13:55:46Z", // DateTime
Measure: 0 // Int
},
...
],
MonthlyRunningFacts: [ // Object Array
{
Day: "2020-03-09T13:55:46Z", // DateTime
Measure: 0 // Int
},
...
],
WeeklyRunningFacts: [ // Object Array
{
Day: "2020-03-09T13:55:46Z", // DateTime
Measure: 0 // Int
},
...
],
MonthlyUnusedFacts: [ // Object Array
{
Day: "2020-03-09T13:55:46Z", // DateTime
Measure: 0 // Int
},
...
],
WeeklyUnusedFacts: [ // Object Array
{
Day: "2020-03-09T13:55:46Z", // DateTime
Measure: 0 // Int
},
...
],
},
...
]
A Weekly...
field indicates how many events of that type occurred during the week. The day indicated is the first of the week
A Monthly...
field indicates how many events of that type occurred during the month. The day indicated is the first of the month
The field Labels
contains a stringified Json containing pairs “language code”:”localized value”