M2A Workflows API (v1)

Download OpenAPI specification:Download

This is API specification of the M2A Workflows API

Workflows

Workflows handle the orchestration of live stream resources of a scheduled event.

Workflows use Templates to define how a workflow will be executed. A Template specifies the resources, configuration desired states and order that resources are to be utilized.

You can create many workflow instances from 1 workflow template. The macros in the workflow templates will allow you to have different configuration per workflow instance:

Currently, only programmatic access via the API endpoints is available. The API requests and responses use the JSON:API specification https://jsonapi.org/.

Workflow Instance

A workflow instance represents a collection of media processing resources and their configuration that needs to be managed to achieve the video processing objectives.

Workflow instance is enrolled to an M2A scheduled event, and the system will update a workflow instance when completing a workflow for an event.

Info for a specific workflow instance

Gets a workflow instance by ID

Authorizations:
http_security_schema
path Parameters
instance-id
required
string <uuid> (Resource identifier)
Example: c49c499b-4e7e-4acb-ae83-f528b6ed194d

The id of the workflow instance to retrieve

query Parameters
owner
required
string <uuid> (Resource identifier)
Example: owner=c49c499b-4e7e-4acb-ae83-f528b6ed194d

The id of the target account

fields[instance]
string
Example: fields[instance]=metadata

Return only a subset of the instances data attributes. Attributes is a comma delimited list of strings. Valid fields are:

  • target-account-id
  • metadata
  • nodes
  • signals-received
  • event-handlers
header Parameters
Accept
string (JSON API)
Value: "application/vnd.api+json"

Content type (expressed as MIME types) the client is able to understand.

Content-Type
string (JSON API)
Value: "application/vnd.api+json"

The original media type of the resource.

Responses

Response samples

Content type
application/vnd.api+json
{
  • "data": {
    }
}

Create a workflow instance from a specific workflow template

Create a Workflow Instance that will track the state of a workflow execution. If the specified Workflow Template requires input parameters, these will have to be supplied in the request. Note that in order to execute the workflow, the instance will need to be associated with a Schedule Event after the instance has been created.

Authorizations:
http_security_schema
query Parameters
fields[instance]
string
Example: fields[instance]=metadata

Return only a subset of the instances data attributes. Attributes is a comma delimited list of strings. Valid fields are:

  • target-account-id
  • metadata
  • nodes
  • signals-received
  • event-handlers
header Parameters
Accept
string (JSON API)
Value: "application/vnd.api+json"

Content type (expressed as MIME types) the client is able to understand.

Content-Type
string (JSON API)
Value: "application/vnd.api+json"

The original media type of the resource.

Request Body schema: application/vnd.api+json
required

The workflow instance payload

required
object

Responses

Request samples

Content type
application/vnd.api+json
{
  • "data": {
    }
}

Response samples

Content type
application/vnd.api+json
{
  • "data": {
    }
}

Workflow Template

Internal use only

Defines the resources and the video flows between them to fulfil a customer’s live video workflow.

Workflow templates allows you to use macros, which can then be overriden per workflow instance.

Example: Workflow template that allows you to create encoder in different regions

"region": "{{ region }}"

When creating a workflow instance you can replace {{ region }}.

Get specific workflow Template by `Template ID`

Retrieves a workflow template using Template ID.

Authorizations:
http_security_schema
path Parameters
template-id
required
string <uuid> (Resource identifier)
Example: c49c499b-4e7e-4acb-ae83-f528b6ed194d

The id of the workflow template id to retrieve

query Parameters
owner
required
string <uuid> (Resource identifier)
Example: owner=c49c499b-4e7e-4acb-ae83-f528b6ed194d

The id of the target account

fields[template]
string
Example: fields[template]=metadata

Return only a subset of the template's data attributes. Attributes is a comma delimited list of strings. Valid fields are:

  • target-account-id
  • metadata
  • resource-name
  • state
  • nodes
  • event-handlers
  • input-parameters
  • ui-layout
header Parameters
Accept
string (JSON API)
Value: "application/vnd.api+json"

Content type (expressed as MIME types) the client is able to understand.

Content-Type
string (JSON API)
Value: "application/vnd.api+json"

The original media type of the resource.

Responses

Response samples

Content type
application/vnd.api+json
{
  • "data": {
    }
}

Delete specific workflow Template by `Template ID`

Deletes a workflow template using Template ID.

