AI Inference Server API v2.1.0

AI Inference Server Function Manual

Portfolio
Industrial AI
Product
AI Inference Server
Software version
2.1.0
Language
en-US

Application programming interface of the AI Inference Server that stores data (e.g. mapping of variables, parameters, connections, configurations etc.) and allows the product or service to communicate with other internal AI Inference Server components (e.g. Model Distributor, Orchestrator, Python Runtime etc.).

General operations

Endpoints for getting version, handle logs and configuration on application level.

Endpoint

Information

GET /v2/application/build

Get the API build information

Responses:

- 200: The API and application version, production flag and the maximum number of deployed pipelines

GET /v2/application/logs

Get the stored log messages

Parameters:

- limit (query): The limit of the number of returned log messages

- applications (query): The name of the applications in a comma separated list. Empty by default, which means all of the applications

- logLevels (query): The log levels for the applications, given in comma separated numbers as string (1: Debug, 2: Info, 3: Warn, 4: Error, 5: Fatal). Empty by default, which means all of the log levels

Responses:

- 200: List of the logs

- 400: Invalid log levels (E20025) parameter

POST /v2/application/log

Create a new log message for requested application on a specified level

Request body: The new log message object

Responses:

- 201: The created log

- 400: Invalid log level (E20025)

DELETE /v2/application/log

Deletes log messages from each internal component

Request body: The log keep time object

Responses:

- 200: Log deletion successful

- 400: Invalid keep time (E20041)

- 500: Failed to delete log messages (E70003)

GET /v2/application/log/level/api

Checking whether the log level of API is debug

Responses:

- 200: Returns true if the debug log level is enabled for API, otherwise false

PATCH /v2/application/log/level/api

Enable or disable debug mode for API

Request body: The debug log level is enabled or not for API

Responses:

- 200: Returns true if the debug log level is enabled for API, otherwise false

- 500: Failed to set log level (E70001)

GET /v2/application/log/level/runtime

Checking whether the log level of Runtimes is debug

Responses:

- 200: Returns true if the debug log level is enabled for Runtimes, otherwise false

PATCH /v2/application/log/level/runtime

Enable or disable debug mode for Runtimes

Request body: The debug log level is enabled or not for Runtimes

Responses:

- 200: Returns true if the debug log level is enabled for Runtimes, otherwise false

- 500: Failed to set log level (E70001)

GET /v2/application/log/download/{date}

Return the logs in compressed file for the specified date

Parameters:

- date (path): Given date in ISO string format or in yyyy-mm-dd format

Responses:

- 200: The requested logs in a single zip file

- 400: Invalid date. The format can be wrong, or it is in the future or earlier than 30 days (E20024)

- 500: Error during creating archive due to file system error (E70002)

GET /v2/application/configuration

Get the application configuration

Responses:

- 200: The application configuration

- 500: Failed to fetch the application configuration (E00001)

PATCH /v2/application/configuration

Update the application configuration

Request body: The new configuration

Responses:

- 200: The updated application configuration

- 500: Failed to update the application configuration (E00001)

General operations with a single pipeline

Endpoints for pipeline creation, activation and modification and getting pipelines.

Endpoint

Information

GET /v2/pipeline

Get the list of the pipelines and its components. The list based on the (optional) query.

Parameters:

- name (query): The name of the pipeline

- version (query): The version of the pipeline

- packageId (query): Unique identifier of the pipeline's package

Responses:

- 200: The pipeline list

- 500: Failed to fetch pipelines (E00001)

POST /v2/pipeline

Creating new pipeline using configuration package. It is not allowed to import in parallel.

Request body: The configuration package to be uploaded

Responses:

- 201: The created pipeline

- 400: Invalid pipeline name, version, path (E20001, E20021) or invalid origin ID (E20001) or invalid package ID (E20013) or duplicated pipeline (E20030, E20028) or import is in-progress (E20037) or Model Distributor error (E80000)

- 500: Failed to upload the file (E00003) or failed to call Model Distributor (E80000) or failed to create pipeline (E10002)

GET /v1/pipeline/{id}

