Difference between revisions of "API Create Camera Preset"
IVSWikiBlue (talk | contribs) |
IVSWikiBlue (talk | contribs) |
||
| Line 84: | Line 84: | ||
===Request=== | ===Request=== | ||
The sample JSON body below is formatted with line breaks and indentation to make it easier to read. This is '''not''' required. | The sample JSON body below is formatted with line breaks and indentation to make it easier to read. This is '''not''' required. | ||
| − | <pre>https://ivstest1.ad.ipivs.com/api/v3/presets/1/add?access_token= | + | <pre>https://ivstest1.ad.ipivs.com/api/v3/presets/1/add?access_token=exampletoken</pre> |
<nowiki> | <nowiki> | ||
{ | { | ||
Latest revision as of 15:36, 18 September 2026
This API call creates a new preset for the specified camera at its current pan, tilt, and zoom.
Contents
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 |
| 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=exampletoken
{
"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"
}
}