Releasing the OpenAPI specification for the hl2 Panorama API

March 18, 2019
☕ 2 min read

With the release of our new documentation web site, powered by Hugo, we’re also releasing the OpenAPI Specification for the hl2 Panorama API. As you already know, hl2 Panorama provides a REST API which can be used to integrate and administrate it easily. Every language has an HTTP client so you can script and integrate it as you want! As an example, the following JS script will log the authenticated account to the console:

import fetch from "fetch";

const options = {
  method: "GET",
  headers: { Authorization: "Bearer API_KEY" }
};

fetch("https://api.hl2.com/panorama/v1/account", options).then(response =>
  console.log(response)
);

If you want to know where the API key is coming from 👉 browse the Authentication chapter in our documentation.

We’re trying our best to respect the HTTP standards (methods, status codes, …) and to provide meaningful endpoints to reduce the learning curve and to facilitate the integration into your infrastructure.

In this context, we have chosen the OpenAPI standard to describe the available API endpoints. The OpenAPI standard is heavily used and offers a lot of tools. It can also be imported in Postman without effort (see this chapter in our documentation).

You can browse the latest version of the hl2 Panorama specification here and the GitHub repository is public and can be accessed here.

Thanks for reading and helping us expand the IoT world!