Get the details about the pipeline using ID (use '0' to get the active pipeline)

Parameters:

- id (path): Unique identifier of the entity in UUID v4 format

Responses:

- 200: The requested pipeline

- 400: Invalid pipeline ID (E20001)

- 404: Pipeline does not exist (E10001)

- 500: Failed to fetch the pipeline (E00001)

GET /v2/pipeline/{id}

Get the details about the pipeline using ID (use '0' to get the active pipeline)

Parameters:

- id (path): Unique identifier of the entity in UUID v4 format

Responses:

- 200: The requested pipeline

- 400: Invalid pipeline ID (E20001)

- 404: Pipeline does not exist (E10001)

- 500: Failed to fetch the pipeline (E00001)

DELETE /v2/pipeline/{id}

Delete the specific inactive pipeline using ID

Parameters:

- id (path): Unique identifier of the entity in UUID v4 format

Responses:

- 200: True if the deletion was successful

- 400: Invalid pipeline ID (E20001) or pipeline is active (E20033) or pipeline status is incorrect to delete (E20034)

- 404: Pipeline does not exist (E10001)

- 500: Failed to get or remove the pipeline (E00001)

GET /v2/pipeline/{id}/variables

Get mappable variables of the pipeline

Parameters:

- id (path): Unique identifier of the entity in UUID v4 format

Responses:

- 200: The list of mappable variables

- 400: Invalid pipeline ID (E20001)

- 404: Pipeline does not exist (E10001)

- 500: Failed to get the pipeline or variables (E00001)

PATCH /v2/pipeline/{id}/variables

Update mappable variables of the active pipeline, which is not running

Request body: The list of variables intended for modification

Parameters:

- id (path): Unique identifier of the entity in UUID v4 format

Responses:

- 200: The updated pipeline

- 400: Invalid pipeline ID (E20001) or pipeline is inactive (E20032) or pipeline is not editable (E20034) or input and output variable mapping is identical (E20031) or missing variable list (E20014) or invalid variable ID (E20011) or invalid variable topic (E20012) or Connector does not exist for a variable (E20040) or Data

type and connector payload type do not match (E20044) or invalid topic with wildcard (E20051) or invalid topic for S7 connector (E20050)

- 404: Pipeline does not exist (E10001)

- 500: Failed to get or update pipeline (E00001, E10003)

PATCH /v2/pipeline/{id}/reset

Reset variable mapping of the active pipeline, which is not running

Parameters:

- id (path): Unique identifier of the entity in UUID v4 format

Responses:

- 200: The updated pipeline

- 400: Invalid pipeline ID (E20001) or pipeline is inactive (E20032) or pipeline is not editable (E20034)

- 404: Pipeline does not exist (E10001)

- 500: Failed to get or update the pipeline (E00001, E10003)

GET /v2/pipeline/{id}/parameters

Get parameters of the pipeline

Parameters:

- id (path): Unique identifier of the entity in UUID v4 format

Responses:

- 200: List of parameters

- 400: Invalid pipeline ID (E20001)

- 404: Pipeline does not exist (E10001)

- 500: Failed to get the pipeline or parameters (E00001)

PATCH/v2/pipeline/{id}/parameters

Update parameters of the active pipeline, which is not running

Request body: The list of parameters intended for modification

Parameters:

- id (path): Unique identifier of the entity in UUID v4 format

Responses:

- 200: The updated pipeline

- 400: Invalid pipeline ID (E20001) or Pipeline is inactive (E20032) or Pipeline is not editable (E20034) or Invalid parameter ID or topic (E20027) or Connector does not exist for a parameter (E20040) or Data type and connector payload type do not match (E20044) or parameter does not exist for the pipeline (E20046) or invalid topic for S7 connector (E20052)

- 404: Pipeline does not exist (E10001)

- 500: Failed to get or update the pipeline (E00001, E10003)

PATCH/v2/pipeline/{id}/parameters/reset

Reset parameters of the active pipeline, which is not running

Parameters:

- id (path): Unique identifier of the entity in UUID v4 format

Responses:

