Working with DEVICES
* In this section JWT Toke is necessaire
GET - DEVICE_INFO return information
Parameters:
JWT Token needed
data = {name: '1234567890'}
Or
data = {uuid: 'uuid of device'}
curl -X GET "https://app.sequor.it/producerApi/api/v0/production/device_info" -d {name: '1234567890'} -H "Content-Type: application/json"
The result is a "Bearer Token"
Like this:
{"status":"OK","name":"12121212","uuid":"b7aa5867-5639-4416-b340-bb0d7b099f8d","description":"","std":"ATTIVE","cat":"CDL"}
Rails Example
Example of calling:headers = {content_type: 'application/json', accept: :json, authorization: @token, params: {uuid: uuid}}
ret = RestClient.get(@address_server + 'device_info', headers)
GET - DEVICE_INFO_PLUS return information for device AUTENTICATIONS
Parameters:
JWT Token needed
data = {uuid: 'uuid of device'}
curl -X GET "https://app.sequor.it/producerApi/api/v0/production/device_info_plus" -d {name: '1234567890'} -H "Content-Type: application/json"
The result is a "Bearer Token"
Like this:
{"status":"OK","macaddr":"12121212","firmware_key":"....","rsa_private":"......","rsa_public":".......","driver_uuid":"b7aa5867-5639-4416-b340-bb0d7b099f8d"}
- macaddr number serial of device if exist
- firmware_key Password to access device
- rsa_private Key private of device for authentication
- rsa_public Key public to write in device
- driver_uuid Driver used from device
POST - DEVICE_DRIVER return information driver device
Parameters:
JWT Token needed
data = {name: 'name of driver'}
Or
data = {uuid: 'uuid of driver'}
curl -X POST "https://app.sequor.it/producerApi/api/v0/production/device_driver" -d {name: '1234567890'} -H "Content-Type: application/json"
The result is a "Bearer Token"
Like this:
{"name":"1234567890", uuid: '', description: '', std: '', cat: '', version: '1', revision: '1', specify: '....', type: 'XML'}
Rails Example
data = {ddr_uuid: 'uuid of device'}@token = RestClient.post('https://app.sequor.it/producerApi/api/v0/production/device_driver', data.to_json, content_type: 'application/json', accept: :json, authorization: @token)
POST - DEVICE_API_INSTALLED confirm device is used in production
Parameters:
JWT Token needed
uuid: uuid of driver
installed_by: string identifier of installation (optional, max 255 chars)
curl -X POST "https://app.sequor.it/producerApi/api/v0/production/device_api_installed" -d {uuid: 'f380707f-6ddb-4c60-b267-452f8a288280'} -H "Content-Type: application/json"
The result is a "Bearer Token"
Like this:
{"status":"OK", name: 'device code', description: 'description of ...', uuid: ''}