Difference between revisions of "API Create Camera Preset"

From IVS Wiki
Jump to: navigation, search
 
Line 1: Line 1:
This API call creates a new preset for the specified camera.
+
This API call creates a new preset for the specified camera at its current pan, tilt, and zoom.
  
 
===Resource URL===
 
===Resource URL===

Latest revision as of 16:21, 11 June 2026

This API call creates a new preset for the specified camera at its current pan, tilt, and zoom.

Resource URL

http://valt.example.com/api/v3/presets/{camera}/add

Replace {camera} with the ID of the camera.

Resource Information

Method POST
Headers Content-Type: application/json
Response Type JSON
Authentication Required Yes

Parameters

Path Parameters

Parameter Description Example
camera The ID of the camera to create the preset for. 1

Request Body

Field Name Type Description Required Example
name string The name of the new preset. Yes "Preset 1"

Response

Code Reason
200 Preset Created Successfully
400 Invalid Request (See Response for Specific Error)
401 Unauthorized
500 Internal Server Error
JSON Response
Field Type Description
id int The ID of the newly created preset.
message string Status message confirming the result.

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/presets/1/add?access_token=e82632d19c523678fea3d1016c6df9e9
{
  "name": "Preset 1"
}

Successful Response

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

{
  "id": 15,
  "message": "Preset added"
}

Failure Response

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

{
  "error": {
    "code": 500,
    "message": "Internal Server Error"
  }
}