M2A Export API Definition (1.0)

Download OpenAPI specification:Download

M2A's capture export service provides a mechanism by which capture content can be moved to a given destination bucket. This process can be applied to specific time bound portions of a capture, by creating specific exports, or applied automatically to multiple captures with generic conditions using export rules.

The capture export API provides an interface by which a client can create, read, and update exports and export rules.

exports

Get Export Info by Export ID

Retrieve the information of the Export with the matching Export ID.

path Parameters
export-id
required
string <uuid>

The ID of the Export

Responses

Response samples

Content type
application/json
{
  • "create-date": "2021-04-12T18:53:00.910006+0000",
  • "update-date": "2021-04-12T18:53:00.910006+0000",
  • "start-time": "2021-04-12T18:53:00.910006+0000",
  • "end-time": "2021-04-12T17:53:00.910006+0000",
  • "status": "created",
  • "destination": {
    },
  • "discontinuity-handling": "reject-and-fail",
  • "capture-id": "eaf3ca40-33dc-4d43-b0bd-51c9ce5b012b",
  • "role-arn": "arn:aws:iam::123456789012:role/S3Access",
  • "error": { },
  • "metadata": {
    },
  • "target-account-id": "1a341a62-d07c-46b8-91c3-d8c21e6baa24",
  • "organisation-id": "41407639-883c-4ec5-8b7a-491dd3984cca",
  • "callback-url": "https://m2amedia.tv",
  • "process-start-date": "2021-04-12T18:53:00.910006+0000",
  • "process-stop-date": "2021-04-12T19:53:00.910006+0000"
}

Update Export by Export ID

Update an Export with the matching Export ID.

path Parameters
export-id
required
string <uuid>

The ID of the Export

Request Body schema: application/json
object

Export error.

status
string
Enum: "created" "failed" "success" "in-progress"

Contains enumberable Export options.

Responses

Request samples

Content type
application/json
{
  • "error": {
    },
  • "status": "failed"
}

Response samples

Content type
application/json
{
  • "id": "a136776e-f1ea-42bf-865f-e7074c517044",
  • "create-date": "2021-04-12T18:53:00.910006+0000",
  • "update-date": "2021-04-12T18:53:00.910006+0000",
  • "start-time": "2021-04-12T18:53:00.910006+0000",
  • "end-time": "2021-04-12T17:53:00.910006+0000",
  • "status": "failed",
  • "destination": {
    },
  • "discontinuity-handling": "reject-and-fail",
  • "capture-id": "eaf3ca40-33dc-4d43-b0bd-51c9ce5b012b",
  • "role-arn": "arn:aws:iam::123456789012:role/S3Access",
  • "error": {
    },
  • "metadata": {
    },
  • "target-account-id": "1a341a62-d07c-46b8-91c3-d8c21e6baa24",
  • "organisation-id": "41407639-883c-4ec5-8b7a-491dd3984cca",
  • "callback-url": "https://m2amedia.tv",
  • "process-start-date": "2021-04-12T18:53:00.910006+0000",
  • "process-stop-date": "2021-04-12T19:53:00.910006+0000"
}

Create New Export

Create a new export.

Request Body schema: application/json
start-time
required
string <date-time> non-empty

Start time of the export.

end-time
required
string <date-time> non-empty

End time of the export.

required
object

Destination where Export should be stored in Amazon S3.

discontinuity-handling
required
string
Enum: "reject-and-fail" "accept-and-export"

Contains enumberable discontinuity handling options.

capture-id
required
string <uuid> non-empty

References a Capture UUID.

role-arn
required
string non-empty ^arn:aws:iam::\d{12}:role/.+

The AWS Role ARN for to be used when performing the export.

status
string
Enum: "created" "failed" "success" "in-progress"

Contains enumberable Export options.

organisation-id
required
string <uuid>

Unique identifier used for identification of individual organisations in M2A APIs

target-account-id
required
string <uuid>

Unique identifier used for identification of individual target account in M2A APIs

callback-url
string <url>

URL to perform a callback on when an export is completed

required
object

Responses

Request samples