- 200: The updated pipeline

- 400: Invalid pipeline ID (E20001) or pipeline is inactive (E20032) or pipeline is not editable (E20034)

- 404: Pipeline does not exist (E10001)

- 500: Failed to get or update the pipeline (E00001, E10003)

GET /v2/pipeline/{id}/tags

Get selected tags of the pipeline

Parameters:

- id (path): Unique identifier of the entity in UUID v4 format

Responses:

- 200: List of the selected tags

- 400: Invalid pipeline ID (E20001)

- 404: Pipeline does not exist (E10001)

- 500: Failed to get the pipeline or selected tags (E00001)

PATCH /v2/pipeline/{id}/tags

Update selected tags of the pipeline

Request body: The list of selected tags intended for modification

Parameters:

- id (path): Unique identifier of the entity in UUID v4 format

Responses:

- 200: The updated pipeline

- 400: Invalid pipeline ID (E20001) or pipeline is inactive (E20032) or invalid topic/subtopicName/subtopicId/dataType/arrayDImensions/connectorId (E20007, E20008, E20009, E20010, E20055, E20017)

- 404: Pipeline does not exist (E10001)

- 500: Failed to get or update the pipeline (E00001, E10003)

GET /v2/pipeline/{id}/replicas

Get number of component replicas of the pipeline

Parameters:

- id (path): Unique identifier of the entity in UUID v4 format

Responses:

- 200: The list of the component replicas

- 400: Invalid pipeline ID (E20001)

- 404: Pipeline does not exist (E10001)

- 500: Failed to get pipeline (E00001)

PATCH /v2/pipeline/{id}/replicas

Update number of replicas of the active, but not-running pipeline's components

Request body: The list of number of replicas of components intended for modification

Parameters:

- id (path): Unique identifier of the entity in UUID v4 format

Responses:

- 200: The updated pipeline

- 400: Invalid pipeline ID (E20001) or pipeline is inactive (E20032) or pipeline is not editable (E20034) or missing component replicas list (E20036) or replicas should be integer at least 1, maximum 8 (E20036) or invalid component ID (E20035) or pipeline parallel step execution is disabled (E20039)

- 404: Pipeline does not exist (E10001)

- 500: Failed to get or update the pipeline (E00001, E10003)

POST /v2/pipeline/{id}/activate

Activate pipeline using pipeline ID

Parameters:

- id (path): Unique identifier of the entity in UUID v4 format

Responses:

- 201: The pipeline ID along with warnings

- 400: Invalid pipeline ID (E20001) or there are too many activated pipelines (E20029) or pipeline is active (E20033)

- 404: Pipeline does not exist (E10001)

- 500: Failed to get ​e pipeline (E00001) or failed to activate the pipeline (E10008) or failed to load configuration file (E40001) or failed to parse configuration file (E40002)

DELETE /v2/pipeline/{id}/activate

Deactivate the not-running pipeline using pipeline ID

Parameters:

- id (path): Unique identifier of the entity in UUID v4 format

Responses:

- 200: The ID of the deactivated pipeline

- 400: Invalid pipeline ID (E20001) or pipeline is inactive (E20032)

- 404: Pipeline does not exist (E10001)

- 500: Failed to get the pipeline (E00001) or failed to deactivate pipeline (E10008)

GET /v2/pipeline/{id}/readme

Get the readme file of the pipeline

Parameters:

- id (path): Unique identifier of the entity in UUID v4 format

Responses:

- 200: The readme file

- 400: Invalid pipeline ID (E20001)

- 404: No readme html found (E40003) or Pipeline does not exist (E10001)

- 500: Failed to load the file (E00004) or failed to get the pipeline (E00001)

Handling the execution of a single pipeline

Endpoints for pipeline execution (e.g. start, stop etc.) and getting details about this.

Endpoint

Information

POST /v2/pipeline/{id}/execution

Start/resume the execution of the active, not-running pipeline

Parameters:

- id (path): Unique identifier of the entity in UUID v4 format

Responses:

- 201: The updated pipeline

