API Change Recording

From IVS Wiki
Revision as of 14:00, 14 April 2020 by IVSWikiBlue (talk | contribs) (Created page with "This API call will update the metadata on other information associated with a specified recording. ===Resource URL=== <pre>http://valt.example.com/api/v3/records/{recordingid...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This API call will update the metadata on other information associated with a specified recording.

Resource URL

http://valt.example.com/api/v3/records/{recordingid}/update?

Replace {recordingid} with the actual id number of the recording. Recordingss are numbered sequentially when added to VALT.

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.

Field Name Description Required Example
name Recording Name no Session 1451
template JSON object containing field information for the default template of the recording author. This is required if there are any required fields in the template. no {"1":"1234567890","3":"John Doe","4":"Adult","5":"Suspect","6":"John Smith"}
{fieldid} Value to populate in the specified field ID. Replace {fieldid} with the id number for the field that you wish to populate. Template field IDs can be retrieved by listing the details for a specified template. no Behavioral Anaylsis
share Specify users and/or groups the video will be shared with. This is in addition to any default rights. no {"users":[13,54,23],"groups":[2,5,13]}
users Array of user IDs the video will be shared with. no [13,54,23]
groups Array of group IDs the video will be shared with. no [2,5,13]
retention no {"type":"for","for":{"days":30}}
type Retention Type (Valid Values: inherit,infinitely,until,for) no until
until Date videos will be retained until. no 06-01-2020
for Number of hours, days, or minutes videos will be retained for. no "for":{"days":30}
days Number of days to retain video. (Should only be specified if type is set to for.) no 30
hours Number of hours to retain video. (Should only be specified if type is set to for.) no 24
minutes Number of minutes to retain video. (Should only be specified if type is set to for.) no 180

Response

Code Reason
200 Recording Started Successfully
400 Invalid Request (See Response for Specific Error)
401 Unauthorized
404 Recording ID Not Found
500 JSON Body Formatted Incorrectly
JSON Response
data
id ID number for the updated recording.

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/616/update?access_token=e82632d19c523678fea3d1016c6df9e9
{
  "name":"API Update",
  "retention": {
    "type":"for",
    "for":
    {
      "days":30
  }
}
}

Successful Response

Sample response is shown with line breaks to make it more readable. Actual responses will not include line breaks.

{
"data":{
"id": 616
}
}

Failure Response

Sample response is shown with line breaks to make it more readable. Actual responses will not include line breaks.

{
"error":{
"code": 404
}
}