API for managing mounts and associated entities
API for managing mounts and associated entities
curl -i -X GET \
'https://docs.obh-mobility.com/_mock/api-definitions/obh-mobility/mounts?currentPage=1&macAddress=string&mountUid=string&pageSize=10&serialNumber=string' \
-H 'Access-Key: YOUR_API_KEY_HERE'List of all mounts with pagination
{ "mounts": [ [ … ] ], "pagination": { "currentPage": 0, "pageSize": 0, "totalItems": 0, "totalPages": 0 } }
This operation will request the association of a mount to the account. If the mount is not in a INACTIVE state, it has to be owned by the account, otherwise the request will be rejected. After this request is successful, the mount will be in a IDLE state, unless it's already associated. Once in IDLE, the association has to be confirmed within 10 minutes. Doing this request while being already the owner allows you to refresh the public key in the mount. If the mount doesn't exist, it will be created, otherwise it will be updated based on the uid.
curl -i -X POST \
https://docs.obh-mobility.com/_mock/api-definitions/obh-mobility/mounts \
-H 'Access-Key: YOUR_API_KEY_HERE' \
-H 'Content-Type: application/json' \
-d '{
"uid": "string",
"serialNumber": "string",
"macAddress": "string",
"firmwareRevision": "string",
"softwareRevision": "string",
"modelNumber": "string",
"name": "string"
}'[ { "code": "ASSOCIATE_OWNER", "data": { … }, "generatedAt": "2023-12-12T17:24:43.000Z", "payload": "2023-12-12T17:24:43.000Zb2413500-8106-4530-b7dc-91ebe3b6236605A2F4C21C7D560D3C5DCDB1581B2B8", "signedToken": null }, { "code": "RELEASE_HELMET", "data": { … }, "generatedAt": "2023-12-12T17:24:43.000Z", "payload": "12023-12-12T17:24:43.000Z28C6A9258EC9579187175AD6FE4FD55B929F0BFC9F008FEBE082D64474B5DE9E2FC2B51EA207", "signedToken": "28C6A9258EC9579187175AD6FE4FD55B929F0BFC9F008FEBE082D64474B5DE9E2FC2B51EA207" } ]
curl -i -X POST \
'https://docs.obh-mobility.com/_mock/api-definitions/obh-mobility/mounts/{uid}/confirm-association' \
-H 'Access-Key: YOUR_API_KEY_HERE'curl -i -X GET \
'https://docs.obh-mobility.com/_mock/api-definitions/obh-mobility/mounts/{uid}' \
-H 'Access-Key: YOUR_API_KEY_HERE'Mount details retrieved successfully
Whether the mount is locked or not, null if not available. Value computed from the states.
Whether the helmet is mounted or not, null if not available. Value computed from the states.
Battery level in percentage (0-100) no decimals, null if not available. Value computed from the states.
CPU temperature in Celsius, 1 decimal, null if not available. Value computed from the states.
[ { "uid": "b2413500-8106-4530-b7dc-91ebe3b6236", "name": "My favorite mount", "serialNumber": "1234567890", "macAddress": "00:00:00:00:00:00", "firmwareRevision": "NCS2.4.0", "softwareRevision": "0.99.2", "modelNumber": "52832-OP", "associationState": "ASSOCIATED", "mountLocked": false, "helmetMounted": true, "batteryLevel": 82, "cpuTemperature": 45.5, "associatedAt": "2023-12-12T17:24:43.000Z" } ]
curl -i -X PATCH \
'https://docs.obh-mobility.com/_mock/api-definitions/obh-mobility/mounts/{uid}' \
-H 'Access-Key: YOUR_API_KEY_HERE' \
-H 'Content-Type: application/json' \
-d '{
"name": "string",
"softwareRevision": "string"
}'Mount details updated successfully
Whether the mount is locked or not, null if not available. Value computed from the states.
Whether the helmet is mounted or not, null if not available. Value computed from the states.
Battery level in percentage (0-100) no decimals, null if not available. Value computed from the states.
CPU temperature in Celsius, 1 decimal, null if not available. Value computed from the states.
[ { "uid": "b2413500-8106-4530-b7dc-91ebe3b6236", "name": "My favorite mount", "serialNumber": "1234567890", "macAddress": "00:00:00:00:00:00", "firmwareRevision": "NCS2.4.0", "softwareRevision": "0.99.2", "modelNumber": "52832-OP", "associationState": "ASSOCIATED", "mountLocked": false, "helmetMounted": true, "batteryLevel": 82, "cpuTemperature": 45.5, "associatedAt": "2023-12-12T17:24:43.000Z" } ]
curl -i -X DELETE \
'https://docs.obh-mobility.com/_mock/api-definitions/obh-mobility/mounts/{uid}' \
-H 'Access-Key: YOUR_API_KEY_HERE'curl -i -X POST \
'https://docs.obh-mobility.com/_mock/api-definitions/obh-mobility/mounts/{uid}/states' \
-H 'Access-Key: YOUR_API_KEY_HERE' \
-H 'Content-Type: application/json' \
-d '{
"states": [
[
{
"code": "BATTERY_LEVEL",
"value": "82",
"occurredAt": "2023-12-12T17:24:43.000Z"
},
{
"code": "CPU_TEMPERATURE",
"value": "45.5",
"occurredAt": "2023-12-12T17:24:43.000Z"
},
{
"code": "MOUNT_LOCKED",
"value": "1",
"occurredAt": "2023-12-12T17:24:43.000Z"
}
]
]
}'curl -i -X GET \
'https://docs.obh-mobility.com/_mock/api-definitions/obh-mobility/mounts/{uid}/query?alarmMode=OFF&alarmSensitivity=HIGH&alarmVolume=HIGH&code=string&rfidMode=NORMAL&tagUid=string' \
-H 'Access-Key: YOUR_API_KEY_HERE'[ { "code": "ASSOCIATE_OWNER", "data": { … }, "generatedAt": "2023-12-12T17:24:43.000Z", "payload": "2023-12-12T17:24:43.000Zb2413500-8106-4530-b7dc-91ebe3b6236605A2F4C21C7D560D3C5DCDB1581B2B8", "signedToken": null }, { "code": "RELEASE_HELMET", "data": { … }, "generatedAt": "2023-12-12T17:24:43.000Z", "payload": "12023-12-12T17:24:43.000Z28C6A9258EC9579187175AD6FE4FD55B929F0BFC9F008FEBE082D64474B5DE9E2FC2B51EA207", "signedToken": "28C6A9258EC9579187175AD6FE4FD55B929F0BFC9F008FEBE082D64474B5DE9E2FC2B51EA207" } ]
curl -i -X DELETE \
'https://docs.obh-mobility.com/_mock/api-definitions/obh-mobility/mounts/{uid}/abandon' \
-H 'Access-Key: YOUR_API_KEY_HERE'