API Configuration

Welcome to the API configuration guide for the Observ platform.

This document provides detailed instructions on how to effectively set up and manage API interactions within the Observ environment. Understanding how to configure and use APIs is crucial for seamless integration and automation of processes on the Observ platform.

Obtain the API Endpoint

  • Endpoint URL Construction: Start with the Observ website address and append /apiserver to access the API service.

  • Example: If your Observ URL is https://www.linkervisionai.com/observ, your API endpoint will be https://www.linkervisionai.com/observ/apiserver

Authentication

To ensure secure access to our API, authentication is required for each call.

Below are the details for setting up the necessary headers for HTTP API calls and parameters for Websocket connections.

Headers

Name
Content
Description
Required

Authorization

Bearer {bearer token}

Do authentication

Yes

X-Service-Id

Get from Observ UI

Which workspace you want to access

Yes

1. Get Auth Token

This API endpoint is used to obtain an access token for authentication purposes. Please note the following important considerations:

  • Token Expiry: The obtained token expires after 24 hours.

  • Rate Limit: The usage of this API is limited; frequent calls are discouraged to avoid hitting the rate limit.

Endpoint: POST /users/token

Body:

Field
Description
Type
Required

email

The user email you’re going to login VisionAI

string

Yes

password

The user password you’re going to login VisionAI

string

Yes

Example Request:

POST /users/token
{
  "email": "your_email@example.com",
  "password": "your_password"
}

Response:

{
    "access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6Il9lYk5wVndQSGhaNks4WjdUVkRONyJ9.eyJpc3MiOiJodHRwczovL2RhdGEtZW5naW5lLXN0YWdpbmcuanAuYXV0aDAuY29tLyIsInN1YiI6ImF1dGgwfDY2MzlkODE0NzI0OGI5NTNjM2FiMmFhYiIsImF1ZCI6WyJodHRwczovL3N0YWdpbmcuZGF0YXZlcnNlLmxpbmtlcnZpc2lvbi5haS9hdXRoMC9hcGkvIiwiaHR0cHM6Ly9kYXRhLWVuZ2luZS1zdGFnaW5nLmpwLmF1dGgwLmNvbS91c2VyaW5mbyJdLCJpYXQiOjE3MTY0MzczNDMsImV4cCI6MTcxNjUyMzc0Mywic2NvcGUiOiJvcGVuaWQgcHJvZmlsZSBlbWFpbCBhZGRyZXNzIHBob25lIiwiZ3R5IjoicGFzc3dvcmQiLCJhenAiOiJGV1g0eHFXMXFmNUNrVTlvRkNqZmhaeDJETFV3aGlDMyJ9.iWOaV1kw7iWg0PG_2ZaVIx_-ZGj1Ghl-ckccdibmnbQzUulpbj6ichq2ogHzwRERWXj9OR5pZuDAqJGbNqfw6WYq_9kjxppa7sGedOYIHAb4T9b1tjJrDbhqL9ShMZKk6H0PXHZDnvjQtcsWU-UaXi-W2X8NkhnnvJgtdJHxAF7CLUqm90Aau5jyc8MQDUy8o6grD1ITHoYLg0wyOLyuAu1eyG3Z0b_BKHt5kMXkX_9HOLFuEzkheqwNH-KhWoNO_juNEgTX8CdJSXiSD29Uj6izQ4AetaM99apyKa4nVdpazSwVhnlGMcEh0fatBmFzbqvPd7Fvf-xtMUK32HAc2f"
}

Response Fields:

Field
Description
Type

access_token

The access token to for Bearer authorization

string

2. Get Service ID

  1. Please open the Observ site with the workspace you want to access

  2. Go to the system-management page, click the API Configuration button on the right-top corner

  3. You can see the Service ID on the pop-up window, please copy the Service ID

  4. Fill HTTP header name X-Serivce-Id with the copied ID

Last updated