Skip to main content
Skip table of contents

Tangent Docker

Description

Tangent Docker is a lightweight version of Tangent that allows the user to access Tangent as a single docker container. The docker image can be pulled straight from the Tangent Works container registry and only requires a license token to access. The license token can be obtained by contacting a Tangent Works representative.

The docker container contains a simple API aligned with the Tangent API allowing you to easily access the core functionalities.

Installation

  1. Tangent Works Container Registry access:
    Obtain a service principal username & password from a Tangent Works representative.

BASH
docker login tangentworks.azurecr.io --username <username> --password <password>
  1. Pull tangent-docker-image
    To pull the latest version of Tangent Docker from the container registry, run the following command:

BASH
docker pull tangentworks.azurecr.io/tangent-docker-image:latest

In order to pull a specific version make sure to modify the tag from “latest” to “v.X.Y.Z”.
For example:

BASH
docker pull tangentworks.azurecr.io/tangent-docker-image:v1.0.0
  1. Run tangent-docker
    To run the latest version of Tangent Docker, run the following command:

BASH
docker run -d -p 8000:8000 --name tangent-docker tangentworks.azurecr.io/tangent-docker-image:latest

In order to run a specific version make sure to modify the tag from “latest” to “v.X.Y.Z”.
For example:

BASH
docker run -d -p 8000:8000 --name tangent-docker tangentworks.azurecr.io/tangent-docker-image:v1.0.0
  1. Complete installation
    Wait for the container to start. The container is ready when 2 messages are displayed in the logs:
    API is ready to receive requests on port 8000
    Worker is ready to process jobs

Now Tangent Docker is ready to process requests.

Using Tangent Docker

1) Overview

The Tangent Docker API exposes endpoints for:

  • Auto Forecast (async job-style forecasting)

  • Forecasting (build model, predict, root-cause analysis)

  • Anomaly Detection (build model, detect anomalies, root-cause analysis)

Most endpoints accept:

  • a CSV dataset (uploaded as a file), and

  • a JSON configuration (uploaded as a file),
    and some also accept:

  • a JSON model (uploaded as a file).

2) Base URL

The API within the docker container will be available on port 8000. Use this base server URL:

  • http://localhost:8000

Swagger UI (interactive endpoint reference):

  • http://localhost:8000/swagger-ui.html

Tip: Swagger UI is the source of truth for exact schemas, required fields, and response formats.

3) Authentication

The API is secured using Bearer token authentication. Send this header on every request:

CODE
Authorization: Bearer <TOKEN>

4) Request format

4.1 Multipart form uploads (most POST endpoints)

POST endpoints use multipart/form-data with file parts:

  • dataset: CSV file content (Content-Type: text/csv)

  • configuration: JSON content (Content-Type: application/json)

  • model: JSON content (Content-Type: application/json) — only for predict/detect/rca flows that require a model

4.2 Result downloads

Some “results” endpoints return CSV in the response body.

5) Endpoint map (high-level)

Auto Forecast

  • POST /auto-forecast → submit job

  • GET /auto-forecast/{id} → status

  • GET /auto-forecast/{id}/results → results CSV

  • GET /auto-forecast/{id}/model → model JSON

  • DELETE /auto-forecast/{id} → delete job

Forecasting

  • POST /forecast/build-model

  • POST /forecast/predict

  • POST /forecast/rca

  • GET /forecast/{id} → status

  • GET /forecast/{id}/results → results CSV

  • GET /forecast/{id}/model → model JSON

  • GET /forecast/{id}/rca-table → RCA table JSON

  • DELETE /forecast/{id} → delete job

Anomaly Detection

  • POST /anomaly-detection/build-model

  • POST /anomaly-detection/detect

  • POST /anomaly-detection/rca

  • GET /anomaly-detection/{id} → status

  • GET /anomaly-detection/{id}/results → results CSV

  • GET /anomaly-detection/{id}/model → model JSON

  • GET /anomaly-detection/{id}/rca-table → RCA table JSON

  • DELETE /anomaly-detection/{id} → delete job

Whether a call returns an immediate result or a job id to poll depends on the specific endpoint and configuration; confirm in Swagger UI.

6) Quickstart workflows

6.1 Auto Forecast (job-based)

  1. Submit the job

  2. Poll status until complete

  3. Download results CSV (and optionally the model JSON)

  4. Delete the job when finished (optional)


7) Where to find exact schemas

Use Swagger UI to confirm:

  • required fields in configuration

  • dataset column requirements

  • response schema and the exact key name that contains a job id

  • status field names and terminal states

Swagger: http://localhost:8000/swagger-ui.html

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.