Camera Footage API


{ "swagger": "2.0", "info": { "version": "2.2.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.2", "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" ] }, "ResolutionCapabilities": { "type": "object", "properties": { "width": { "type": "integer" }, "height": { "type": "integer" }, "framerates": { "type": "array", "items": { "type": "integer" } } } }, "VideoModeCapabilities": { "type": "object", "additionalProperties": { "$ref": "#/definitions/ResolutionCapabilities" }, "example": { "320x180": { "width": 320, "height": 180, "framerates": [ 10, 20, 25 ] }, "1280x720": { "width": 1280, "height": 720, "framerates": [ 10, 20, 25 ] }, "640x360": { "width": 640, "height": 360, "framerates": [ 10, 20, 25 ] } } }, "FootageCapabilities": { "type": "object", "properties": { "rec": { "$ref": "#/definitions/VideoModeCapabilities" } } }, "VideoSettings": { "type": "object", "properties": { "resolution": { "type": "string", "description": "Resolution of the camera. When setting the resolution, please refer to the footage capabilities api GET /cameras/{cameraId}/footage/capabilities to get the supported resolutions of the camera" }, "framerate": { "type": "integer" }, "maxBitRate": { "type": "integer", "description": "maximum bitrate for the recording stream" } } }, "ModeFootageSettingsUpdate": { "type": "object", "properties": { "video": { "$ref": "#/definitions/VideoSettings" } } }, "ModeFootageSettings": { "type": "object", "properties": { "video": { "allOf": [ { "$ref": "#/definitions/VideoSettings" } ], "type": "object", "required": [ "resolution", "framerate" ] } } }, "FootageSettingsUpdate": { "type": "object", "properties": { "rec": { "$ref": "#/definitions/ModeFootageSettingsUpdate" } } }, "FootageSettings": { "type": "object", "properties": { "rec": { "allOf": [ { "$ref": "#/definitions/ModeFootageSettings" } ], "type": "object", "required": [ "video" ] } }, "required": [ "rec" ] } }, "responses": { "resourceNotFound": { "description": "Referenced resource could not be found.", "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" } }, "unsupportedMediaType": { "description": "The requested resource does not understand the media type sent in the request.", "schema": { "$ref": "#/definitions/Error" } }, "conflict": { "description": "There was a conflict while trying to perform your request. See error details for more information.", "schema": { "$ref": "#/definitions/Error" } } }, "parameters": { "cameraId": { "name": "cameraId", "in": "path", "description": "ID of the camera.", "required": true, "type": "integer" } }, "paths": { "/cameras/{cameraId}/footage/settings": { "get": { "summary": "Get the footage settings of the camera", "description": "Retrieves the footage settings of the camera based on the camera id provided", "operationId": "getFootageSettings", "parameters": [ { "$ref": "#/parameters/cameraId" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/FootageSettings" } }, "400": { "$ref": "#/responses/validationError" }, "401": { "$ref": "#/responses/unauthorized" }, "403": { "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/resourceNotFound" }, "406": { "$ref": "#/responses/notAcceptableError" }, "500": { "$ref": "#/responses/internalServerError" } }, "tags": [ "CameraFootageSettings" ] }, "patch": { "summary": "Update the footage settings of the camera", "description": "To be able to change the footage settings of the camera. If the camera doesn't support the settings provided, a conflict error is thrown. To get the supported settings of the camera, please refer to the footage capabilities api GET /cameras/{cameraId}/footage/capabilities.", "operationId": "updateFootageSettings", "parameters": [ { "$ref": "#/parameters/cameraId" }, { "name": "targetSettings", "in": "body", "required": true, "schema": { "$ref": "#/definitions/FootageSettingsUpdate" } } ], "responses": { "204": { "description": "No Content" }, "400": { "$ref": "#/responses/validationError" }, "401": { "$ref": "#/responses/unauthorized" }, "403": { "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/resourceNotFound" }, "406": { "$ref": "#/responses/notAcceptableError" }, "409": { "$ref": "#/responses/conflict" }, "415": { "$ref": "#/responses/unsupportedMediaType" }, "500": { "$ref": "#/responses/internalServerError" } }, "tags": [ "CameraFootageSettings" ] } }, "/cameras/{cameraId}/footage/capabilities": { "get": { "summary": "Get the footage capabilities of the camera", "description": "Retrieves the footage capabilities of the camera based on the camera id provided", "operationId": "getFootageCapabilities", "parameters": [ { "$ref": "#/parameters/cameraId" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/FootageCapabilities" } }, "400": { "$ref": "#/responses/validationError" }, "401": { "$ref": "#/responses/unauthorized" }, "403": { "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/resourceNotFound" }, "406": { "$ref": "#/responses/notAcceptableError" }, "500": { "$ref": "#/responses/internalServerError" } }, "tags": [ "CameraFootageSettings" ] } } } }

swagger-camera-footage.yaml