API Create Room

From IVS Wiki
Revision as of 08:24, 14 June 2024 by IVSWikiBlue (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This API call will add a new room.

Resource URL

http://valt.example.com/api/v3/admin/rooms

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 Room Name yes Room 174
wowza Media Server yes 1
is_io Enable IO control of room (true = enabled, false = disabled) no false
io_camera_id Camera ID number for IO control. no 63
io_user_id User ID number that IO recordings should be assigned to. no 47

Response

Code Reason
200 Room Created Successfully
400 Invalid Request (See Response for Specific Error)
401 Unauthorized
500 JSON Body Formatted Incorrectly
JSON Response
data
id ID number for the new room.

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/admin/templates/52/fields?access_token=e82632d19c523678fea3d1016c6df9e9
{
  "name":"API Test 4",
  "is_io":true,
  "io_camera_id":63,
  "io_user_id":47
}

Successful Response

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

{
"data":{
"id": 68
}
}

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
}