Content type
application/json
{
  • "start-time": "2021-04-12T18:53:00.910006+0000",
  • "end-time": "2021-04-12T17:53:00.910006+0000",
  • "destination": {
    },
  • "discontinuity-handling": "reject-and-fail",
  • "capture-id": "eaf3ca40-33dc-4d43-b0bd-51c9ce5b012b",
  • "role-arn": "arn:aws:iam::123456789012:role/S3Access",
  • "metadata": {
    },
  • "target-account-id": "1a341a62-d07c-46b8-91c3-d8c21e6baa24",
  • "organisation-id": "41407639-883c-4ec5-8b7a-491dd3984cca",
  • "callback-url": "https://m2amedia.tv"
}

Response samples

Content type
application/json
{
  • "id": "a136776e-f1ea-42bf-865f-e7074c517044",
  • "create-date": "2021-04-12T18:53:00.910006+0000",
  • "update-date": "2021-04-12T18:53:00.910006+0000",
  • "start-time": "2021-04-12T18:53:00.910006+0000",
  • "end-time": "2021-04-12T17:53:00.910006+0000",
  • "status": "created",
  • "destination": {
    },
  • "discontinuity-handling": "reject-and-fail",
  • "capture-id": "eaf3ca40-33dc-4d43-b0bd-51c9ce5b012b",
  • "role-arn": "arn:aws:iam::123456789012:role/S3Access",
  • "error": { },
  • "metadata": {
    },
  • "target-account-id": "1a341a62-d07c-46b8-91c3-d8c21e6baa24",
  • "organisation-id": "41407639-883c-4ec5-8b7a-491dd3984cca",
  • "callback-url": "https://m2amedia.tv"
}

Get a list of Capture Export Jobs

Get a list of Capture Export Jobs associated with an organisation and target account.

query Parameters
organisation-id
required
string <uuid>

Unique identifier used for identification of individual organisations in M2A APIs

target-account-id
required
string <uuid>

Unique identifier used for identification of individual target account in M2A APIs

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "total_items": 2,
  • "page": {
    }
}

rules

Create new Export Rule

Create a new export rule.

Export rules can be applied to all captures by setting the apply-to-all-captures flag to True or a subset of captures by setting that flag to False and providing the capture-ids.

A delay can be set to postpone the start time of the Export.

query Parameters
organisation-id
required
string <uuid>

Unique identifier used for identification of individual organisations in M2A APIs

target-account-id
required
string <uuid>

Unique identifier used for identification of individual target account in M2A APIs

Request Body schema: application/json
required
object

Destination where Export should be stored in Amazon S3.

discontinuity-handling
required
string
Enum: "reject-and-fail" "accept-and-export"

Contains enumerable discontinuity handling options.

capture-ids
Array of strings <uuid>

List of capture ID which the rule will apply to.

role-arn
string <arn> ^arn:aws:iam::\d{12}:role/.+

The AWS Role ARN for to be used when performing the export.

callback-url
string <url>

URL to perform a callback on when an export is completed

delay
string

Hold-up the start time of the export which allows to adapt to unexpected events. An export may be delayed up to 23H:59M. ISO 8601 format

apply-to-all-captures
required
boolean

Apply Export Rule to all the captures associated with the target account. If False then a subset capture-ids must be specified

required
object
object

Responses

Request samples

Content type
application/json
{
  • "destination": {
    },
  • "discontinuity-handling": "reject-and-fail",
  • "capture-ids": [
    ],
  • "role-arn": "arn:aws:iam::123456789012:role/S3Access",
  • "metadata": {
    },
  • "callback-url": "https://m2amedia.tv",
  • "delay": "PT1M",
  • "apply-to-all-captures": false
}

Response samples

Content type
application/json
{
  • "apply-to-all-captures": true,
  • "callback-url": "https://m2amedia.tv",
  • "create-date": "2023-02-07T16:10:28.625730+00:00",
  • "delay": "PT1M",
  • "destination": {
    },
  • "discontinuity-handling": "reject-and-fail",
  • "id": "7046a054-401d-420b-a52c-2e045229790c",
  • "metadata": {
    },
  • "organisation-id": "41407639-883c-4ec5-8b7a-491dd3984cca",
  • "role-arn": "arn:aws:iam::123456789012:role/S3Access",
  • "status": "active",
  • "target-account-id": "1a341a62-d07c-46b8-91c3-d8c21e6baa24",
  • "update-date": "2023-02-07T16:10:28.625757+00:00"
}

Get a list of Export Rule IDs

Get a list of Export Rules associated to an organisation and target account.

query Parameters
organisation-id
required
string <uuid>

Unique identifier used for identification of individual organisations in M2A APIs

