REST Endpoints Reference Guide#

RESTful Endpoints#

The RESTful API has a default maximum body size of 10 KB, this can be changed by setting the environment variable MAX_BODY_SIZE in bytes.

Path

Description

GET /pipelines

Return supported pipelines.

GET /pipelines/status

Return status of all pipeline instances.

POST /pipelines/{name}/{version}

Start new pipeline instance.

GET /pipelines/{instance_id}

Return pipeline instance summary.

POST /pipelines/{name}/{version}/{instance_id}

Send request to an already queued pipeline. Supported only for source of type “image-ingestor”.

DELETE /pipelines/{instance_id}

Stops a running pipeline or cancels a queued pipeline.

POST /pipelines/{name}/{version}/{instance_id}/models

Download files from the model registry microservice associated with a specific model.

GET /pipelines#

Return supported pipelines

Responses#

200 - Success#
application/json#
Example (generated)#
[
  {
    "description": "description",
    "type": "GStreamer",
    "parameters": {
      "key": {
        "default": ""
      }
    }
  }
]

GET /pipelines/status#

Return status of all pipeline instances.

Responses#

200 - Success#
application/json#
Example (generated)#
[
{
"id": 1,
"state": "COMPLETED",
"avg_fps": 8.932587737800183,
"start_time": 1638179813.2005367,
"elapsed_time": 72.43142008781433,
"message": "",
"avg_pipeline_latency": 0.4533823041311556
},
{
"id": 2,
"state": "RUNNING",
"avg_fps": 6.366260838099841,
"start_time": 1638179886.3203313,
"elapsed_time": 16.493194580078125,
"message": "",
"avg_pipeline_latency": 0.6517487730298723
},
{
"id": 3,
"state": "ERROR",
"avg_fps": 0,
"start_time": null,
"elapsed_time": null,
"message": "Not Found (404), URL: https://github.com/intel-iot-devkit/sample.mp4, Redirect to: (NULL)"
}
]

POST /pipelines/{name}/{version}#

Start new pipeline instance. Four sections are supported by default: source, destination, parameters, and tags. These sections have special handling based the schema defined in the pipeline.json file for the requested pipeline.

Path parameters#

name#

Name: name(required) Type: string In: path Accepted values: any

version#

Name: version(required) Type: string In: path Accepted values: any

Request body#

Example#
{
  "source": {
    "type": "uri",
    "uri": "file:///root/video-examples/example.mp4"
  },
  "destination":{},
  "parameters": {},
  "tags": {}
}

Responses#

200 - Success#

DELETE /pipelines/{instance_id}#

Stop pipeline instance.

Path parameters#

instance_id#

Name: instance_id(required) Type: string In: path Accepted values: any

Responses#

200 - Success#

POST /pipelines/{name}/{version}/{instance_id}#

Send request to an already queued pipeline. Supported only for source of type “image-ingestor”.

Path parameters#

name#

Name: name(required) Type: string In: path Accepted values: any

version#

Name: version(required) Type: string In: path Accepted values: any

instance_id#

Name: instance_id(required) Type: string In: path Accepted values: any

Request body#

Example#
{
  "source": {
    "type": "file",
    "path": "file:///root/image-examples/example.png"
  },
  "destination":{},
  "parameters": {},
  "tags": {}
}

Responses#

200 - Success#
application/json#
Example#
{
  "request": {
    "destination": {},
    "source": {},
    "parameters": {},
    "tags": {}
  },
  "id": 0,
  "type": "type"
}

POST /pipelines/{name}/{version}/{instance_id}/models#

Download files from the model registry microservice associated with a specific model and optionally restart an instance for the specified pipeline. Seven properties are supported: name (string), project_name (string), version (string), category (string), architecture (string), precision (string), and deploy (boolean). These properties allow EVAM to query for a model stored in the model registry microservice. The query performed is an AND search if more than 1 property is provided. If deploy is set to true, the specified pipeline instance will be stopped and a new instance will be started using the specified model. The default value for deploy is false. If a response from the model registry microservice is not received within 300 seconds by default, this request will time out and return a relevant response.

Path parameters#

name#

Name: name(required) Type: string In: path Accepted values: any

version#

Name: version(required) Type: string In: path Accepted values: any

instance_id#

Name: instance_id(required) Type: string In: path Accepted values: any

Request body#

Example 1#
{
    "name": "PalletDetection_YOLO_v1",
}
{
    "project_name": "pallet-detection",
    "version": "v1",
    "category": "Detection",
    "architecture": "YOLO",
    "precision": "FP16",
    "deploy": true
}
Example 2#

If the user is aware that there is only one model in model registry with a given name then user can provide only name in the request body to retrieve the model from the registry.

{
    "name": "YOLO_Test_Model_v2",
}

Responses#

200 - Success#

GET /pipelines/{instance_id}#

Return pipeline instance summary.

Path parameters#

instance_id#

Name: instance_id(required) Type: string In: path Accepted values: any

Responses#

200 - Success#
application/json#
Example#
{
  "id": 0,
  "launch_command": "",
  "name": "",
  "request": {
    "destination": {},
    "source": {},
    "parameters": {},
    "tags": {}
  },
  "type": "type",
  "version": ""
}