API List Recordings
This API call will list all recordings matching the provided criteria.
Contents
Resource URL
http://valt.example.com/api/v3/records
Resource Information
Method | POST |
Headers | Content-Type:application/json |
Response Type | JSON |
Authentication Required | Yes |
Parameters
The JSON body must be properly formatted. All fields and values should be enclosed in double quotes and separated by a colon.
If no parameters are provided, all recordings will be returned.
Field Name | Description | Required | Example |
---|---|---|---|
search | String to search all metadata for. | no | API Test Videos |
start_date | Filter results for videos on or after the specified date. | no | 04-01-2020 |
end_date | Filter results for videos on or before the specified date. | no | 04-30-2020 |
filter | Specify an existing filter id. | no | 4 |
offset | no | ||
limit | Limit the number of results. | no | 25 |
Response
Code | Reason |
---|---|
200 | Request Successfully |
401 | Unauthorized |
500 | JSON Body Formatted Incorrectly |
data | |||
---|---|---|---|
records | Array of recordings matching search criteria. | ||
id | Recording ID Number | ||
name | Recording Name | ||
created | Date/Time Recording Was Created (Epoch Time) | ||
author | Creator or current owner of the video. | ||
id | User ID for Author | ||
name | Username for Author | ||
type | should always be "record" | ||
duration | Recording Duration | ||
room | Room in which the video was recorded. | ||
id | Room ID | ||
name | Room Name | ||
cameras | Cameras included in recording. | ||
{cameraid} | Camera Name | ||
Sharing | |||
groups | Array of group IDs the video is shared with in addition to default video permissions. | ||
users | Array of user IDs the video is shared with in addition to default video permissions. |
Examples
Request
The sample JSON body below is formatted with line breaks and indentation to make it easier to read. This is not required.
https://ivstest1.ad.ipivs.com/api/v3/records?access_token=e82632d19c523678fea3d1016c6df9e9
{ "search":"API" }
Successful Response
Sample response is shown with line breaks to make it more readable. Actual responses will not include line breaks.
{ "data":{ "records":[ { "id": 616, "name": "Test", "created": 1586358993, "author":{"id": 1, "name": "admin"}, "type": "record", "duration": 399, "room":{ "id": 59, "name": "Jared Test" }, "cameras":{ "89": "Jared Test" }, "sharing":{ "groups":[], "users":[] } }, { "id": 615, "name": "API Recording", "created": 1586356109, "author":{ "id": 15, "name": "Nathaniel" }, "type": "record", "duration": 15, "room":{ "id": 59, "name": "Jared Test" }, "cameras":{ "89": "Jared Test" }, "sharing":{ "groups":[{"id": 17, "name": "API Group 10" }, {"id": 19,…], "users":[{"id": 45, "name": "carduser", "group":{"id": 1,…] } }, { "id": 614, "name": "API Recording", "created": 1586355923, "author":{ "id": 15, "name": "Nathaniel" }, "type": "record", "duration": 61, "room":{ "id": 59, "name": "Jared Test" }, "cameras":{ "89": "Jared Test" }, "sharing":{ "groups":[ { "id": 17, "name": "API Group 10" }, { "id": 19, "name": "API Group 12" } ], "users":[ { "id": 45, "name": "carduser", "group":{"id": 1, "name": "Administrators"} }, { "id": 46, "name": "carduser2", "group":{"id": 1, "name": "Administrators"} } ] } }, { "id": 613, "name": "API Recording", "created": 1586355653, "author":{ "id": 15, "name": "Nathaniel" }, "type": "record", "duration": 33, "room":{ "id": 59, "name": "Jared Test" }, "cameras":{ "89": "Jared Test" }, "sharing":{ "groups":[{"id": 17, "name": "API Group 10" }, {"id": 19,…], "users":[{"id": 45, "name": "carduser", "group":{"id": 1,…] } }, { "id": 612, "name": "API Recording", "created": 1586355517, "author":{"id": 15, "name": "Nathaniel"}, "type": "record", "duration": 9, "room":{ "id": 59, "name": "Jared Test" }, "cameras":{ "89": "Jared Test" }, "sharing":{ "groups":[{"id": 17, "name": "API Group 10" }, {"id": 19,…], "users":[{"id": 45, "name": "carduser", "group":{"id": 1,…] } }, { "id": 611, "name": "API Recording", "created": 1586355450, "author":{ "id": 15, "name": "Nathaniel" }, "type": "record", "duration": 8, "room":{ "id": 59, "name": "Jared Test" }, "cameras":{ "89": "Jared Test" }, "sharing":{ "groups":[ ], "users":[ ] } }, { "id": 610, "name": "API Recording", "created": 1586355224, "author":{ "id": 15, "name": "Nathaniel" }, "type": "record", "duration": 13, "room":{ "id": 59, "name": "Jared Test" }, "cameras":{ "89": "Jared Test" }, "sharing":{ "groups":[], "users":[] } }, { "id": 609, "name": "API Recording", "created": 1586354672, "author":{ "id": 1, "name": "admin" }, "type": "record", "duration": 15, "room":{ "id": 59, "name": "Jared Test" }, "cameras":{ "89": "Jared Test" }, "sharing":{ "groups":[ ], "users":[ ] } } ], "total_count": 129 } }
Failure Response
Sample response is shown with line breaks to make it more readable. Actual responses will not include line breaks.
{ "data":{ "message": "Validation Error", "fields":[ { "name": "name", "message": "This value should not be blank." } ] }, "code": 400 }