Octave API

How do I apply blueprint to device using an API call ?
Thanks.

Hello Roman,

You will need to update the device object, Specifically this section of the device object.

“localVersions”: {
“batteryService”: “1.0”,
"blueprintVersion": 0,
“io”: “0.0.1”,
“cloudInterface”: “0.0.22”,
“lcd”: “1.0.0”,
"blueprintId": “”,
“dataHub”: “656360ee655c81c791a741fbce767107”,
“redSensor”: “3.0”,
“util”: “1.0.0”,
“changeDate”: 1535122524739,
“location”: “0.0.1”,
“actionRunner”: “0.0.1”,
“firmware”: “SWI9X06Y_02.14.04.00”
},

In the localVersions section above you will update the “blueprintId”: “”, and the **“blueprintVersion”: 0,**emphasized text

A link to information about the device object is here:

A link of how to update the device object is here:

Please pay attention to this note under the API reference!

As shown in the example, to update a single compound attribute (i.e. a single attribute inside the “state” object), you must supply the full object.

To list all or specific blueprints (filtering options at https://rest.octave.dev/#filtering) and get the blueprint id, use this API
https://rest.octave.dev/#listing-company-blueprints

To read a blueprint and its contents:

I will post a real life example on this thread. This will give you some time to digest the API reference information.

Example: Read device information
Example of how to read a device by its name rather than it’s internal id to get the current blueprint information using “filtering” and the “only” parameter.

GET https://octave-api.sierrawireless.io/v5.0/<your_octave_company_name/device/?filter=name==’<your_internal_device_name>’&only=name,localVersions

curl --location --request GET ‘https://octave-api.sierrawireless.io/v5.0/iot_solutions/device/?filter=name==‘fx30s_r2c_djudkins’&only=name,localVersions
–header ‘X-Auth-Token: <your master token’ \
–header ‘X-Auth-User: <your_userid>’ \
–data-raw ‘’

Response:
{
“head”: {
“status”: 200,
“ok”: true,
“messages”: ,
“errors”: ,
“references”: {}
},
“body”: [
{
“id”: “d5d66df6ab3f311590eb79cff”,
“localVersions”: {
“edge”: “2.1.4-4-gb8632fa”,
“legato”: “OTVFX2.1.4”,
“blueprintVersion”: 4,
“changeDate”: 1586275506559,
“firmware”: “SWI9X06Y_02.22.12.00”,
“blueprintId”: “b5e71540ff73ccb84114dfbb6”
},
“name”: “fx30s_r2c_djudkins”
}