- 400: Missing credentials for connector (E20006) or execution operation is in-progress (E20038) or invalid pipeline ID (E20001) or pipeline is not active (E20032) or pipeline status is incorrect to start/resume (E20002) or pipeline internal status is incorrect (E20049)

- 404: Pipeline does not exist (E10001) or Connector does not exist (E10005)

- 500: Failed to get the pipeline (E00001) or failed to get connectors (E00001) or general Orchestrator error (E50000)

DELETE /v2/pipeline/{id}/execution

Stop the execution of the running pipeline

Parameters:

- id (path): Unique identifier of the entity in UUID v4 format

Responses:

- 200: The updated pipeline

- 400: Invalid pipeline ID (E20001) or pipeline is not active (E20032) or pipeline status is incorrect to stop (E20003) or execution operation is in-progress (E20038) or pipeline status is incorrect to stop on Orchestrator (E20016)

- 404: Pipeline does not exist (E10001)

- 500: Failed to get the pipeline (E00001) or general Orchestrator error (E50000)

PATCH /v2/pipeline/{id}/execution

Pause the execution of the running pipeline

Parameters:

- id (path): Unique identifier of the entity in UUID v4 format

Responses:

- 200: The updated pipeline

- 400: Invalid pipeline ID (E20001) or execution operation is in-progress (E20038) or pipeline is not active (E20032) or pipeline status is incorrect to pause (E20003) or pipeline status is incorrect to pause on Orchestrator (E20015)

- 404: Pipeline does not exist (E10001)

- 500: Failed to get the pipeline (E00001) or general Orchestrator error (E50000)

GET /v2/pipeline/{id}/execution

Get status of active pipeline execution without debug information

Parameters:

- id (path): Unique identifier of the entity in UUID v4 format

Responses:

- 200: The execution status of the pipeline provided by Orchestrator

- 400: Invalid pipeline ID (E20001) or pipeline is not active (E20032)

- 404: Pipeline does not exist (E10001)

- 500: Failed to get the pipeline (E00001) or general Orchestrator error (E50000)

GET /v1/pipeline/{id}/{version}/events

Get status of active pipeline execution with debug information

Parameters:

- id (path): Unique identifier of pipeline

- version (path): Version of the pipeline

Responses:

- 200: The execution status of the pipeline provided by Orchestrator along with the debug settings

- 400: Invalid pipeline ID (E20001) or pipeline not found (E10001) or pipeline is not active (E20032)

GET /v2/pipeline/{id}/{version}/events

Get status of active pipeline execution with debug information

Parameters:

- id (path): Unique identifier of pipeline

- version (path): Version of the pipeline

Responses:

- 200: The execution status of the pipeline provided by Orchestrator along with the debug settings

- 400: Invalid pipeline ID (E20001) or pipeline not found (E10001) or pipeline is not active (E20032)

Multiple pipeline operations

End points for processing multiple pipelines (e.g. removing, starting, stopping, etc.)

Endpoint

Information

DELETE /v2/pipelines

Delete multiple inactive pipelines

Responses:

- 200: The list of the deleted pipeline IDs along with errors if occurred

- 500: At least one of the pipeline operations failed (due to various reasons)

POST /v2/pipelines/activate

Activate multiple pipelines using pipeline IDs

Responses:

- 201: The list of the activated pipeline IDs along with warning messages and errors if occurred

- 400: There are too many activated pipelines (E20029)

- 500: Failed to get pipeline list (E00001) or at least one of pipeline operations failed (due to various reasons)

DELETE /v2/pipelines/activate

Deactivate multiple not-running pipelines using pipeline IDs

Responses:

- 200: The list of the deleted pipeline IDs along with errors if occurred

- 500: At least one of pipeline operations failed (due to various reasons)

POST /v2/pipelines/execution

Start/resume multiple pipeline execution

Responses:

- 201: The pipeline ID list and errors

- 404: Connector does not exist (E10005)

- 500: At least one of pipeline operations failed (due to various reasons)

DELETE /v2/pipelines/execution

Stop multiple pipeline execution

Responses:

- 201: The pipeline ID list and errors

