The MOPRIM TMD Cloud API enables you to access mobility data of your customer base as well as some analytical funtions on the data.
Pre-requisite: the MOPRIM TMD Cloud API requires an admin key to be access its servers
Let https://{base_url} be the base URL provided to you to access the MOPRIM Cloud services.
Retrieves the mobility data for all the users.
GET https://{base_url}/mobility
Generates a response containing the path data for all the users which have data in the dataset.
Type | Name | Description | Possible values | Default |
---|---|---|---|---|
string | formatoptional | output format of the result data | geojsoncsv | geojson |
integer | fromoptional | the timestamp of the earliest data (in millisecond precision) | yesterday midnight (CET) | |
integer | tooptional | the timestamp of the latest data (in millisecond precision) | 24 hours after from |
Type | Name | In | Type |
---|---|---|---|
apiKey | Authorization | header | awsSigv4 |
HTTP code | Description |
---|---|
200 | OK |
400 | Format not supported or error with timestamps |
Example:
[
{
"time_start": 1539787268169,
"time_stop": 1539960161000,
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {
"CO_2": 0,
"activity": "stationary",
"distance": 0,
"duration": 20320.24,
"label": null,
"original_activity": "stationary",
"speed": 0,
"time_start": 1540155600000,
"time_stop": 1540175920243,
"uuid": "YYY:0000xxx0x-00x0-00x0-xx0x-0x00x00x00",
"verified_by_user": false
},
"geometry": [
{
"type": "Point",
"coordinates": [
24.0016,
49.83421
]
}
]
}
]
}
]
Retrieves aggregated statistics computed from mobility data for all the users.
GET https://{base_url}/statistics
Generates a response containing the statistics for all the users which have data in the dataset
Type | Name | Description | Possible values | Default |
---|---|---|---|---|
integer | fromoptional | the timestamp of the earliest data (in millisecond precision) | yesterday midnight (CET) | |
integer | tooptional | the timestamp of the latest data (in millisecond precision) | 24 hours after from |
Type | Name | In | Type |
---|---|---|---|
apiKey | Authorization | header | awsSigv4 |
HTTP code | Description |
---|---|
200 | OK |
400 | Error with timestamps |
Example:
{
"total": {
"duration": 110936.71,
"distance": 9688639.19,
"CO_2": 2031776.53,
"count": 4
},
"non-motorized/pedestrian/walk": {
"duration": 65.4,
"distance": 176.08,
"CO_2": 0.88,
"count": 1
},
"stationary": {
"duration": 36555.73,
"distance": 0,
"CO_2": 0,
"count": 4
},
"motorized/road/car": {
"duration": 9675122.13,
"distance": 41748.31,
"CO_2": 2031775.65,
"count": 1
}
}
Retrieves the list of users with relative firts and last data timestamps
GET https://{base_url}/users
Generates a response containing the user id along with his/her first and last data timestamps
Type | Name | In | Type |
---|---|---|---|
apiKey | Authorization | header | awsSigv4 |
HTTP code | Description |
---|---|
200 | OK |
500 | Internal server error |
Example:
[
{
"uuid": "YYY:0000xxx0x-00x0-00x0-xx0x-0x00x00x00",
"first_upload": 1539787268169,
"last_upload": 1539960161000,
"guid": null
}
]
guid: your own application id for the mobile installation. MOPRIM is not responsible of setting it.
Retrieves the user metadata, including relative firts and last data timestamps
GET https://{base_url}/users/{user_id}
Generates a response containing the list of all users along with their first and last data timestamps
Type | Name | Description | Possible values | Default |
---|---|---|---|---|
string | user_idpath | the user id |
Type | Name | In | Type |
---|---|---|---|
apiKey | Authorization | header | awsSigv4 |
HTTP code | Description |
---|---|
200 | OK |
404 | User not found |
500 | Internal server error |
Example:
{
"uuid": "YYY:0000xxx0x-00x0-00x0-xx0x-0x00x00x00",
"first_upload": 1539787268169,
"last_upload": 1539960161000,
"guid": null
}
guid: your own application id for the mobile installation. MOPRIM is not responsible of setting it.