Get Available Sensor Manufacturers API
Require Authentication
This API is used to get available sensor manufacturers registered in database to be used in sensor management.
URL
api/sensors/manufacturer
Required parameter (POST)
- deviceID
- token
Optional parameter (GET)
All optional parameters use GET method. So it should be embedded in the URL, e.g: api/manageassets/categories?q=manu%202&o=manufacturerName
- q «contains keyword that want to be looked for. Keyword will search sensorCompany field only»
- o «used to sort data, contains field name. Available value: sensorstokenID, sensorCompany. Default value: sensorstokenID»
- ot «used to sort data, contains sort type. Available value: asc, desc. Default value: asc»
- per_page «indicates how many data that will be displayed in each call. Value must be a number between 1 to 500. Default value: 500»
- offset «indicates the first data index that will be displayed in each call. Value must be a number with minimum value is 0. Default value: 0»
Example JSON Payload
{
"deviceID": "ABCD-EFGH-IJKL-MNOP",
"token": "bb602ab13b8090268cd6e3bb9dfa39e2"
}
Possible return HTTP status code
- 200
- 401
- 405
Return message
{
"status": "success",
"message": {
"current_parameter": "?offset=0",
"next_parameter": "?offset=0",
"previous_parameter": "?offset=0",
"start": 0,
"total": 1,
"lists": [{
"sensorstokenID": 1,
"sensorCompany": "LX Group",
"count_sensors": 1
}]
}
}
Note: use "next_parameter" and "previous_parameter" to go to next or previous result page. Just combine it with the API URL, e.g: "api/sensors/manufacturer"+next_parameter or "api/sensors/manufacturer"+previous_parameter