ARCHIVER CAPTURE

All POST and PUT calls require the Content-Type header to be set to application/json


Capture object

Property Type Nullable Notes
id string No /^[A-Za-z0-9_]+$/
PUT has no effect
startTime UTC ISO 8601 string Yes If null on POST or PUT the current date and time will be assigned. GET always returns a value.
endTime UTC ISO 8601 string Yes null if the capture runs indefinetly
active bool No
decryptKey string Yes KID:CEK
expiresIn int Yes Seconds
publishingPoints string array No

Capture Stats object

Property Type Nullable Notes
id string No
startTime UTC ISO 8601 string Yes [1]
endTime UTC ISO 8601 string Yes [1]
failedCount int No
active bool No
publishingPoints string array No
profileIds string array No

[1] startTime and endTime will either both have values or both be null to indicate that no content has been captured

Capture Available Content object

Property Type Nullable Notes
startTime UTC ISO 8601 string No
endTime UTC ISO 8601 string No

Capture Segment object

Property Type Nullable Notes
id int No
startTime UTC ISO 8601 string No
endTime UTC ISO 8601 string No
archived bool No
failed bool No
inProgress bool No
scheduled bool No
completed bool No
attempts int No
createdAt UTC ISO 8601 string No
updatedAt UTC ISO 8601 string No

Supported Actions

GET /archivercapture/

Get all Captures, or all Capture IDs if onlyIds=true

Query Parameters:

Name Type Required
onlyIds bool No (default: false)

Response Body: Array of Capture objects, or an array of strings if onlyIds=true

Example Response:

[
    {
        "id": "MyCapture",
        "startTime": "2018-09-18T10:00:00Z",
        "endTime": "2018-09-18T10:30:00Z",
        "active": true,
        "decryptKey": "ABCDEF0123456789:ABCDEF0123456789",
        "expiresIn": 1728000,
        "publishingPoints": [
            "http://primary.usp-origin.net/live/live.isml",
            "http://secondary.usp-origin.net/live/live.isml"
        ]
    },
    {
        "id": "MyCapture_2",
        "startTime": "2018-09-25T15:08:17Z",
        "endTime": null,
        "active": false,
        "decryptKey": null,
        "expiresIn": null,
        "publishingPoints": []
    }
]

Example Request:

archivercapture?onlyIds=true

Example Response:

[
    "MyCapture",
    "MyCapture_2",
]

GET /archivercapture/{id}

Get the Capture with the specified ID

Response Body: A Capture object

Example Request:

archivercapture/MyCapture

Example Response Body:

{
    "id": "MyCapture",
    "startTime": "2018-09-18T10:00:00Z",
    "endTime": "2018-09-18T10:30:00Z",
    "active": true,
    "decryptKey": "ABCDEF0123456789:ABCDEF0123456789",
    "expiresIn": 1728000,
    "publishingPoints": [
        "http://primary.usp-origin.net/live/live.isml",
        "http://secondary.usp-origin.net/live/live.isml"
    ]
}

GET /archivercapture/all/stats/

Get the Capture Stats for all Captures

Response Body: Array of Capture Stats objects

Example Response Body:

[
    {
        "id": "MyCapture",
        "startTime": "2018-09-25T00:04:29Z",
        "endTime": "2018-09-28T15:01:31Z",
        "failedCount": 0,
        "profileIds": [
            "ClearPlayoutProfile"
        ],
        "active": true,
        "publishingPoints": [
            "http://primary.usp-origin.net/live/live.isml",
            "http://secondary.usp-origin.net/live/live.isml"
        ]
    },
    {
        "id": "BadCapture",
        "startTime": null,
        "endTime": null,
        "failedCount": 735,
        "profileIds": [],
        "active": true,
        "publishingPoints": [
            "http://bad.usp-origin.net/live/live.isml",
        ]
    }
]

GET /archivercapture/{id}/stats/

Get the Capture Stats for the Capture with the specified ID

Response Body: A Capture Stats object

Example Request:

archivercapture/MyCapture/stats

Example Response Body:

{
    "id": "MyCapture",
    "startTime": "2018-09-25T00:04:29Z",
    "endTime": "2018-09-28T15:01:31Z",
    "failedCount": 0,
    "profileIds": [
        "ClearPlayoutProfile"
    ],
    "active": true,
    "publishingPoints": [
        "http://primary.live-origin.net/live/live.isml",
        "http://secondary.live-origin.net/live/live.isml"
    ]
}

GET /archivercapture/{id}/available/

Get the time ranges of continuous captured content for the Capture with the specified ID. This can be used to see if there are any gaps in the captured content.

