API Start Recording

From IVS Wiki
Revision as of 13:55, 14 April 2020 by IVSWikiBlue (talk | contribs) (Created page with "This API call will start a recording in the specified room. ===Resource URL=== <pre>http://valt.example.com/api/v3/rooms/{roomid}/record/start</pre> ''Replace {roomid} with t...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This API call will start a recording in the specified room.

Resource URL

http://valt.example.com/api/v3/rooms/{roomid}/record/start

Replace {roomid} with the actual id number of the room. Rooms 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 yes 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]
author Specifies a user ID to start the recording under. Authenticated user must have change author permissions. no 7

Response

Code Reason
200 Recording Started Successfully
400 Invalid Request (See Response for Specific Error)
401 Unauthorized
404 Room ID Not Found
500 JSON Body Formatted Incorrectly
JSON Response
data
message "The recording is started" or contains a detailed message on why the recording could not be started
id ID number for the new recording.
start true = recording started successfully, false = recording could not be started (reference messaged for reason)

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/rooms/59/record/start?access_token=e82632d19c523678fea3d1016c6df9e9
{
  "name":"API Recording",
  "author":15,
  "template":
  {
    "1":"1234567890",
    "3":"John Doe",
    "4":"Adult",
    "5":"Suspect",
    "6":"John Smith"    
  },
  "share": 
  {
    "users": [45, 46],
    "groups": [17,19]
}

}

Successful Response

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

{
"data":{
"message": "The recording is started",
"id": 612,
"start": true
}
}

Failure Response

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

{
"data":{
"message": "This room is locked",
"start": false
},
"code": 400
}