- 500: At least one of pipeline operations failed (due to various reasons)

PATCH /v2/pipelines/execution

Pause multiple pipeline execution

Responses:

- 201: The pipeline ID list and errors

- 500: At least one of pipeline operations failed (due to various reasons)

Handling data connections

Endpoints for handling data connections (e.g. creation, modification etc.).

Endpoint

Information

GET /v2/connector

Get the connector list

Responses:

- 200: Connector list

- 500: Error occurred during fetching the connectors (E00001)

POST /v2/connector

Create a new connector

Request body: The new connector data

Responses:

- 201: Created connector

- 400: Duplicated connector (E10006) or validation error (E20018) or connector type validation error (E20019) or password validation error (E20005) or username validation error (E20004) or authorization error (E60002)

- 500: Failed to create the connector (E00001) or connector error (E60000)

GET /v2/connector/configuration

Get the connector configuration

Responses:

- 200: The connector configuration list

GET /v2/connector/{id}

Get the specific connector using ID

Parameters:

- id (path): Unique identifier of the entity in UUID v4 format

Responses:

- 200: Connector

- 400: Invalid connector ID (E20017)

- 404: Connector not found (E10005)

- 500: Error occurred during fetching the connector (E00001)

PATCH /v2/connector/{id}

Update the specific connector using ID. It is allowed if there is no running pipeline

Request body: The updated data of the connector

Parameters:

- id (path): Unique identifier of the entity in UUID v4 format

Responses:

- 200: The updated connector

- 400: Duplicated connector (E10006) or validation error (E20018) or connector type validation error (E20019) or password validation error (E20005) or username validation error (E20004) or authorization error (E60002) or there is a running pipeline (E20023)

- 404: Connector not found E10005

- 500: Error occurred during fetching the connector or failed to update the connector (E00001) or connector error (E60000)

DELETE /v2/connector/{id}

Delete the specific connector using ID. It is allowed if there is no running pipeline

Parameters:

- id (path): Unique identifier of the entity in UUID v4 format

Responses:

- 200: Returns true if the connector has been removed otherwise false

- 400: Invalid connector ID (E20017) or there is a running pipeline (E20023)

- 404: Connector not found (E10005)

- 500: Error occurred during fetching the connector or failed to remove the connector (E00001)

GET /v2/connector/{id}//tags

Get tags from the connector

Parameters:

- id (path): Unique identifier of the entity in UUID v4 format

Responses:

- 200: The tags from the connector

- 400: Invalid connector ID (E20017) or Connector tags are disabled (E20042) or Connector type does not support tags (E20043

- 404: Connector not found (E10005)

- 500: Failed to fetch S7 connector (E00001) or MQTT error occurred (E60000)

Pipeline operations for internal components

Specific endpoint for handling the pipeline by internal components.

Endpoint

Information

GET /v2/configuration-package/status

Get the status of pipelines

Responses:

- 200: The operation returns the list of the pipelines with statuses

- 500: Failed to fetch the pipeline list (E00001)

PUT /v2/configuration-package/deployments/{id}Creating new pipeline coming from internal component

Request body: The path of the pipeline package and optional meta information

Parameters:

- id (path): Unique identifier of the entity in UUID v4 format

Responses:

- 200: The operation returns the deploymentId of the pipeline and the AVAILABLE status

- 400: Invalid pipeline name, version, path (E20001, E20021) or invalid origin ID (E20048) or invalid package ID (E20013) or duplicated pipeline (E20030, E20028)

- 500: Failed to call Model Distributor (E80000) or failed to create pipeline (E10002)

DELETE /v2/configuration-package/deployments/{id}

Soft delete the pipeline

Parameters:

- id (path): Unique identifier of the entity in UUID v4 format

Responses:

- 200: The operation returns the status of the pipeline along with the occurred error code and message

- 400: Missing or invalid pipeline ID (E20001) or pipeline status is incorrect to delete (E20034)

- 404: No pipeline exists with the given ID (E10001)

- 500: Failed to fetch the pipeline or failed to remove it (E00001)