Camera PTZ API

{ "swagger": "2.0", "info": { "version": "2.1.0", "title": "Eagle Eye CameraManager API", "description": "RESTful API for the Eagle Eye CameraManager platform." }, "host": "rest.cameramanager.com", "schemes": [ "http", "https" ], "basePath": "/rest/v2.1", "produces": [ "application/json" ], "definitions": { "Error": { "type": "object", "description": "Generic error response, modelled after RFC 7807.", "properties": { "code": { "type": "integer", "description": "Error code within the system." }, "title": { "type": "string", "description": "This title is not meant to be shown to users and is not guaranteed to stay the same. Please use the code to parse the error." }, "detail": { "type": "string", "description": "Error details, to help developers detect what went wrong." } }, "required": [ "code", "title" ] }, "OAuth2Error": { "type": "object", "description": "Generic OAuth2 error response when there is something wrong with the OAuth2 authentication. Defined at RFC 6749.", "properties": { "error": { "type": "string", "description": "A single ASCII error code conforming the pattern." }, "error_description": { "type": "string", "description": "Human-readable ASCII text providing additional information, used to assist the client developer in understanding the error that occurred." } }, "required": [ "error" ] }, "CameraPtzMove": { "discriminator": "moveType" }, "CameraPtzCenterMove": { "allOf": [ { "$ref": "#/definitions/CameraPtzMove" }, { "properties": { "x": { "type": "integer", "format": "int32", "description": "An X coordinate of the shown image the camera should move to" }, "y": { "type": "integer", "format": "int32", "description": "A Y coordinate of the shown image the camera should move to" }, "width": { "type": "integer", "format": "int32", "description": "A width of the shown image" }, "height": { "type": "integer", "format": "int32", "description": "A height of the shown image" } }, "required": [ "x", "y", "width", "height" ] } ] }, "CameraPtzDirectionMove": { "allOf": [ { "$ref": "#/definitions/CameraPtzMove" }, { "properties": { "direction": { "description": "A direction", "type": "string", "enum": [ "Up", "Down", "Left", "Right", "In", "Out" ] } }, "required": [ "direction" ] } ] } }, "responses": { "resourceNotFound": { "description": "Referenced resource could not be found.", "schema": { "$ref": "#/definitions/Error" } }, "methodNotAllowed": { "description": "The method is not allowed.", "schema": { "$ref": "#/definitions/Error" } }, "unauthorized": { "description": "You are not authenticated. Please authenticate and try again.", "schema": { "$ref": "#/definitions/OAuth2Error" } }, "forbidden": { "description": "You have no permission to access the specified resource.", "schema": { "$ref": "#/definitions/Error" } }, "validationError": { "description": "The supplied object is invalid. Error detail will contain the validation error.", "schema": { "$ref": "#/definitions/Error" } }, "notAcceptableError": { "description": "The requested resource is capable of generating only content not acceptable according to the Accept headers sent in the request.", "schema": { "$ref": "#/definitions/Error" } }, "internalServerError": { "description": "Something went wrong in the server. Please try again.", "schema": { "$ref": "#/definitions/Error" } } }, "parameters": { "cameraId": { "name": "cameraId", "in": "path", "description": "ID of the camera.", "type": "integer", "format": "int32", "required": true }, "cameraPtzMove": { "name": "cameraPtzMove", "in": "body", "required": true, "schema": { "$ref": "#/definitions/CameraPtzMove" } } }, "paths": { "/cameras/{cameraId}/ptz": { "post": { "summary": "Set a camera PTZ.", "description": "Set a camera PTZ (Pan-Tilt-Zoom).", "operationId": "setCameraPtz", "parameters": [ { "$ref": "#/parameters/cameraId" }, { "$ref": "#/parameters/cameraPtzMove" } ], "responses": { "200": { "description": "OK" }, "400": { "$ref": "#/responses/validationError" }, "401": { "$ref": "#/responses/unauthorized" }, "403": { "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/resourceNotFound" }, "405": { "$ref": "#/responses/methodNotAllowed" }, "500": { "$ref": "#/responses/internalServerError" } }, "tags": [ "CameraPtz" ] } } } }

swagger-camera-ptz.yaml

An example request :

POST  https://{{host}}:{{https_port}}/rest/v2.1/cameras/{{cameraId}}/ptz

{
    "moveType": "CameraPtzDirectionMove",
    "direction": "Left"
}