Introduction

ZED Hub exposes a REST API granting access to all of ZED Hub’s resources programmatically.

It is mainly addressed to developers aiming to implement their own solutions with ZED Hub.

Authentication

Just like you are logged in with a username + password when using a website, all your requests to the REST API need to be authenticated with an API Token to ensure your data is secured.

API Token are generated from the API panel of your ZED Hub account, and can be revoked anytime.

For security reasons, the token will only be visible once, so make sure to copy its value and store it securely.

When performing REST API requests, the API token can be shared in the following way:

  • Authorization header (recommended): Add a header to your requests named Authorization and containing Bearer {api_token}
    • Authorization: Bearer 24abc162-8f5b-40f8-8616-3d28305d549c

How to use the REST API with curl

Here is a sample rest API call using curl, a command line REST request tool. Here we will retrieve the list of all of your workspaces:

curl -s \
  -H "Content-Type:application/json" \
  -H "Authorization:Bearer ${access_token}" \
 https://hub.stereolabs.com/api/v1/workspaces

All available REST API calls can be found in the REST API reference.