The API to retrieve the signals list is the following
GET https://api.databoom.com/v1/signals/
To call the API a token OAuth with Read permission is needed.
It is possible to specify some parameters to change the call results:
- page and per_page allow to specify the number of the requested page of the signals list and the number of signals per page
- populatePermission returns the permissions of the single signals
- showHiddenElements returns also the signals set as hidden
Same call in cURL is
curl -X GET 'https://api.databoom.com/v1/signals/?page=2&per_page=100&populatePermission=true&showHiddenElements=true' -H 'Authorization: Bearer <OAuth Token>'
The API responds with the impaginated list of signals accesible to the user.
Follows an example response, the only signal present is the pressure of weather device of Trento.
Of particular importance in using APIs are items _id, they're required to reference the same items in requests. For example, if you need to retrieve Trento pressure signal data you'll need to specify the signal id in the POST /chart API call.
{ "data": [ { "_id": "5aa2533bae696741894be82f", "device_token": "6541469", "signal_token": "pressure", "device": { "description": "Trento (IT)", "device_token": "6541469", "com_status": "ACTIVE", "tags": [], "_id": "5a5a149487761f00012647fe" }, "device_description": "Trento (IT)", "description": "pressure", "permissions": [ { "user_id": "566936fc31a69bc412714727", "roles": "CREATOR", "_id": "5a5a149487761f0001264800", "max_chart_history": 0, "fake": false, "is_a_team_member": false } ], "public_obj": true, "deleted": false, "type": "5718ca3f4ef29d440851589b", "status": "ACTIVE", "last_recived_value": 1019, "last_conn": "2019-05-07T09:41:00.000Z", "device_lower_description": "trento (it)", "device_token_low": "6541469", "bookmarked": false, "hidden": false, "lower_description": "pressure", "last_value_elaborated": 1019, "role": "VIEW" } ], "pages": { }, "total_items": 1 }
0 Comments