Video Status and Search Functions

To get information about EDVR and DVR upload requests, you can use the DVR Requests by UploadRequestId endpoint. An uploadRequestId is returned for each successful upload request.

GET {{BaseURL}}/videos/dvr/uploadrequests/{{uploadRequestId}}

To see all the DVR videos available for an ESN, you can use the Get DVR by ESN endpoint:

GET {{BaseURL}}/videos/dvr/devices/esn/{{ESN}}

Finally, if you need a more flexible way to search for videos, you can use the DVR search endpoint:

POST {{BaseURL}}/videos/dvr/search

The search endpoint allows you to use several searchable properties to perform a structured search. The searchable properties include the following:

"searchableProperties": {
            "createdOn (date[])": "yyyy-MM-dd'T'HH:mm:ss.SSSZ",
            "accountId (long[])": "",
            "uploadRequestId (string[])": "",
            "endTimeUTC (date[])": "yyyy-MM-dd'T'HH:mm:ss.SSSZ",
            "startTimeUTC (date[])": "yyyy-MM-dd'T'HH:mm:ss.SSSZ",
            "videoEventName (string[])": "",
            "requestType (string[])": "",
            "videoEventCode (string[])": "",
            "status (string[])": "",
            "deviceId (string[])": ""
        }

The body of the search post includes a search object in this format:

{
    "search": {
        "maxResults": 100,
        "searchTerms": {
            "deviceId": "3272001234"
        },
        "sort" : ["-createdOn"]
    }
}

You can have one or more search terms (joined with AND logic), which can be any of the preceding searchable properties. It is also possible to sort results based on any searchable property in ascending or descending order. maxResults and sort are optional, with defaults of 10 and + (ascending), respectively.

maxResults is limited to 100 or lower.

One item that may not be obvious is the deviceId; in this context, it is the LMU’s ESN.

For more information on structured search, see the "Structured Search" section of CTC API Convention (under Getting Started) in the developer portal. In particular, there are good examples for date/time ranges and sorting, plus examples of using other CTC search APIs that help clarify CTC’s structured search behavior.