Skip to main content

Spotflow API Overview

Download OpenAPI Specification

While the Portal and CLI are the recommended ways to perform common task on the Spotflow IoT Platform, the API is the most flexible way of interaction. This section describes the basic principles of the API and provides a reference for all available endpoints.

See Get Started for hands-on experience.

Design Principles

The API is based on the HTTP protocol and uses JSON as the data format. The endpoints have resource-oriented URLs and use standard HTTP verbs and response codes. In the case of an error, the response body contains a JSON object with the error details in the standard "problem details" format.

Hostname

Unless your organization has a dedicated instance of the Platform, you'll use the default instance that is located at the following URL:

https://api.eu1.spotflow.io

Authentication

Each request to the API must contain an API access token in the Authorization header of the HTTP request:

Authorization: Bearer <Your API Access Token>

You can obtain a short-term API access token from the Portal:

  1. Click the user icon in the top right corner of the page.

  2. Open the link Preferences.

  3. Click Copy token to copy the API access token to your clipboard. Note it somewhere so that you can use it in the following steps.

info

Currently, it's not possible to call the API without the presence of a User, because the API access token must be obtained manually from the Portal and is only short-term. We're working on removing this limitation so that the API can be used in fully automated scenarios.

Endpoints

All the endpoints are listed in the left menu, grouped by the types of the Platform assets they operate on. For example, the Data Flow section contains the endpoints for managing Streams, Stream Groups, Egress Routes, and Egress Sinks.

You can also download the OpenAPI specification.