Authorizations:
http_security_schema
path Parameters
template-id
required
string <uuid> (Resource identifier)
Example: c49c499b-4e7e-4acb-ae83-f528b6ed194d

The id of the workflow template id to retrieve

query Parameters
owner
required
string <uuid> (Resource identifier)
Example: owner=c49c499b-4e7e-4acb-ae83-f528b6ed194d

The id of the target account

header Parameters
Accept
string (JSON API)
Value: "application/vnd.api+json"

Content type (expressed as MIME types) the client is able to understand.

Content-Type
string (JSON API)
Value: "application/vnd.api+json"

The original media type of the resource.

Responses

Response samples

Content type
application/vnd.api+json
{
  • "errors": [
    ]
}

Get specific workflow Template by `resource-name`

Retrieves a workflow template using the specified resource-name.

Authorizations:
http_security_schema
path Parameters
resource-name
required
string <string> (Resource name)
Example: my template

The name of the workflow template

query Parameters
owner
required
string <uuid> (Resource identifier)
Example: owner=c49c499b-4e7e-4acb-ae83-f528b6ed194d

The id of the target account

fields[template]
string
Example: fields[template]=metadata

Return only a subset of the template's data attributes. Attributes is a comma delimited list of strings. Valid fields are:

  • target-account-id
  • metadata
  • resource-name
  • state
  • nodes
  • event-handlers
  • input-parameters
  • ui-layout
header Parameters
Accept
string (JSON API)
Value: "application/vnd.api+json"

Content type (expressed as MIME types) the client is able to understand.

Content-Type
string (JSON API)
Value: "application/vnd.api+json"

The original media type of the resource.

Responses

Response samples

Content type
application/vnd.api+json
{
  • "data": {
    }
}

Delete specific workflow Template by `resource-name`

Deletes a workflow template using the specified resource-name.

Authorizations:
http_security_schema
path Parameters
resource-name
required
string <string> (Resource name)
Example: my template

The name of the workflow template

query Parameters
owner
required
string <uuid> (Resource identifier)
Example: owner=c49c499b-4e7e-4acb-ae83-f528b6ed194d

The id of the target account

header Parameters
Accept
string (JSON API)
Value: "application/vnd.api+json"

Content type (expressed as MIME types) the client is able to understand.

Content-Type
string (JSON API)
Value: "application/vnd.api+json"

The original media type of the resource.

Responses

Response samples

Content type
application/vnd.api+json
{
  • "errors": [
    ]
}

Get List of workflow templates

Gets a list of workflow templates for a target account. The workflow template list is paginated. Each page contains up to 50 templates. The following structure is used for the response where data contains a list of event objects and next contains an url of the next page of events:

{
  'data': [ ... ],
  'links': {
    'next': ...
  }
}
Authorizations:
http_security_schema
query Parameters
owner
required
string <uuid> (Resource identifier)
Example: owner=c49c499b-4e7e-4acb-ae83-f528b6ed194d

The id of the target account

fields[template]
string
Example: fields[template]=metadata

Return only a subset of the template's data attributes. Attributes is a comma delimited list of strings. Valid fields are:

  • target-account-id
  • metadata
  • resource-name
  • state
  • nodes
  • event-handlers
  • input-parameters
  • ui-layout
header Parameters
Accept
string (JSON API)
Value: "application/vnd.api+json"

Content type (expressed as MIME types) the client is able to understand.

Content-Type
string (JSON API)
Value: "application/vnd.api+json"

The original media type of the resource.

Responses

Response samples

Content type
application/vnd.api+json
{
  • "links": {
    },
  • "data": [
    ]
}

Create a Workflow Template

POST a workflow template

Authorizations:
http_security_schema
query Parameters
fields[template]
string
Example: fields[template]=metadata

Return only a subset of the template's data attributes. Attributes is a comma delimited list of strings. Valid fields are:

  • target-account-id
  • metadata
  • resource-name
  • state
  • nodes
  • event-handlers
  • input-parameters
  • ui-layout
header Parameters
Accept
string (JSON API)
Value: "application/vnd.api+json"

Content type (expressed as MIME types) the client is able to understand.

Content-Type
string (JSON API)
Value: "application/vnd.api+json"

The original media type of the resource.

Request Body schema: application/vnd.api+json
required

The template payload

required
object

Responses

Request samples

Content type
application/vnd.api+json
{
  • "data": {
    }
}

Response samples

Content type
application/vnd.api+json
{
  • "data": {
    }
}