Version 4

Overview

Tangent Information Modeler (TIM) is very mature and powerful forecasting / anomaly detection engine for a wide variety of different industries.

Produces “best of class” forecasting/anomaly detection results with automatic built-in model optimizer and effective data mining features. Model building is driven by an information criteria that optimizes directly generalization rather than model fit to the data, and thus, the constructed models have an excellent generalization ability.

TIM supports a wide range of forecasting / anomaly detection scenarios for energy and manufacturing industry, comes fully automatic and requires no mathematical know-how. Hence it can be easily used by a typical business user with basic domain knowledge.

This documentation describes how to use Tangent Works TIM Web Service to obtain model building result (model) and do the consequent prediction / anomaly detection using existing model.

Web Service Location

Tangent Works' Web Service REST API is located at https://timws.tangent.works/v4/swagger.yaml. If you'd like to use specific minor version, replace v4 with e.g. v4.0 in the above URL.

This specification describes all available methods and object definitions.

You can also get detail overview of API at https://timws.tangent.works/v4/redoc.html If you'd like to open specific minor version, replace v4 with e.g. v4.0 in the above URL.

Web Service Interaction

Direct TIM Web Service interaction

UI version of TIM REST API, which allows visualization and interaction with the API’s resources (without the requirement to have the implementation logic in place) can be found at https://timws.tangent.works/v4/swagger-ui.html. If you'd like to open specific minor version, replace v4 with e.g. v4.0 in the above URL.

Authentication

User accounts

In order to be able to call any of the available methods, a valid license and user account must be used.

Authentication methods

Basic authentication

Successful authentication requires the following:

  1. Configure the client to use Basic authentication with your username and password.
  2. Send your license key in HTTP header named License-Key.
  3. Send API key in HTTP header named Api-Key.

Token authentication (since version 4.1)

Alternatively, you can use TIM License Manager to obtain a token and use it for authentication as following:

  1. Configure the client to use Bearer authentication with your token.
  2. Send API key in HTTP header named Api-Key.

The client will be notified of authentication problems upon calling any method.

Web Service Architecture

TIM Web Service high level architecture is visualized below. A very important feature of this architecture is scalability. The highest computational complexity is distributed to the TIM Worker units. When computational demand increases, additional TIM Workers can be started, or are automatically started through the “Azure Container Instances” service.

image16.png Figure 1: TIM Web Service Architecture

Methods Overview

TIM Web Service provides several asynchronous methods:

  • /prediction/build-model
  • /prediction/predict
  • /prediction/build-model-predict
  • /detection/build-model
  • /detection/rebuild-model
  • /detection/detect

The status and the result of these methods can be retrieved with:

  • /prediction/build-model/{uuid}
  • /prediction/predict/{uuid}
  • /prediction/build-model-predict/{uuid}
  • /detection/build-model/{uuid}
  • /detection/rebuild-model/{uuid}
  • /detection/detect/{uuid}

These status request methods are typically called on a regular basis. The “status” property in the responses contains information about the current status of the methods. When the current model building/forecasting/anomaly detection job successfully finishes, the value of the “status” property will be “Finished”.

The usual flow i.e. for prediction process is visualized in the picture bellow:

image17.png Figure 2: /prediction/predict method flow

Conventions

  1. All requests and responses are in JSON format.

  2. All timestamps shall be in UTC.

  3. Date-time objects in requests / responses are represented with standard JSON “date-time” objects, which conform to ISO 8601 specification:

    Example: "2010-10-01T00:00:00Z"

  4. NaN (not a number) and Inf (infinity) values are not supported by TIM Web Service.