target-account-id
required
string <uuid>

Unique identifier used for identification of individual target account in M2A APIs

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "total_items": 2,
  • "page": {
    }
}

Get a single Export Rule details by Export Rule ID

Get a single Export Rule details by using the Export Rule ID.

path Parameters
export-rule-id
required
string <uuid>

Unique identifier given when an Export Rule is created

query Parameters
organisation-id
required
string <uuid>

Unique identifier used for identification of individual organisations in M2A APIs

target-account-id
required
string <uuid>

Unique identifier used for identification of individual target account in M2A APIs

Responses

Response samples

Content type
application/json
{
  • "apply-to-all-captures": true,
  • "callback-url": "https://m2amedia.tv",
  • "create-date": "2023-02-07T16:10:28.625730+00:00",
  • "delay": "PT1M",
  • "destination": {
    },
  • "discontinuity-handling": "reject-and-fail",
  • "id": "7046a054-401d-420b-a52c-2e045229790c",
  • "metadata": {
    },
  • "organisation-id": "41407639-883c-4ec5-8b7a-491dd3984cca",
  • "role-arn": "arn:aws:iam::123456789012:role/S3Access",
  • "status": "active",
  • "target-account-id": "1a341a62-d07c-46b8-91c3-d8c21e6baa24",
  • "update-date": "2023-02-07T16:10:28.625757+00:00"
}

Update an existing Export Rules by Rule Export ID

Update Export Rule

path Parameters
export-rule-id
required
string <uuid>

Unique identifier given when an Export Rule is created

query Parameters
organisation-id
required
string <uuid>

Unique identifier used for identification of individual organisations in M2A APIs

target-account-id
required
string <uuid>

Unique identifier used for identification of individual target account in M2A APIs

Request Body schema: application/json
required
object

Destination where Export should be stored in Amazon S3.

discontinuity-handling
required
string
Enum: "reject-and-fail" "accept-and-export"

Contains enumerable discontinuity handling options.

capture-ids
Array of strings <uuid>

List of capture ID which the rule will apply to.

role-arn
string <arn> ^arn:aws:iam::\d{12}:role/.+

The AWS Role ARN for to be used when performing the export.

callback-url
string <url>

URL to perform a callback on when an export is completed

delay
string

Hold-up the start time of the export which allows to adapt to unexpected events. An export may be delayed up to 23H:59M. ISO 8601 format

apply-to-all-captures
required
boolean

Apply Export Rule to all the captures associated with the target account. If False then a subset capture-ids must be specified

required
object
object

Responses

Request samples

Content type
application/json
{
  • "destination": {
    },
  • "discontinuity-handling": "reject-and-fail",
  • "capture-ids": [
    ],
  • "role-arn": "arn:aws:iam::123456789012:role/S3Access",
  • "metadata": {
    },
  • "callback-url": "https://m2amedia.tv",
  • "delay": "PT1M",
  • "apply-to-all-captures": false
}

Response samples

Content type
application/json
{
  • "apply-to-all-captures": true,
  • "callback-url": "https://m2amedia.tv",
  • "create-date": "2023-02-07T16:10:28.625730+00:00",
  • "delay": "PT1M",
  • "destination": {
    },
  • "discontinuity-handling": "reject-and-fail",
  • "id": "7046a054-401d-420b-a52c-2e045229790c",
  • "metadata": {
    },
  • "organisation-id": "41407639-883c-4ec5-8b7a-491dd3984cca",
  • "role-arn": "arn:aws:iam::123456789012:role/S3Access",
  • "status": "active",
  • "target-account-id": "1a341a62-d07c-46b8-91c3-d8c21e6baa24",
  • "update-date": "2023-02-07T16:10:28.625757+00:00"
}

Delete Export Rules by Rule Export ID

Delete the defined export rules with the matching Export Rules ID.

path Parameters
export-rule-id
required
string <uuid>

Unique identifier given when an Export Rule is created

query Parameters
organisation-id
required
string <uuid>

Unique identifier used for identification of individual organisations in M2A APIs

target-account-id
required
string <uuid>

Unique identifier used for identification of individual target account in M2A APIs

Responses

Response samples

Content type
application/json
{
  • "error": {
    }
}

health

Get API Health Status

Get API health status.

Responses

Response samples

Content type
application/json
{
  • "status": "success",
  • "version": "v1"
}