The Octave Developer Hub

Welcome to the Octave developer hub. You'll find comprehensive guides and documentation to help you start working with Octave as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started

Using the REST API in an External System

Octave provides a REST API consisting of Octave objects (e.g., Devices, Events, etc.) that you can invoke from an external cloud entity to read or push data into Octave. For example, you can use the REST API to update devices in your deployment. create Events, etc. from any external system that has internet access.

This topic provides a simple example of using the REST API's Event Object to create Events for a specific device. In this example, the POST /{company ID}/event/{stream ID} endpoint is used to post an Event with a single key/value (measure) to a Stream. For additional information see: Setting a Value From a REST API Call.

📘

Note

In order to invoke the endpoints, you must first obtain your master token and user ID. These are both available in the Octave Dashboard on the Administration > Master token screen.

Request

curl -X "POST" "https://octave-api.sierrawireless.io/v5.0/my_company/event/s5b7310ae6f38613585853e5b" \
     -H 'X-Auth-Token: <token>' \
     -H 'X-Auth-User: <user>' \
     -d $'{
  "elems": {
    "measure": 7
  }
}'

Response

The messages field in the response indicates the result of the request and the id indicates the ID of the Event that was added:

{
   "head":{
      "status":201,
      "ok":true,
      "messages":[
         "Your request has been processed successfully. A new resource has been created."
      ],
      "errors":[

      ],
      "references":{

      }
   },
   "body":{
      "id":"e5b7311856f38613585853e61",
      "streamId":"s5b7310ae6f38613585853e5b",
      "creationDate":1534267781805,
      "generatedDate":1534267781805,
      "path":"/my_company/streamname",
      "version":0,
      "elems":{
         "measure":7
      }
   }
}

Updated 10 days ago

Using the REST API in an External System


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.