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

Issuing REST Requests from Within Cloud Actions

Within a Cloud Action you have the option to invoke REST endpoints of external, third-party REST APIs using Octave's http methods such as Octave.Http.get(). This topic provides a simple example showing how to invoke this method in a Cloud Action.

The steps below example illustrate how to set up a Cloud Action to invoke a REST GET request:

  1. Create a Cloud Action and set Source stream or tag to Stream.
  2. Enter the following code into the Cloud Action and modify it as required. Here, Octave.Http.get passed the URL of an hypothetical endpoint to invoke a GET request on, along with a JSON object (options) containing the header values to include:
function(event) {
   var options = { "X_API_KEY": "AN API KEY", "OTHER_HEADER": "OTHER HEADER VALUE" };
   // With a GET method
   var resultGet = Octave.Http.get("http://myprivateapi.com/endpoint", options);

   // Your code here

   return {}
}
  1. Click Save.

📘

Note:

For additional APIs see: Cloud JavaScript Library.

Updated about a month ago

Issuing REST Requests from Within Cloud Actions


Suggested Edits are limited on API Reference Pages

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