Vehicle is an core resource representing tracking object.
{
"id": 456,
"type": "Pickup",
"mark": "ZG-123-G",
"model": "FORD",
"note": "Notes about the vehicle",
"fuel_tank_litres": 60,
"status": "stopped",
"device_id": 123,
"gps_device_id": "352294043653467",
"last_change_time": 1598875073,
"last_active_time": 1598875393,
"speed": 56,
"labels": [
"Truck",
"Delivery"
],
"driver": {
"id": 3,
"name": "John Williams"
},
"position": {
"timestamp": 1598875393,
"lat": 45.781506,
"lng": 16.013359,
"address": "Miševečka ulica 15, Zagreb"
},
"displayparams": [
{
"id": 1,
"name": "Voltage",
"sensor": 78,
"order": 1,
"transform": "${value}",
"unit": "V",
"show_info": true,
"show_map": false,
"show_graph": true
}
],
"sensors": [
{
"sensor": 78,
"value": 140
},
{
"sensor": 87,
"value": 195621000
}
]
}
GEThttps://api.giscloud.com/1/vehicles.json
Get list of all vehicles on the current Track app instance.
Attribute name | Description |
---|---|
app_instance_id | App instance ID |
expand | Expand by 'fms', 'position', 'sensors', 'driver' and 'labels' |
Code | Description |
---|---|
200 | Operation successful |
Expand option | Description |
---|---|
fms | Get vehicle FMS data if has one |
position | Vehicle position |
labels | List of the labels attached to vehicle |
driver | Currently registered vehicle driver |
sensors | Returns array of the sensors for the last point |
Sensor | Description |
---|---|
1 & 239 | Kontakt |
2 | Sensor 2 |
3 | Sensor 3 |
9 | Analog fuel sensor probe |
36 & 66 & 87 (LV CAN) & 105 & 112 (FMS) & 217 | Odometer |
72 | Temperature |
78 & 207 | Driver check-in |
30 & 80 & 81 | Wheel speed |
82 | |
33 & 83 & 86 & 107 & 138 & 213 | Total fuel used |
34 | Fuel level |
84 | CAN Fuel Level Raptor: “U starija vozila i strojeve ne ugrađujemo CAN module jer ne podržavaju taj protokol pa ugrađujemo sonde u rezervoar, a sa sonde dolazi podatak o mV na senzor 9 i kroz kalibraciju (formule za kalibraciju u više točaka) se mV pretvaraju u litre.” |
35 & 85 & 88 & 104 & 113 & 216 | Engine speed (RPM) |
37 & 87 (non-LVC) & 89 & 108 & 218 | Fuel level (%) |
90 | |
100 | |
115 | |
201 | Teltonika digital fuel sensor |
253 | Risk driving |
254 | Risk driving force |
curl -H "API-Key: {USER_API_KEY}" https://api.giscloud.com/1/vehicles.json?app_instance_id={APP_INSTANCE_ID}
{
"type": "vehicles",
"total": 74,
"page": 1,
"data": [
"id": 456,
"type": "Pickup",
"mark": "ZG-123-G",
"model": "FORD",
"note": "Notes about the vehicle",
"fuel_tank_litres": 60,
"status": "stopped",
"device_id": 123,
"gps_device_id": "352294043653467",
"last_change_time": 1598875073,
"last_active_time": 1598875393,
"speed": 56,
"labels": [
"Truck",
"Delivery"
],
"driver": {
"id": 3,
"name": "John Williams"
},
"position": {
"timestamp": 1598875393,
"lat": 45.781506,
"lng": 16.013359,
"address": "Miševečka ulica 15, Zagreb"
},
"displayparams": [
{
"id": 1,
"name": "Voltage",
"sensor": 78,
"order": 1,
"transform": "${value}",
"unit": "V",
"show_info": true,
"show_map": false,
"show_graph": true
}
],
"sensors": [
{
"sensor": 78,
"value": 140
},
{
"sensor": 87,
"value": 195621000
}
]
// ...
]
}
GEThttps://api.giscloud.com/1/vehicles/{VEHICLE_ID}.json
Get the single vehicle data
Code | Description |
---|---|
200 | Operation successful |
curl -H "API-Key: {USER_API_KEY}" https://api.giscloud.com/1/vehicles/456.json?app_instance_id={APP_INSTANCE_ID}
{
"id": 456,
"type": "Pickup",
"mark": "ZG-123-G",
"model": "FORD",
"note": "Notes about the vehicle",
"fuel_tank_litres": 60,
"status": "stopped",
"device_id": 123,
"gps_device_id": "352294043653467",
"last_change_time": 1598875073,
"last_active_time": 1598875393,
"speed": 56,
"labels": [
"Truck",
"Delivery"
],
"driver": {
"id": 3,
"name": "John Williams"
},
"position": {
"timestamp": 1598875393,
"lat": 45.781506,
"lng": 16.013359,
"address": "Miševečka ulica 15, Zagreb"
},
"sensors": [
{
"sensor": 78,
"value": 140
},
{
"sensor": 87,
"value": 195621000
}
]
}
PUThttps://api.giscloud.com/1/vehicles/{VEHICLE_ID}.json
Update vehicle properties.
Code | Description |
---|---|
204 | Operation successful |
403 | Action forbidden |
404 | Resource not found |
curl -H "API-Key: {USER_API_KEY}" -X PUT -d {"note": "here goes any text"} https://api.giscloud.com/1/vehicles/456.json?app_instance_id={APP_INSTANCE_ID}
Not supported since only Admin is allowed to manage vehicles.
GEThttps://api.giscloud.com/1/vehicles/{VEHICLE_ID}/paths.json?from={FROM}&to={TO}
Get vehicle position history between 'from' and 'to'.
Attribute name | Description |
---|---|
app_instance_id | App instance ID |
vehicle_id | Vehicle ID |
from | From in UNIX timestamp |
to | To in UNIX timestamp |
show_hidden | Flag to return hidden paths |
Code | Description |
---|---|
200 | Operation successful |
403 | Action forbidden |
404 | Resource not found |
curl -H "API-Key: {USER_API_KEY}" https://api.giscloud.com/1/vehicles/{VEHICLE_ID}/paths.json?from=1516612165&to=1516698565&app_instance_id={APP_INSTANCE_ID}
{
"page": 1,
"total": 4,
"data": [
{
"id": 9937,
"visibility": true,
"start_time": 1516627404,
"stop_time": 1516629962
},
{
"id": 9939,
"visibility": true,
"start_time": 1516630859,
"stop_time": 1516634288
},
{
"id": 9943,
"visibility": true,
"start_time": 1516635950,
"stop_time": 1516636209
},
{
"id": 9944,
"visibility": true,
"start_time": 1516641394,
"stop_time": 1516642601
}
],
"bound": {
"xmin": 11.262326,
"xmax": 11.47475,
"ymin": 47.199844,
"ymax": 47.277885
}
}
GEThttps://api.giscloud.com/1/vehicles/{VEHICLE_ID}/paths/{PATH_ID}.json
Get more information about the vehicle history path (segment).
Attribute name | Description |
---|---|
app_instance_id | App instance ID |
vehicle_id | Vehicle ID |
path_id | Single Path ID from /paths.json response |
HTTP Code | Description |
---|---|
200 | Operation successful |
403 | Action forbidden |
404 | Resource not found |
Param | Description |
---|---|
geom | Geometry of the vehicle path (in WKT) |
length | Distance (m) |
start_time | Start time of a path |
stop_time | Stop time of path |
bound | Bounding box that bounds a path |
start | GPS position of a path start |
end | GPS position of a path end |
curl -H "API-Key: {USER_API_KEY}" https://api.giscloud.com/1/vehicles/{VEHICLE_ID}/paths/9937.json?app_instance_id={APP_INSTANCE_ID}
{
"geom": "LINESTRING(18.032343 42.690315,18.032318 42.690273,18.03 ...", // in WKT
"path": "9937",
"visibility": true,
"start_time": 1555407423,
"stop_time": 1555409904,
"length": 22425.90,
"bound": {
"xmax": 18.193233,
"xmin": 18.032318,
"ymax": 42.702518,
"ymin": 42.622478
},
"start": {
"lat": 18.032343,
"lng": 42.690315
},
"end": {
"lat": 18.185925,
"lng": 42.632015
}
}
GEThttps://api.giscloud.com/1/vehicles/{VEHICLE_ID}/history/point.json
Get history vehicle status on the exact coordinates.
Attribute name | Description |
---|---|
app_instance_id | App instance ID |
vehicle_id | Vehicle ID |
lat | Latitude position |
long | Longitude position |
paths | List of the paths |
HTTP Code | Description |
---|---|
200 | Operation successful |
403 | Action forbidden |
404 | Resource not found |
curl -H "API-Key: {USER_API_KEY}" https://api.giscloud.com/1/vehicles/{VEHICLE_ID}/history/point.json?app_instance_id={APP_INSTANCE_ID}&lat=1614399.6393412165&long=5546151.712743359&paths=142401,142403,142405,142407,142409,142411,142413,142415,142417,142419,142421
{
"id": "184673079",
"timestamp": "1514991037",
"altitude": "31",
"angle": "0",
"speed": "0",
"server_time": "2018-01-03 14:50:39.358956+00",
"contact": "0",
"path": "142419",
"vehicle": "NN 123 OO",
"driver": "Ime Vozaca",
"latitude": "1614399.81723207",
"longitude": "5546151.69605408",
"address": "Velika Ulica bb, Neki Grad"
}
GEThttps://api.giscloud.com/1/vehicles/{VEHICLE_ID}/history/chart.json
Get history vehicle status on the exact coordinates.
Attribute name | Description |
---|---|
app_instance_id | App instance ID |
vehicle_id | Vehicle ID |
from | From in UNIX timestamp |
to | To in UNIX timestamp |
type | Possible values 'speed', 'engine_speed', 'altitude', ... |
epsg | EPSG code; Coordinate Reference System |
HTTP Code | Description |
---|---|
200 | Operation successful |
403 | Action forbidden |
404 | Resource not found |
curl -H "API-Key: {USER_API_KEY}" https://api.giscloud.com/1/vehicles/{VEHICLE_ID}/history/chart.json?app_instance_id={APP_INSTANCE_ID}&from=1530786932&to=1530787932&type=speed&epsg=4326
{
"data": [
{
"time": "1598921700",
"point": "15.941971,45.79187",
"value": "0"
},
{
"time": "1598921760",
"point": "15.941969,45.791866",
"value": "0"
},
//...
]
}
Vehicle label object represent any custom label that can be attached to the vehicle to group or organize large number of vehicles.
{
"id": 1,
"label": "TRUCK",
"color": "#c0504d"
}
GEThttps://api.giscloud.com/1/vehiclelabels.json
curl -H "API-Key: {USER_API_KEY}" https://api.giscloud.com/1/vehiclelabels.json?app_instance_id={APP_INSTANCE_ID}
{
"type": "vehiclelabels",
"total": 2,
"page": 1,
"data": [
{
"id": 1,
"label": "TRUCK",
"color": "#c0504d"
},
{
"id": 2,
"label": "DELIVERY",
"color": "#fccb00"
}
]
}
POSThttps://api.giscloud.com/1/vehiclelabels.json
Code | Description |
---|---|
201 | Operation successful |
403 | Action forbidden |
404 | Resource not found |
curl -H "API-Key: {USER_API_KEY}" -X POST -d '{"label": "new label", "color": "0xff0000"}' https://api.giscloud.com/1/vehiclelabels.json?app_instance_id={APP_INSTANCE_ID}
PUThttps://api.giscloud.com/1/vehiclelabels/{VEHICLE_LABEL_ID}.json
Code | Description |
---|---|
204 | Operation successful |
403 | Action forbidden |
404 | Resource not found |
curl -H "API-Key: {USER_API_KEY}" -X PUT -d '{"label": "label", "color": "0xff00FF"}' https://api.giscloud.com/1/vehiclelabels/{VEHICLE_LABEL_ID}.json?app_instance_id={APP_INSTANCE_ID}
DELETEhttps://api.giscloud.com/1/vehiclelabels/{VEHICLE_LABEL_ID}.json
Code | Description |
---|---|
204 | Operation successful |
403 | Action forbidden |
404 | Resource not found |
curl -H "API-Key: {USER_API_KEY}" -X DELETE https://api.giscloud.com/1/vehiclelabels/{VEHICLE_LABEL_ID}.json?app_instance_id={APP_INSTANCE_ID}
GEThttps://api.giscloud.com/1/vehicles/{VEHICLE_ID}/labels.json
curl -H "API-Key: {USER_API_KEY}" https://api.giscloud.com/1/vehicles/{VEHICLE_ID}/labels.json?app_instance_id={APP_INSTANCE_ID}
{
"type": "vehiclelabels",
"total": 2,
"page": 1,
"data": [
{
"id": 1,
"label": "TRUCK",
"color": "#c0504d"
},
{
"id": 2,
"label": "DELIVERY",
"color": "#fccb00"
}
]
}
POSThttps://api.giscloud.com/1/vehicles/{VEHICLE_ID}/labels.json
Assign label to the vehicle.
Code | Description |
---|---|
201 | Operation successful |
403 | Action forbidden |
404 | Resource not found |
curl -H "API-Key: {USER_API_KEY}" -X POST -d '{"id": {VEHICLE_LABEL_ID} }' https://api.giscloud.com/1/vehicles/{VEHICLE_ID}/labels.json?app_instance_id={APP_INSTANCE_ID}
DELETEhttps://api.giscloud.com/1/vehicles/{VEHICLE_ID}/labels.json
Remove label from the vehicle.
Code | Description |
---|---|
204 | Operation successful |
403 | Action forbidden |
404 | Resource not found |
curl -H "API-Key: {USER_API_KEY}" -X DELETE https://api.giscloud.com/1/vehicles/{VEHICLE_ID}/labels/{VEHICLE_LABEL_ID}.json?app_instance_id={APP_INSTANCE_ID}
{
"id": 123,
"name": "John Miller",
"email": "driver@gmail.com",
"key": "abc",
"note": "The driver"
}
GEThttps://api.giscloud.com/1/drivers.json
Get list of all drivers on the current Track app instance.
Attribute name | Description |
---|---|
app_instance_id | App instance ID |
Code | Description |
---|---|
200 | Operation successful |
curl -H "API-Key: {USER_API_KEY}" https://api.giscloud.com/1/drivers.json?app_instance_id={APP_INSTANCE_ID}
{
"type": "drivers",
"total": 2,
"page": 1,
"data": [
{
"id": 123,
"name": "John Miller",
"email": "driver@gmail.com",
"key": "abc",
"note": "The driver"
},
{
"id": 125,
"name": "Bruce ",
"email": "bruce@gmail.com",
"key": "dfg",
"note": ""
}
]
}
GEThttps://api.giscloud.com/1/drivers/{DRIVER_ID}.json
Get the single Driver data
Code | Description |
---|---|
200 | Operation successful |
curl -H "API-Key: {USER_API_KEY}" https://api.giscloud.com/1/drivers/456.json?app_instance_id={APP_INSTANCE_ID}
{
"id": 456,
"name": "John Miller",
"email": "driver@gmail.com",
"key": "abc",
"note": "The driver"
}
PUThttps://api.giscloud.com/1/drivers/{DRIVER_ID}.json
Update Driver properties.
Code | Description |
---|---|
204 | Operation successful |
403 | Action forbidden |
404 | Resource not found |
curl -H "API-Key: {USER_API_KEY}" -X PUT -d {"name": "New name"} https://api.giscloud.com/1/drivers/456.json?app_instance_id={APP_INSTANCE_ID}
DELETEhttps://api.giscloud.com/1/drivers/{DRIVER_ID}.json
Code | Description |
---|---|
204 | Operation successful |
403 | Action forbidden |
404 | Resource not found |
curl -H "API-Key: {USER_API_KEY}" -X DELETE https://api.giscloud.com/1/drivers/123.json?app_instance_id={APP_INSTANCE_ID}
{
"id": 1,
"driver_id": 123,
"start_t": 1608064080,
"stop_t": null
}
GEThttps://api.giscloud.com/1/vehicles/{VEHICLE_ID}/drivers.json
Get list of all drivers for the {VEHICLE_ID} vehicle.
Attribute name | Description |
---|---|
app_instance_id | App instance ID |
Code | Description |
---|---|
200 | Operation successful |
curl -H "API-Key: {USER_API_KEY}" https://api.giscloud.com/1/vehicles/55/drivers.json?app_instance_id={APP_INSTANCE_ID}
{
"type": "vehicledrivers",
"total": 2,
"page": 1,
"data": [
{
"id": 1,
"driver_id": 123,
"start_t": 1606809620,
"stop_t": 1606824020
},
{
"id": 2,
"driver_id": 456,
"start_t": 1606824020,
"stop_t": 1606831220
}
]
}
GEThttps://api.giscloud.com/1/vehicles/{VEHICLE_ID}/drivers/{DRIVER_ID}.json
Get the single Vehicle Driver data on the vehicle {VEHICLE_ID}.
Code | Description |
---|---|
200 | Operation successful |
curl -H "API-Key: {USER_API_KEY}" https://api.giscloud.com/1/vehicles/55/drivers/1.json?app_instance_id={APP_INSTANCE_ID}
{
"id": 1,
"driver_id": 456,
"start_t": 1606824020,
"stop_t": 1606831220
}
PUThttps://api.giscloud.com/1/vehicles/{VEHICLE_ID}/drivers/{DRIVER_ID}.json
Update Vehicle Driver properties.
Code | Description |
---|---|
204 | Operation successful |
403 | Action forbidden |
404 | Resource not found |
curl -H "API-Key: {USER_API_KEY}" -X PUT -d {"stop_t": 1606831220} https://api.giscloud.com/1/vehicles/55/drivers/1.json?app_instance_id={APP_INSTANCE_ID}
DELETEhttps://api.giscloud.com/1/vehicles/{VEHICLE_ID}/drivers/{DRIVER_ID}.json
Code | Description |
---|---|
204 | Operation successful |
403 | Action forbidden |
404 | Resource not found |
curl -H "API-Key: {USER_API_KEY}" -X DELETE https://api.giscloud.com/1/vehicles/55/1.json?app_instance_id={APP_INSTANCE_ID}
{
"id": 1,
"name": "Vehicle",
"field": "mark",
"format": "string"
}
GEThttps://api.giscloud.com/1/vehicledisplayparams.json
Code | Description |
---|---|
200 | Operation successful |
curl -H "API-Key: {USER_API_KEY}" https://api.giscloud.com/1/vehicledisplayparams.json?app_instance_id={APP_INSTANCE_ID}
{
"type": "vehicledisplayparams",
"total": 39,
"page": 1,
"data": [
{
"name": "Vehicle",
"id": 1,
"field": "mark",
"format": "string"
},
{
"name": "Address",
"id": 2,
"field": "address",
"format": "string"
},
{
"name": "Time",
"id": 3,
"field": "timestamp",
"format": "timestamp"
},
{
"id": 4,
"name": "Last change time",
"field": "dt",
"format": "period"
},
{
"id": 5,
"name": "Satellites No.",
"field": "satellites",
"format": "integer"
},
// ...
]
}
{
"id": 247,
"order": 0,
"type": 4,
"display_param": {
"id": 17,
"name": "Speed",
"format": "graph",
"field": "speed"
}
}
GEThttps://api.giscloud.com/1/users/current/vehicledisplayparams.json
Attribute name | Description |
---|---|
app_instance_id | App instance ID |
expand | Expand by 'param' to show display_param object |
type | Filter by type (possible values: 1, 2, 3 or 4) |
Type | Description |
---|---|
1 | Vehicle Info Panel |
2 | Vehicle List |
3 | Vehicle Tooltip |
4 | Graph |
Code | Description |
---|---|
200 | Operation successful |
curl -H "API-Key: {USER_API_KEY}" "https://api.giscloud.com/1/users/current/vehicledisplayparams.json?app_instance_id={APP_INSTANCE_ID}&type=1"
{
"type": "uservehicledisplayparams",
"total": 4,
"page": 1,
"data": [
{
"id": 247,
"order": 0,
"type": 4,
"display_param": {
"name": "Speed",
"format": "graph",
"field": "speed",
"id": 17
}
},
{
"id": 248,
"order": 1,
"type": 4,
"display_param": {
"id": 18,
"name": "Contact",
"format": "graph",
"field": "contact"
}
},
{
"id": 249,
"order": 2,
"type": 4,
"display_param": {
"id": 21,
"name": "Altitude",
"format": "graph",
"field": "altitude"
}
},
{
"id": 250,
"order": 3,
"type": 4,
"display_param": {
"id": 20,
"name": "Engine speed [RPM]",
"format": "graph",
"field": "engine_speed"
}
}
]
}
POSThttps://api.giscloud.com/1/users/current/vehicledisplayparams.json
Code | Description |
---|---|
201 | Operation successful |
403 | Action forbidden |
curl -H "API-Key: {USER_API_KEY}" -X POST -d '{"display_param_id": 1, "type": 1, "order": 2}' "https://api.giscloud.com/1/users/current/vehicledisplayparams.json?app_instance_id={APP_INSTANCE_ID}"
PUThttps://api.giscloud.com/1/users/current/vehicledisplayparams/{VEHICLE_DISPLAY_PARAM_ID}.json
Only "order" parameter can be changed.
Code | Description |
---|---|
204 | Operation successful |
403 | Action forbidden |
404 | Resource not found |
curl -H "API-Key: {USER_API_KEY}" -X PUT -d '{"order": 1}' "https://api.giscloud.com/1/users/current/vehicledisplayparams/{VEHICLE_DISPLAY_PARAM_ID}.json?app_instance_id={APP_INSTANCE_ID}"
DELETEhttps://api.giscloud.com/1/users/current/vehicledisplayparams/{VEHICLE_DISPLAY_PARAM_ID}.json
Code | Description |
---|---|
204 | Operation successful |
403 | Action forbidden |
404 | Resource not found |
curl -H "API-Key: {USER_API_KEY}" -X DELETE "https://api.giscloud.com/1/users/current/vehicledisplayparams/{VEHICLE_DISPLAY_PARAM_ID}.json?app_instance_id={APP_INSTANCE_ID}"
{
"id": 247,
"name": "Voltage",
"sensor": 85,
"order": 1,
"transform": "${value}",
"unit": "V",
"show_info": true,
"show_map": false,
"show_graph": true
}
GEThttps://api.giscloud.com/1/vehicles/{VEHICLE_ID}/displayparams.json
Attribute name | Description |
---|---|
app_instance_id | App instance ID |
Code | Description |
---|---|
200 | Operation successful |
curl -H "API-Key: {USER_API_KEY}" "https://api.giscloud.com/1/vehicles/123/displayparams.json?app_instance_id={APP_INSTANCE_ID}"
{
"type": "vehicledisplayparams",
"total": 4,
"page": 1,
"data": [
{
"id": 247,
"name": "Voltage",
"sensor": 85,
"order": 1,
"transform": "${value}",
"unit": "V",
"show_info": true,
"show_map": false,
"show_graph": true
},
{
"id": 248,
"name": "Custom Sensor",
"sensor": 86,
"order": 2,
"transform": "${value}/100",
"unit": "",
"show_info": true,
"show_map": true,
"show_graph": false
}
]
}
POSThttps://api.giscloud.com/1/vehicles/{VEHICLE_ID}/displayparams.json
Code | Description |
---|---|
201 | Operation successful |
403 | Action forbidden |
curl -H "API-Key: {USER_API_KEY}" -X POST -d '{"name": "Custom sensor", "sensor": 86}' "https://api.giscloud.com/1/vehicles/123/displayparams.json?app_instance_id={APP_INSTANCE_ID}"
PUThttps://api.giscloud.com/1/vehicles/{VEHICLE_ID}/displayparams/{DISPLAY_PARAM_ID}.json
Code | Description |
---|---|
204 | Operation successful |
403 | Action forbidden |
404 | Resource not found |
curl -H "API-Key: {USER_API_KEY}" -X PUT -d '{"order": 1}' "https://api.giscloud.com/1/vehicleS/displayparams/248.json?app_instance_id={APP_INSTANCE_ID}"
DELETEhttps://api.giscloud.com/1/vehicles/{VEHICLE_ID}/displayparams/{DISPLAY_PARAM_ID}.json
Code | Description |
---|---|
204 | Operation successful |
403 | Action forbidden |
404 | Resource not found |
curl -H "API-Key: {USER_API_KEY}" -X DELETE "https://api.giscloud.com/1/vehicles/123/displayparams/248.json?app_instance_id={APP_INSTANCE_ID}"
{
"id": 247,
"name": "Registration"
}
GEThttps://api.giscloud.com/1/maintenance_types.json
Code | Description |
---|---|
200 | Operation successful |
curl -H "API-Key: {USER_API_KEY}" https://api.giscloud.com/1/maintenance_types.json?app_instance_id={APP_INSTANCE_ID}
{
"type": "maintenance_types",
"total": 14,
"page": 1,
"data": [
{
"id": 1,
"name": "Registration"
},
{
"id": 2,
"name": "Service"
},
// ...
]
}
GEThttps://api.giscloud.com/1/maintenance_types/{MAINTENANCE_TYPE_ID}.json
Retrieve a vehicle maintenance type
Code | Description |
---|---|
200 | Operation successful |
curl -H "API-Key: {USER_API_KEY}" https://api.giscloud.com/1/maintenance_types/456.json?app_instance_id={APP_INSTANCE_ID}
{
"id": 1,
"name": "Registration"
}
PUThttps://api.giscloud.com/1/maintenance_types/{MAINTENANCE_TYPE_ID}.json
Update a vehicle maintenance type.
Code | Description |
---|---|
204 | Operation successful |
403 | Action forbidden |
404 | Resource not found |
curl -H "API-Key: {USER_API_KEY}" -X PUT -d {"name": "Registration"} https://api.giscloud.com/1/maintenance_types/456.json?app_instance_id={APP_INSTANCE_ID}
DELETEhttps://api.giscloud.com/1/maintenance_types/{MAINTENANCE_TYPE_ID}.json
Code | Description |
---|---|
204 | Operation successful |
403 | Action forbidden |
404 | Resource not found |
curl -H "API-Key: {USER_API_KEY}" -X DELETE https://api.giscloud.com/1/maintenance_types/456.json?app_instance_id={APP_INSTANCE_ID}
{
"id": 23,
"type_id": 1,
"date": "2019-12-12",
"odometer": 432,
"date_interval": "P1Y",
"odometer_interval": 500
}
GEThttps://api.giscloud.com/1/vehicle/{VEHICLE_ID}/maintenance.json
Code | Description |
---|---|
200 | Operation successful |
curl -H "API-Key: {USER_API_KEY}" https://api.giscloud.com/1/vehicle/456/maintenance.json?app_instance_id={APP_INSTANCE_ID}
{
"type": "maintenances",
"total": 14,
"page": 1,
"data": [
{
"id": 22,
"type_id": 15,
"date": "2019-10-03",
"odometer": 2222,
"date_interval": null,
"odometer_interval": null
},
{
"id": 23,
"type_id": 1,
"date": "2019-12-12",
"odometer": 432,
"date_interval": "P1Y",
"odometer_interval": 500
}
// ...
]
}
GEThttps://api.giscloud.com/1/vehicles/{VEHICLE_ID}/maintenance/{MAINTENANCE_ID}.json
Retrieve a vehicle maintenance parameter.
Code | Description |
---|---|
200 | Operation successful |
curl -H "API-Key: {USER_API_KEY}" https://api.giscloud.com/1/vehicles/456/maintenance/1.json?app_instance_id={APP_INSTANCE_ID}
{
"id": 23,
"type_id": 1,
"date": "2019-12-12",
"odometer": 432,
"date_interval": "P1Y",
"odometer_interval": 500
}
POSThttps://api.giscloud.com/1/vehicles/{VEHICLE_ID}/maintenance.json
Code | Description |
---|---|
201 | Operation successful |
403 | Action forbidden |
404 | Resource not found |
curl -H "API-Key: {USER_API_KEY}" -X POST -d '{"type_id": 14, "date": "2020-10-03", "odometer": 3333, "date_interval": "P1Y", "odometer_interval": 500}' https://api.giscloud.com/1/vehicles/123/odometer.json?app_instance_id={APP_INSTANCE_ID}
PUThttps://api.giscloud.com/1/vehicles/{VEHICLE_ID}/maintenance/{MAINTENANCE_ID}.json
Update a vehicle maintenance type.
Code | Description |
---|---|
204 | Operation successful |
403 | Action forbidden |
404 | Resource not found |
curl -H "API-Key: {USER_API_KEY}" -X PUT -d {"name": "Registration"} https://api.giscloud.com/1/vehicles/456/maintenance/1.json?app_instance_id={APP_INSTANCE_ID}
DELETEhttps://api.giscloud.com/1/vehicles/{VEHICLE_ID}/maintenance/{MAINTENANCE_ID}.json
Code | Description |
---|---|
204 | Operation successful |
403 | Action forbidden |
404 | Resource not found |
curl -H "API-Key: {USER_API_KEY}" -X DELETE https://api.giscloud.com/1/vehicles/123/maintenance/456.json?app_instance_id={APP_INSTANCE_ID}
{
"id": 7,
"value": 100,
"timestamp": 1565271356
}
GEThttps://api.giscloud.com/1/vehicles/{VEHICLE_ID}/odometer.json
Code | Description |
---|---|
200 | Operation successful |
curl -H "API-Key: {USER_API_KEY}" https://api.giscloud.com/1/vehicles/{VEHICLE_ID}/odometer.json?app_instance_id={APP_INSTANCE_ID}
{
"type": "odometer_readings",
"total": 10,
"page": 1,
"data": [
{
"id": 1,
"valu": 200,
"timestamp": 1594635292
},
{
"id": 2,
"value": 250,
"name": 1582755465
},
// ...
]
}
POSThttps://api.giscloud.com/1/vehicles/{VEHICLE_ID}/odometer.json
Code | Description |
---|---|
201 | Operation successful |
403 | Action forbidden |
404 | Resource not found |
curl -H "API-Key: {USER_API_KEY}" -X POST -d '{"value": 100, "timestamp": 1582755465}' https://api.giscloud.com/1/vehicles/123/odometer.json?app_instance_id={APP_INSTANCE_ID}
Not supported. If you need to update wrong odometer reading you need to delete it first and then send new one.
DELETEhttps://api.giscloud.com/1/vehicles/{VEHICLE_ID}/odometer/{ODOMETER_ID}.json
Code | Description |
---|---|
204 | Operation successful |
403 | Action forbidden |
404 | Resource not found |
curl -H "API-Key: {USER_API_KEY}" -X DELETE https://api.giscloud.com/1/vehicles/456/odometer/1.json?app_instance_id={APP_INSTANCE_ID}
{
"id": 14,
"odometer": 20000,
"fuel_in_litres": 50,
"timestamp": 1582755465,
"total_km": 22000,
"avg_fuel_usage": 40.650406504065
}
GEThttps://api.giscloud.com/1/vehicles/{VEHICLE_ID}/fuelreadings.json
Code | Description |
---|---|
200 | Operation successful |
curl -H "API-Key: {USER_API_KEY}" https://api.giscloud.com/1/vehicles/{VEHICLE_ID}/fuelreadings.json?app_instance_id={APP_INSTANCE_ID}
{
"type": "fuel_readings",
"total": 10,
"page": 1,
"data": [
{
"id": 14,
"odometer": 20000,
"fuel_in_litres": 50,
"timestamp": 1582755465,
"total_km": 22000,
"avg_fuel_usage": 10.650406504065
},
{
"id": 15,
"odometer": 20500,
"fuel_in_litres": 52,
"timestamp": 1582756465,
"total_km": 22500,
"avg_fuel_usage": 11.650406504065
}
// ...
]
}
POSThttps://api.giscloud.com/1/vehicles/{VEHICLE_ID}/fuelreadings.json
Code | Description |
---|---|
201 | Operation successful |
403 | Action forbidden |
404 | Resource not found |
curl -H "API-Key: {USER_API_KEY}" -X POST -d '{"odometer": 1000, "fuel_in_litres": 10, "timestamp": 1582755465}' https://api.giscloud.com/1/vehicles/123/odometer.json?app_instance_id={APP_INSTANCE_ID}
Not supported. If you need to update wrong fuel reading you need to delete it first and then send new one.
DELETEhttps://api.giscloud.com/1/vehicles/{VEHICLE_ID}/fuelreadings/{FUEL_READING_ID}.json
curl -H "API-Key: {USER_API_KEY}" -X DELETE https://api.giscloud.com/1/vehicles/456/fuelreadings/1.json?app_instance_id={APP_INSTANCE_ID}
GEThttps://api.giscloud.com/1/vehicles/{VEHICLE_ID}/fuelreadings/export
XLS file with all fuel readings for a vehicle
Code | Description |
---|---|
204 | Operation successful |
403 | Action forbidden |
404 | Resource not found |
curl -H "API-Key: {USER_API_KEY}" https://api.giscloud.com/1/vehicles/{VEHICLE_ID}/fuelreadings/export?app_instance_id={APP_INSTANCE_ID}
PUThttps://api.giscloud.com/1/vehicles/{VEHICLE_ID}/fuelcalibrate.json
Code | Description |
---|---|
204 | Operation successful |
403 | Action forbidden |
404 | Resource not found |
curl -H "API-Key: {USER_API_KEY}" -X PUT -d '{"sensor_param": 9, "x_readings": [10,20,30,40,50], "fx_readings": [9, 19, 29, 39, 49], "refuel_min_levl": 13, "refuel_min_perc": 16 }' https://api.giscloud.com/1/vehicles/456/fuelcalibrate.json?app_instance_id={APP_INSTANCE_ID}
DELETEhttps://api.giscloud.com/1/vehicles/{VEHICLE_LABEL_ID}/fuelcalibrate.json
Code | Description |
---|---|
204 | Operation successful |
403 | Action forbidden |
404 | Resource not found |
curl -H "API-Key: {USER_API_KEY}" -X DELETE https://api.giscloud.com/1/vehicles/{VEHICLE_LABEL_ID}/fuelcalibrate.json?app_instance_id={APP_INSTANCE_ID}
There are two types of Track Layers.
{
"id": 456,
"name": "Shops",
"description": "List of all shops",
"default_buffer": 100,
"color": "#fccb00",
"giscloud_layer": true,
"table_name": "poi_table",
"datasource_id": 12345,
"description_field": "description",
"address_field": "address"
}
GEThttps://api.giscloud.com/1/tracklayers.json
Get list of all track layers on the current Track app instance.
Attribute name | Description |
---|---|
app_instance_id | App instance ID |
Code | Description |
---|---|
200 | Operation successful |
curl -H "API-Key: {USER_API_KEY}" https://api.giscloud.com/1/tracklayers.json?app_instance_id={APP_INSTANCE_ID}
{
"type": "tracklayers",
"total": 2,
"page": 1,
"data": [
{
"id": 456,
"name": "Shops",
"description": "List of all shops",
"default_buffer": 100,
"color": "#fccb00",
"datasource_id": 849905,
"giscloud_layer": false
},
{
"id": 457,
"name": "Factories",
"description": "",
"default_buffer": 200,
"color": "#fF0000",
"giscloud_layer": true,
"table_name": "poi_table",
"datasource_id": 849906,
"description_field": "description",
"address_field": "address"
}
]
}
GEThttps://api.giscloud.com/1/tracklayers/{TRACK_LAYER_ID}.json
Get the single Track layer data
Code | Description |
---|---|
200 | Operation successful |
curl -H "API-Key: {USER_API_KEY}" https://api.giscloud.com/1/tracklayers/456.json?app_instance_id={APP_INSTANCE_ID}
{
"id": 457,
"name": "Factories",
"description": "",
"default_buffer": 200,
"color": "#fF0000",
"datasource_id": 849906,
"giscloud_layer": false
}
POSThttps://api.giscloud.com/1/tracklayers.json
Code | Description |
---|---|
201 | Operation successful |
403 | Action forbidden |
404 | Resource not found |
curl -H "API-Key: {USER_API_KEY}" -X POST -d '{"name": "POI Group", "description": "About POI group", "color": "0xff0000", "default_buffer": 300}' https://api.giscloud.com/1/tracklayers.json?app_instance_id={APP_INSTANCE_ID}
curl -H "API-Key: {USER_API_KEY}" -X POST -d '{"name": "POI Group", "description": "About POI group", "color": "0xff0000", "default_buffer": 300, "table_name": "my_poi_table", "description_field": "description", "address_field": "address"}' https://api.giscloud.com/1/tracklayers.json?app_instance_id={APP_INSTANCE_ID}
PUThttps://api.giscloud.com/1/tracklayers/{TRACK_LAYER_ID}.json
Update Track layer properties.
Code | Description |
---|---|
204 | Operation successful |
403 | Action forbidden |
404 | Resource not found |
curl -H "API-Key: {USER_API_KEY}" -X PUT -d {"name": "New layer name"} https://api.giscloud.com/1/tracklayers/456.json?app_instance_id={APP_INSTANCE_ID}
DELETEhttps://api.giscloud.com/1/tracklayers/{TRACK_LAYER_ID}.json
Code | Description |
---|---|
204 | Operation successful |
403 | Action forbidden |
404 | Resource not found |
curl -H "API-Key: {USER_API_KEY}" -X DELETE https://api.giscloud.com/1/tracklayers/{TRACK_LAYER_ID}.json?app_instance_id={APP_INSTANCE_ID}
{
"id": 2,
"description": "Simple Polygon",
"address": null,
"buffer": 0,
"geometry": "POLYGON((15.9396600723266 45.7966735069261,15.9440374374389 45.796583744254,15.9436511993408 45.7950278349647,15.9400033950805 45.7952073651767,15.9396600723266 45.7966735069261))",
"geometry_buffer": "POLYGON((15.9396600723266 45.7966735069261,15.9440374374389 45.796583744254,15.9436511993408 45.7950278349647,15.9400033950805 45.7952073651767,15.9396600723266 45.7966735069261))"
}
GEThttps://api.giscloud.com/1/tracklayers/{TRACK_FEATURE_ID}/features.json
Get list of all track layer features.
Attribute name | Description |
---|---|
app_instance_id | App instance ID |
Code | Description |
---|---|
200 | Operation successful |
curl -H "API-Key: {USER_API_KEY}" https://api.giscloud.com/1/tracklayers/{TRACK_FEATURE_ID}/features.json?app_instance_id={APP_INSTANCE_ID}
{
"type": "tracklayerfeatures",
"total": 2,
"page": 1,
"data": [
{
"id": 1,
"description": "Simple Polygon",
"address": null,
"buffer": 0,
"geometry": "POLYGON((15.9396600723266 45.7966735069261,15.9440374374389 45.796583744254,15.9436511993408 45.7950278349647,15.9400033950805 45.7952073651767,15.9396600723266 45.7966735069261))",
"geometry_buffer": "POLYGON((15.9396600723266 45.7966735069261,15.9440374374389 45.796583744254,15.9436511993408 45.7950278349647,15.9400033950805 45.7952073651767,15.9396600723266 45.7966735069261))"
},
{
"id": 2,
"description": "Point",
"address": "Ilica 13, Zagreb, Croatia",
"buffer": 0,
"geometry": "POINT(15.9386730194091 45.7932025783118)",
"geometry_buffer": "POLYGON((15.9400204923353 45.7932025783118, ..."
}
]
}
GEThttps://api.giscloud.com/1/tracklayers/{TRACK_LAYER_ID}/features/{FEATURE_ID}.json
Get the single Track layer data
Code | Description |
---|---|
200 | Operation successful |
curl -H "API-Key: {USER_API_KEY}" https://api.giscloud.com/1/tracklayers/456/features/1.json?app_instance_id={APP_INSTANCE_ID}
{ { "id": 1, "description": "Simple Polygon", "address": null, "buffer": 0, "geometry": "POLYGON((15.9396600723266 45.7966735069261,15.9440374374389 45.796583744254,15.9436511993408 45.7950278349647,15.9400033950805 45.7952073651767,15.9396600723266 45.7966735069261))", "geometry_buffer": "POLYGON((15.9396600723266 45.7966735069261,15.9440374374389 45.796583744254,15.9436511993408 45.7950278349647,15.9400033950805 45.7952073651767,15.9396600723266 45.7966735069261))" } }
PUThttps://api.giscloud.com/1/tracklayers/{TRACK_LAYER_ID}/features/{FEATURE_ID}.json
Update Track layer feature properties.
Code | Description |
---|---|
204 | Operation successful |
403 | Action forbidden |
404 | Resource not found |
curl -H "API-Key: {USER_API_KEY}" -X PUT -d {"description": "here goes any description"} https://api.giscloud.com/1/tracklayers/456/features/1.json?app_instance_id={APP_INSTANCE_ID}
DELETEhttps://api.giscloud.com/1/tracklayers/{TRACK_LAYER_ID}/features/{FEATURE_ID}.json
Code | Description |
---|---|
204 | Operation successful |
403 | Action forbidden |
404 | Resource not found |
curl -H "API-Key: {USER_API_KEY}" -X DELETE https://api.giscloud.com/1/tracklayers/{TRACK_LAYER_ID}/features/1.json?app_instance_id={APP_INSTANCE_ID}
Description | Alert Type |
---|---|
Speeding alert | speeding |
POI alert | poi |
Service alert | service |
Fuel drop | fuel-drop |
Generic sensor | gc_sen |
Ungeared | ungeared |
Maintenance (date/odometer) | date_odo |
No driver | no_driver |
Value | Description |
---|---|
60 | Every minute |
300 | Every 5 minutes |
900 | Every 15 minutes |
1800 | Every 30 minutes |
3600 | Every hour |
14400 | Every 4 hours |
28800 | Every 8 hours |
86400 | Once a day |
Value | Description |
---|---|
0 | No wait |
300 | 5 minutes wait |
600 | 10 minutes wait |
900 | 15 minutes wait |
1800 | 30 minutes wait |
3600 | One hour wait |
28800 | Eight hours wait |
{
"id": 62,
"type": "speeding",
"name": "Speeding alert",
"refresh_interval": 900,
"refresh_wait_interval": 900,
"params": {
"speed_limit": 80,
"label": null,
"vehicle": -1
},
"refresh_count": 0,
"last_refresh_time": null,
"seen": true,
"messages": [],
"email": null,
"status": 1
}
GEThttps://api.giscloud.com/1/alerts.json
Get list of all alerts.
Attribute name | Description |
---|---|
app_instance_id | App instance ID |
Code | Description |
---|---|
200 | Operation successful |
curl -H "API-Key: {USER_API_KEY}" https://api.giscloud.com/1/alerts.json?app_instance_id={APP_INSTANCE_ID}
{
"type":"alerts",
"total":2,
"page":1,
"data":[
{
"id":62,
"type":"speeding",
"name":"Speeding alert",
"refresh_interval":900,
"refresh_wait_interval":900,
"params":{
"speed_limit":80,
"label":null,
"vehicle":-1
},
"refresh_count":0,
"last_refresh_time":null,
"seen":true,
"messages":[
],
"email":null,
"status":1
},
{
"id":60,
"type":"date_odo",
"name":"service ",
"refresh_interval":14400,
"refresh_wait_interval":0,
"params":{
"alert_before_date":"12",
"alert_before_odo":"10000",
"maintenance_type_id":"10",
"label":null,
"vehicle":-1
},
"refresh_count":703,
"last_refresh_time":"2020-09-12 17:20:01.539216+00",
"seen":true,
"messages":[
],
"email":"",
"status":1
}
]
}
GEThttps://api.giscloud.com/1/alerts/{ALERT_ID}.json
Get the alert data.
Code | Description |
---|---|
200 | Operation successful |
curl -H "API-Key: {USER_API_KEY}" https://api.giscloud.com/1/alerts/1.json?app_instance_id={APP_INSTANCE_ID}
{
"id": 62,
"type": "speeding",
"name": "Speeding alert",
"refresh_interval": 900,
"refresh_wait_interval": 900,
"params": {
"speed_limit": 80,
"label": null,
"vehicle": -1
},
"refresh_count": 0,
"last_refresh_time": null,
"seen": true,
"messages": [],
"email": null,
"status": 1
}
PUThttps://api.giscloud.com/1/alerts/{ALERT_ID}.json
Update alert properties.
Important: only following fields can be changed after CREATE: name, refresh_interval, refresh_wait_interval, email, params.vehicle & params.label. At the moment PUT endpoint doesn’t support changing specific fields, entire AlertParamsObject must be sent.
Code | Description |
---|---|
204 | Operation successful |
403 | Action forbidden |
404 | Resource not found |
curl -H "API-Key: {USER_API_KEY}" -X PUT -d {"name": "Speeding"} https://api.giscloud.com/1/alerts/1.json?app_instance_id={APP_INSTANCE_ID}
DELETEhttps://api.giscloud.com/1/alerts/{ALERT_ID}.json
Code | Description |
---|---|
204 | Operation successful |
403 | Action forbidden |
404 | Resource not found |
curl -H "API-Key: {USER_API_KEY}" -X DELETE https://api.giscloud.com/1/alerts/1.json?app_instance_id={APP_INSTANCE_ID}
Task columns je endpoint koji vraca popis svih vrsta parametara koji se koriste unutar reporta. Sluzi za populiranje popisa na UI. Za Standard reporte mora se filtrirati po task_type_id==1 i is_default == false.
{
"id": 1,
"task_type_id": 1,
"is_default": true,
"format": "string",
"mandatory_param_id": 0,
"column_name": "mark",
"column_order": "10",
"expression": "mark",
"description": "mark",
"modifier": null,
"depends": null,
"visibility": true
}
GEThttps://api.giscloud.com/1/taskcolumns.json
curl -H "API-Key: {USER_API_KEY}" https://api.giscloud.com/1/taskcolumns.json?app_instance_id={APP_INSTANCE_ID}
{
"type":"taskcolumnses",
"total":53,
"page":1,
"data":[
{
"id":1,
"task_type_id":1,
"is_default":true,
"format":"string",
"mandatory_param_id":0,
"column_name":"mark",
"column_order":"10",
"expression":"mark",
"description":"mark",
"modifier":null,
"depends":null,
"visibility":true
},
{
"id":2,
"task_type_id":1,
"is_default":true,
"format":"datetime",
"mandatory_param_id":0,
"column_name":"start_t",
"column_order":"30",
"expression":"start_t",
"description":"start_t",
"modifier":"MIN",
"depends":null,
"visibility":true
},
// ...
]
}
GEThttps://api.giscloud.com/1/taskcolumns/{TASK_COLUMN_ID}.json
curl -H "API-Key: {USER_API_KEY}" https://api.giscloud.com/1/taskcolumns/1.json?app_instance_id={APP_INSTANCE_ID}
{
"id": 1,
"task_type_id": 1,
"is_default": true,
"format": "string",
"mandatory_param_id": 0,
"column_name": "mark",
"column_order": "10",
"expression": "mark",
"description": "mark",
"modifier": null,
"depends": null,
"visibility": true
}
{
"id": 27,
"name": "Report template #1",
"params": {
"columns": [6,7]
}
}
GEThttps://api.giscloud.com/1/reporttemplates.json
curl -H "API-Key: {USER_API_KEY}" https://api.giscloud.com/1/reporttemplates.json?app_instance_id={APP_INSTANCE_ID}
{
"type": "reporttemplates",
"total": 3,
"page": 1,
"data": [
{
"id": 27,
"name": "Report template #1",
"params": {
"columns":[6,7]
}
},
{
"id": 29,
"name": "Report template #2",
"params": {
"columns":[10, 11, 8]
}
},
{
"id": 34,
"name": "A1",
"params": {
"columns":[11]
}
}
]
}
GEThttps://api.giscloud.com/1/reporttemplates/{REPORT_TEMPLATE_ID}.json
curl -H "API-Key: {USER_API_KEY}" https://api.giscloud.com/1/reporttemplates/1.json?app_instance_id={APP_INSTANCE_ID}
{
"id": 27,
"name": "Report template #1",
"params": {
"columns": [6,7]
}
}
PUThttps://api.giscloud.com/1/reporttemplates/{REPORT_TEMPLATE_ID}.json
Update report template properties.
Code | Description |
---|---|
204 | Operation successful |
403 | Action forbidden |
404 | Resource not found |
curl -H "API-Key: {USER_API_KEY}" -X PUT -d {"name": "New report template name"} https://api.giscloud.com/1/reporttemplates/456.json?app_instance_id={APP_INSTANCE_ID}
DELETEhttps://api.giscloud.com/1/reporttemplates/{REPORT_TEMPLATE_ID}.json
Code | Description |
---|---|
204 | Operation successful |
403 | Action forbidden |
404 | Resource not found |
curl -H "API-Key: {USER_API_KEY}" -X DELETE https://api.giscloud.com/1/reporttemplates/{REPORT_TEMPLATE_ID}.json?app_instance_id={APP_INSTANCE_ID}
{
"req_id": 284734,
"requested": 1600204588,
"processed": "",
"status": "pending",
"taskType": "geotrag_report",
"params": {
"vehicle_id":"-1",
"time_limits_start":"1600120800",
"time_limits_end":"1600207200",
"column_model":"{\"max_speed\":{\"title\":\"Maximum speed\",\"expression\":\"GREATEST(wheel_speed, speed)\",\"modifier\":\"MAX\",\"format\":\"decimal\",\"order\":\"110\"},\"total_time\":{\"title\":\"Drive time\",\"expression\":\"duration >= 0\",\"modifier\":\"SUM\",\"format\":\"period\",\"order\":\"50\"},\"length_m\":{\"title\":\"Length (m)\",\"expression\":\"length_m\",\"modifier\":\"SUM\",\"format\":\"decimal\",\"order\":\"60\"},\"length_km\":{\"title\":\"Length (Km)\",\"expression\":\"length_km\",\"modifier\":\"SUM\",\"format\":\"decimal\",\"order\":\"70\"},\"mark\":{\"title\":\"Vehicle mark\",\"format\":\"string\",\"order\":\"10\",\"modifier\":null,\"expression\":\"mark\"},\"start_t\":{\"title\":\"Start (time)\",\"format\":\"datetime\",\"order\":\"30\",\"modifier\":\"MIN\",\"expression\":\"start_t\"},\"stop_t\":{\"title\":\"Stop (time)\",\"format\":\"datetime\",\"order\":\"40\",\"modifier\":\"MAX\",\"expression\":\"stop_t\"}}",
"send_email":"1"
}
}
GEThttps://api.giscloud.com/1/reports.json
curl -H "API-Key: {USER_API_KEY}" https://api.giscloud.com/1/reports.json?app_instance_id={APP_INSTANCE_ID}
{
"type":"task_lists",
"total":5,
"page":1,
"data":[
{
"req_id":"284734",
"scheduled":null,
"requested":1600204588,
"processed":"",
"status":"pending",
"taskType":"geotrag_report",
"params":{
"vehicle_id":"-1",
"time_limits_start":"1600120800",
"time_limits_end":"1600207200",
"column_model":"{\"max_speed\":{\"title\":\"Maximum speed\",\"expression\":\"GREATEST(wheel_speed, speed)\",\"modifier\":\"MAX\",\"format\":\"decimal\",\"order\":\"110\"},\"total_time\":{\"title\":\"Drive time\",\"expression\":\"duration >= 0\",\"modifier\":\"SUM\",\"format\":\"period\",\"order\":\"50\"},\"length_m\":{\"title\":\"Length (m)\",\"expression\":\"length_m\",\"modifier\":\"SUM\",\"format\":\"decimal\",\"order\":\"60\"},\"length_km\":{\"title\":\"Length (Km)\",\"expression\":\"length_km\",\"modifier\":\"SUM\",\"format\":\"decimal\",\"order\":\"70\"},\"mark\":{\"title\":\"Vehicle mark\",\"format\":\"string\",\"order\":\"10\",\"modifier\":null,\"expression\":\"mark\"},\"start_t\":{\"title\":\"Start (time)\",\"format\":\"datetime\",\"order\":\"30\",\"modifier\":\"MIN\",\"expression\":\"start_t\"},\"stop_t\":{\"title\":\"Stop (time)\",\"format\":\"datetime\",\"order\":\"40\",\"modifier\":\"MAX\",\"expression\":\"stop_t\"}}",
"send_email":"1"
}
},
{
"req_id":"229081",
"scheduled":null,
"requested":1575019880,
"processed":1575019923,
"status":"finished",
"taskType":"geotrag_status_report",
"params":{
"vehicle_id":"13",
"column_model":"[]",
"send_email":"1"
}
},
{
"req_id":"229050",
"scheduled":null,
"requested":1574987116,
"processed":1574987161,
"status":"error",
"taskType":"geotrag_report",
"params":[
]
},
{
"req_id":"206973",
"scheduled":null,
"requested":1564216404,
"processed":1564216441,
"status":"finished",
"taskType":"geotrag_driver_status_report",
"params":{
"column_model":"[]",
"send_email":"1"
}
}
]
}
GEThttps://api.giscloud.com/1/reports/{REPORT_ID}.json
curl -H "API-Key: {USER_API_KEY}" https://api.giscloud.com/1/reports/1.json?app_instance_id={APP_INSTANCE_ID}
{
"request":{
"id":"284734",
"user_id":"86",
"task_type_id":"1",
"status":null,
"priority":"500",
"alternate_email":"marko@giscloud.com",
"timestamp_requested":"2020-09-15 21:16:28",
"timestamp_processed":"2020-09-15 21:17:04",
"timestamp_scheduled":null,
"time_spent":"3.06455",
"gc_app_id":"103285"
},
"params":{
"vehicle_id":null,
"time_limits_start":"1600120800",
"time_limits_end":"1600207200",
"column_model":"{\"max_speed\":{\"title\":\"Maximum speed\",\"expression\":\"GREATEST(wheel_speed, speed)\",\"modifier\":\"MAX\",\"format\":\"decimal\",\"order\":\"110\"},\"total_time\":{\"title\":\"Drive time\",\"expression\":\"duration >= 0\",\"modifier\":\"SUM\",\"format\":\"period\",\"order\":\"50\"},\"length_m\":{\"title\":\"Length (m)\",\"expression\":\"length_m\",\"modifier\":\"SUM\",\"format\":\"decimal\",\"order\":\"60\"},\"length_km\":{\"title\":\"Length (Km)\",\"expression\":\"length_km\",\"modifier\":\"SUM\",\"format\":\"decimal\",\"order\":\"70\"},\"mark\":{\"title\":\"Vehicle mark\",\"format\":\"string\",\"order\":\"10\",\"modifier\":null,\"expression\":\"mark\"},\"start_t\":{\"title\":\"Start (time)\",\"format\":\"datetime\",\"order\":\"30\",\"modifier\":\"MIN\",\"expression\":\"start_t\"},\"stop_t\":{\"title\":\"Stop (time)\",\"format\":\"datetime\",\"order\":\"40\",\"modifier\":\"MAX\",\"expression\":\"stop_t\"}}",
"send_email":"1",
"alternate_email": "trackadmin@giscloud.com"
}
}
POSThttps://api.giscloud.com/1/reports.json
Value | Report type |
---|---|
1 | Standard report |
4 | POI Report |
300 | Driver Status report |
500 | Vehicle status report |
Report Param Name | Type | Description |
---|---|---|
vehicle_id | Int | Za sva vozila stavlja se vrijednost -1 |
label_id | Int | |
driver_id | Int | |
only_summary | 1 or 0 | |
alternative_report_name | String | |
time_limits_start | Timestamp | |
time_limits_end | Timestamp | |
days_of_week | String | e.g. “2,3,4,5,6,0” svi osim pon (1) |
time_of_day_start | Int | e.g. value 644 za 10:44, value 28 za 00:28. Znaci broj minuta od ponoci |
time_of_day_end | Int | e.g. value 824 za 11:44, value 1439 za 23:59. Znaci broj minuta od ponoci |
poi_layer_id | Int | |
send_email | 1 or 0 | |
column_model | Object | {<task_column_name>: TaskColumnObject} |
Code | Description |
---|---|
201 | Operation successful |
403 | Action forbidden |
404 | Resource not found |
Object params.column_model needs to be generated from following REST API interface /rest/1/taskcolumns/{TASK_COLUMN_ID}.json. GET /rest/1/taskcolumns/4.json Taskcolumn Object { "id": 4, "task_type_id": 1, "is_default": false, "format": "decimal", "mandatory_param_id": null, "column_name": "max_speed", "column_order": "110", "expression": "GREATEST(wheel_speed, speed)", "description": "max_speed", "modifier": "MAX", "depends": null, "visibility": true } ===> params.column_model with structure: "max_speed": { "title": "Maximum speed", // i18n, key is taskcolumn.column_name, e.g. max_speed "expression": "GREATEST(wheel_speed, speed)", // taskcolumn.expression "modifier": "MAX", // taskcolumn.modifier "format": "decimal", // taskcolumn.format "order": "110" // taskcolumn.column_order }
curl -H "API-Key: {USER_API_KEY}" -X POST -d '{"report_type":1,"params":"{\"vehicle_id\":\"13\",\"time_limits_start\":1600293600,\"time_limits_end\":1600380000,\"speed_limit\":\"50\",\"send_email\":1,\"column_model\":{\"max_speed\":{\"title\":\"Maximum speed\",\"expression\":\"GREATEST(wheel_speed, speed)\",\"modifier\":\"MAX\",\"format\":\"decimal\",\"order\":\"110\"},\"length_km\":{\"title\":\"Length (Km)\",\"expression\":\"length_km\",\"modifier\":\"SUM\",\"format\":\"decimal\",\"order\":\"70\"},\"speed_limit\":{\"title\":\"Drive over speed limit > 50\",\"expression\":\"speed>50\",\"modifier\":\"SUM\",\"format\":\"period\",\"order\":\"120\"},\"total_time\":{\"title\":\"Drive time\",\"expression\":\"duration >= 0\",\"modifier\":\"SUM\",\"format\":\"period\",\"order\":\"50\"}}}"}' https://api.giscloud.com/1/reports.json?app_instance_id={APP_INSTANCE_ID}
curl -H "API-Key: {USER_API_KEY}" -X POST -d '{"report_type": 500, "params": "{\"vehicle_id\": 13, \"time_limits_start\": 1600128000, \"time_limits_end\": 1600214340, \"poi_layer_id\": 58, \"send_email\": 1}"}' https://api.giscloud.com/1/reports.json?app_instance_id={APP_INSTANCE_ID}
curl -H "API-Key: {USER_API_KEY}" -X POST -d '{"report_type": 500, "params": "{\"vehicle_id\": -1, \"send_email\": 1}"}' https://api.giscloud.com/1/reports.json?app_instance_id={APP_INSTANCE_ID}
curl -H "API-Key: {USER_API_KEY}" -X POST -d '{"report_type": 300, "params": "{\"send_email\": 1}"}' https://api.giscloud.com/1/reports.json?app_instance_id={APP_INSTANCE_ID}
DELETEhttps://api.giscloud.com/1/reports/{REPORT_ID}.json
Code | Description |
---|---|
204 | Operation successful |
403 | Action forbidden |
404 | Resource not found |
curl -H "API-Key: {USER_API_KEY}" -X DELETE https://api.giscloud.com/1/reports/{REPORT_ID}.json?app_instance_id={APP_INSTANCE_ID}
GEThttps://{TRACK_APP_INSTANCE_URL}/reports/request_details/{REPORT_TASK_ID}
Report Details in HTML view.
GEThttps://{TRACK_APP_INSTANCE_URL}/rest/1/rpt_files/report_{REPORT_TASK_ID}.xlsx
XLSX file.