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.
Retrieve the information of the Export with the matching Export ID.
export-id required | string <uuid> The ID of the Export |
{- "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": {
- "bucket": "bucket_name",
- "prefix": "test_prefix"
}, - "discontinuity-handling": "reject-and-fail",
- "capture-id": "eaf3ca40-33dc-4d43-b0bd-51c9ce5b012b",
- "role-arn": "arn:aws:iam::123456789012:role/S3Access",
- "error": { },
- "metadata": {
- "labels": [
- {
- "key": "m2amedia.tv:name",
- "value": "my-awesome-label"
}, - {
- "key": "m2amedia.tv:description",
- "value": "My awesome long-form description"
}
]
}, - "target-account-id": "1a341a62-d07c-46b8-91c3-d8c21e6baa24",
- "organisation-id": "41407639-883c-4ec5-8b7a-491dd3984cca",
- "process-start-date": "2021-04-12T18:53:00.910006+0000",
- "process-stop-date": "2021-04-12T19:53:00.910006+0000"
}
Update an Export with the matching Export ID.
export-id required | string <uuid> The ID of the Export |
object Export error. | |
status | string Enum: "created" "failed" "success" "in-progress" Contains enumberable Export options. |
{- "error": {
- "code": "CaptureNotFound",
- "message": "Capture API is not responding."
}, - "status": "failed"
}
{- "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": {
- "bucket": "bucket_name",
- "prefix": "test_prefix"
}, - "discontinuity-handling": "reject-and-fail",
- "capture-id": "eaf3ca40-33dc-4d43-b0bd-51c9ce5b012b",
- "role-arn": "arn:aws:iam::123456789012:role/S3Access",
- "error": {
- "code": "CaptureNotFound",
- "message": "Capture API is not responding."
}, - "metadata": {
- "labels": [
- {
- "key": "m2amedia.tv:name",
- "value": "my-awesome-label"
}, - {
- "key": "m2amedia.tv:description",
- "value": "My awesome long-form description"
}
]
}, - "target-account-id": "1a341a62-d07c-46b8-91c3-d8c21e6baa24",
- "organisation-id": "41407639-883c-4ec5-8b7a-491dd3984cca",
- "process-start-date": "2021-04-12T18:53:00.910006+0000",
- "process-stop-date": "2021-04-12T19:53:00.910006+0000"
}
Create a new export.
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 |
{- "start-time": "2021-04-12T18:53:00.910006+0000",
- "end-time": "2021-04-12T17:53:00.910006+0000",
- "destination": {
- "bucket": "s3-bucket-name",
- "prefix": "s3-bucket-prefix"
}, - "discontinuity-handling": "reject-and-fail",
- "capture-id": "eaf3ca40-33dc-4d43-b0bd-51c9ce5b012b",
- "role-arn": "arn:aws:iam::123456789012:role/S3Access",
- "metadata": {
- "labels": [
- {
- "key": "m2amedia.tv:name",
- "value": "my-awesome-label"
}, - {
- "key": "m2amedia.tv:description",
- "value": "My awesome long-form description"
}
]
}, - "target-account-id": "1a341a62-d07c-46b8-91c3-d8c21e6baa24",
- "organisation-id": "41407639-883c-4ec5-8b7a-491dd3984cca",
}
{- "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": {
- "bucket": "s3-bucket-name",
- "prefix": "s3-bucket-prefix"
}, - "discontinuity-handling": "reject-and-fail",
- "capture-id": "eaf3ca40-33dc-4d43-b0bd-51c9ce5b012b",
- "role-arn": "arn:aws:iam::123456789012:role/S3Access",
- "error": { },
- "metadata": {
- "labels": [
- {
- "key": "m2amedia.tv:name",
- "value": "my-awesome-label"
}, - {
- "key": "m2amedia.tv:description",
- "value": "My awesome long-form description"
}
]
}, - "target-account-id": "1a341a62-d07c-46b8-91c3-d8c21e6baa24",
- "organisation-id": "41407639-883c-4ec5-8b7a-491dd3984cca",
}
Get a list of Capture Export Jobs associated with an organisation and target account.
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 |
{- "items": [
- {
- "id": "bf395fa0-4d41-45a3-98c6-96c764723fbd",
- "capture_id": "a0881999-aa43-4ba8-8bb5-bf5f96472664",
- "create_date": "2023-03-23T18:55:36.338215+0000",
- "destination": {
- "bucket": "buck_k1",
- "prefix": "loc_k1/a0881999-aa43-4ba8-8bb5-bf5f96472664/bb0a6b0a-7861-454b-9194-bb69fc421144.ts"
}, - "discontinuity_handling": "accept-and-export",
- "end_time": "2023-03-23T03:43:47.816777+0000",
- "error": {
- "code": "AccessDenied",
- "message": "User: arn:aws:sts::874525637778:assumed-role/m2a-stable-capture-exporter-lambda/m2a-stable-capture-exporter-lambda is not authorized to perform: sts:AssumeRole on resource: arn:aws:iam::123456789012:role/S3Access"
}, - "etag": "dd8f974f-46c1-46fb-9317-47a29ea33b41",
- "metadata": {
- "labels": [
- {
- "key": "m2amedia.tv:name",
- "value": "ER Krys1 - 022"
}, - {
- "key": "m2amedia.tv:description",
- "value": "desc1"
}
]
}, - "organisation": "25fb8cc0-d04d-4b2e-955b-055d4888f2ea",
- "process_start_date": "2023-03-23T18:55:36.708130+0000",
- "process_stop_date": "2023-03-23T18:55:37.122733+0000",
- "role_arn": "arn:aws:iam::123456789012:role/S3Access",
- "start_time": "2023-03-23T01:53:47.816777+0000",
- "status": "failed",
- "target_account": "7e2f2cf8-5ca3-4b66-b4e6-89633ef85fac",
- "update_date": "2023-03-23T18:55:36.338296+0000"
}, - {
- "id": "6f86915a-446f-4b96-bd19-4c941967725d",
- "capture_id": "7f31d15d-f227-4eb0-bfa1-9580b89ec44a",
- "create_date": "2023-03-02T12:43:29.584419+0000",
- "destination": {
- "bucket": "m2a-stable-export-25fb8cc0-d04d-4b2e-955b-055d4888f2ea",
- "prefix": "sundeep"
}, - "discontinuity_handling": "accept-and-export",
- "end_time": "2023-03-02T12:42:00.000000+0000",
- "error": {
- "code": "NoMediaFound",
- "message": "No media was found in the requested range."
}, - "etag": "24f119d4-8cdb-4800-9e0c-1d3fbfdb38f5",
- "metadata": {
- "labels": [
- {
- "key": "m2amedia.tv:name",
- "value": "My ER1"
}, - {
- "key": "m2amedia.tv:description",
- "value": "sample desc"
}
]
}, - "organisation": "25fb8cc0-d04d-4b2e-955b-055d4888f2ea",
- "process_start_date": "2023-03-02T12:43:34.531274+0000",
- "process_stop_date": "2023-03-02T12:43:35.620082+0000",
- "role_arn": "arn:aws:iam::011703068154:role/m2a-stable-capture-exporter-s3-access",
- "start_time": "2023-03-02T12:35:00.000000+0000",
- "status": "failed",
- "target_account": "7e2f2cf8-5ca3-4b66-b4e6-89633ef85fac",
- "update_date": "2023-03-02T12:43:29.584506+0000"
}
], - "total_items": 2,
- "page": {
- "next": "some_url"
}
}
Get a temporary download link for the export object.
export-id required | string <uuid> The ID of the Export |
expires-in | integer [ 3600 .. 604800 ] Expiration time for the download link in seconds |
{
}
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.
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 |
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 |
{- "destination": {
- "bucket": "s3-bucket-name",
- "prefix": "s3-bucket-prefix"
}, - "discontinuity-handling": "reject-and-fail",
- "capture-ids": [
- "18e27eac-7028-4ff0-b7a3-8a1729eec63f"
], - "role-arn": "arn:aws:iam::123456789012:role/S3Access",
- "metadata": {
- "labels": [
- {
- "key": "m2amedia.tv:name",
- "value": "Car One"
}, - {
- "key": "m2amedia.tv:description",
- "value": "On board camera for Car One"
}
]
}, - "delay": "PT1M",
- "apply-to-all-captures": false
}
{- "apply-to-all-captures": true,
- "create-date": "2023-02-07T16:10:28.625730+00:00",
- "delay": "PT1M",
- "destination": {
- "bucket": "s3-bucket-name",
- "prefix": "s3-bucket-prefix"
}, - "discontinuity-handling": "reject-and-fail",
- "id": "7046a054-401d-420b-a52c-2e045229790c",
- "metadata": {
- "labels": [
- {
- "key": "m2amedia.tv:name",
- "value": "Car One"
}, - {
- "key": "m2amedia.tv:description",
- "value": "On board camera for Car One"
}
]
}, - "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 Rules associated to an organisation and target account.
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 |
{- "items": [
- {
- "id": "7046a054-401d-420b-a52c-2e239534985c",
- "delay": "PT23H59M59S",
- "destination": {
- "bucket": "s3-bucket-name",
- "prefix": "s3-bucket-prefix"
}, - "discontinuity-handling": "reject-and-fail",
- "apply-to-all-captures": true,
- "role-arn": "arn:aws:iam::123456789012:role/S3Access",
- "metadata": {
- "labels": [
- {
- "key": "m2amedia.tv:name",
- "value": "Car One"
}, - {
- "key": "m2amedia.tv:description",
- "value": "On board camera for Car One"
}
]
}, - "target-account-id": "1a341a62-d07c-46b8-91c3-d8c21e6baa24",
- "organisation-id": "41407639-883c-4ec5-8b7a-491dd3984cca",
}, - {
- "id": "7046a054-401d-420b-a52c-2e045229790c",
- "delay": "PT23H59M59S",
- "destination": {
- "bucket": "s3-bucket-name",
- "prefix": "s3-bucket-prefix"
}, - "discontinuity-handling": "reject-and-fail",
- "apply-to-all-captures": true,
- "role-arn": "arn:aws:iam::123456789012:role/S3Access",
- "metadata": {
- "labels": [
- {
- "key": "m2amedia.tv:name",
- "value": "Car One"
}, - {
- "key": "m2amedia.tv:description",
- "value": "On board camera for Car One"
}
]
}, - "target-account-id": "1a341a62-d07c-46b8-91c3-d8c21e6baa24",
- "organisation-id": "41407639-883c-4ec5-8b7a-491dd3984cca",
}
], - "total_items": 2,
- "page": {
- "next": null
}
}
Get a single Export Rule details by using the Export Rule ID.
export-rule-id required | string <uuid> Unique identifier given when an Export Rule is created |
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 |
{- "apply-to-all-captures": true,
- "create-date": "2023-02-07T16:10:28.625730+00:00",
- "delay": "PT1M",
- "destination": {
- "bucket": "s3-bucket-name",
- "prefix": "s3-bucket-prefix"
}, - "discontinuity-handling": "reject-and-fail",
- "id": "7046a054-401d-420b-a52c-2e045229790c",
- "metadata": {
- "labels": [
- {
- "key": "m2amedia.tv:name",
- "value": "Car One"
}, - {
- "key": "m2amedia.tv:description",
- "value": "On board camera for Car One"
}
]
}, - "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 Export Rule
export-rule-id required | string <uuid> Unique identifier given when an Export Rule is created |
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 |
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 |
{- "destination": {
- "bucket": "s3-bucket-name",
- "prefix": "s3-bucket-prefix"
}, - "discontinuity-handling": "reject-and-fail",
- "capture-ids": [
- "18e27eac-7028-4ff0-b7a3-8a1729eec63f"
], - "role-arn": "arn:aws:iam::123456789012:role/S3Access",
- "metadata": {
- "labels": [
- {
- "key": "m2amedia.tv:name",
- "value": "Car One"
}, - {
- "key": "m2amedia.tv:description",
- "value": "On board camera for Car One"
}
]
}, - "delay": "PT1M",
- "apply-to-all-captures": false
}
{- "apply-to-all-captures": true,
- "create-date": "2023-02-07T16:10:28.625730+00:00",
- "delay": "PT1M",
- "destination": {
- "bucket": "s3-bucket-name",
- "prefix": "s3-bucket-prefix"
}, - "discontinuity-handling": "reject-and-fail",
- "id": "7046a054-401d-420b-a52c-2e045229790c",
- "metadata": {
- "labels": [
- {
- "key": "m2amedia.tv:name",
- "value": "Car One"
}, - {
- "key": "m2amedia.tv:description",
- "value": "On board camera for Car One"
}
]
}, - "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 the defined export rules with the matching Export Rules ID.
export-rule-id required | string <uuid> Unique identifier given when an Export Rule is created |
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 |
{- "error": {
- "code": "403",
- "message": "User not authorised to perform action."
}
}