Response Body: Array of Capture Available Content objects

Example Request:

archivercapture/MyCapture/available

Example Response Body:

[
    {
        "startTime": "2018-09-25T00:04:29Z",
        "endTime": "2018-09-26T11:30:59Z"
    },
    {
        "startTime": "2018-09-26T11:31:01Z",
        "endTime": "2018-09-26T11:31:05Z"
    },
    {
        "startTime": "2018-09-26T11:34:52Z",
        "endTime": "2018-09-28T15:16:31Z"
    }
]

GET /archivercapture/{id}/segments/

Retrieves the list of Capture Segment objects for the specified Capture.

Optionally, a time range can be specified to only retrieve segments which start and end within that time range. Otherwise, all known segments will be retrieved

Query Parameters:

Name Value Required
start UTC ISO 8601 No[1]
end UTC ISO 8601 No[1]

[1] start and end must be specified together

Response Body: Array of Capture Segment objects

Example Request:

archivercapture/MyCapture/segments?start=2018-09-28T09:11:00Z&end=2018-09-28T09:22:00Z"

Example Response:

[
    {
        "id": 140339,
        "startTime": "2018-09-28T09:11:31Z",
        "endTime": "2018-09-28T09:16:31Z",
        "archived": true,
        "failed": false,
        "inProgress": false,
        "scheduled": true,
        "completed": true,
        "attempts": 1,
        "createdAt": "2018-09-28T09:16:49Z",
        "updatedAt": "2018-09-28T09:17:49Z"
    },
    {
        "id": 140349,
        "startTime": "2018-09-28T09:16:31Z",
        "endTime": "2018-09-28T09:21:31Z",
        "archived": true,
        "failed": false,
        "inProgress": false,
        "scheduled": true,
        "completed": true,
        "attempts": 1,
        "createdAt": "2018-09-28T09:21:55Z",
        "updatedAt": "2018-09-28T09:22:36Z"
    }
]

POST /archivercapture/

Add a new Capture.

All properties are required in the request body.

Request Body: Capture object

Response Body: The persisted Capture object

Example Request Body:

{
    "id": "my_new_capture",
    "startTime": null,
    "endTime": "2018-10-05T10:30:00Z",
    "active": true,
    "decryptKey": "123:456",
    "expiresIn": 864000,
    "publishingPoints": [
        "http://primary.live-origin.net/live/live.isml"
    ]
}

Example Response Body:

{
    "id": "my_new_capture",
    "startTime": "2018-10-01T12:18:53Z",
    "endTime": "2018-10-05T10:30:00Z",
    "active": true,
    "decryptKey": "123:456",
    "expiresIn": 864000,
    "publishingPoints": [
        "http://primary.live-origin.net/live/live.isml"
    ]
}

PUT /archivercapture/{id}

Update an existing Capture.

All properties are required in the request body. Changing id has no effect.

Request Body: Capture object

Response Body: The persisted Capture object

Example of adding a Publishing Point and changing the Decrypt Key of the Capture object returned in the POST example:

Example Request:

archivercapture/my_new_capture

Example Request Body:

{
    "id": "my_new_capture",
    "startTime": "2018-10-01T12:18:53Z",
    "endTime": "2018-10-05T10:30:00Z",
    "active": true,
    "decryptKey": "123456789:ABCDEFG",
    "expiresIn": 864000,
    "publishingPoints": [
        "http://primary.live-origin.net/live/live.isml",
        "http://secondary.live-origin.net/live/live.isml"
    ]
}

Example Response Body:

{
    "id": "my_new_capture",
    "startTime": "2018-10-01T12:18:53Z",
    "endTime": "2018-10-05T10:30:00Z",
    "active": true,
    "decryptKey": "123456789:ABCDEFG",
    "expiresIn": 864000,
    "publishingPoints": [
        "http://primary.live-origin.net/live/live.isml",
        "http://secondary.live-origin.net/live/live.isml"
    ]
}

DELETE /archivercapture/{id}

Delete the Capture with the specified ID

Response Body: The deleted Capture object

Example Request:

archivercapture/my_new_capture

Example Response Body:

{
    "id": "my_new_capture",
    "startTime": "2018-10-01T12:18:53Z",
    "endTime": "2018-10-05T10:30:00Z",
    "active": true,
    "decryptKey": "123456789:ABCDEFG",
    "expiresIn": 864000,
    "publishingPoints": [
        "http://primary.live-origin.net/live/live.isml",
        "http://secondary.live-origin.net/live/live.isml"
    ]
}