Camera streams API

API for retrieving camera streams.

{ "swagger": "2.0", "info": { "version": "2.3.0", "title": "Eagle Eye CameraManager API - camera streams", "description": "RESTful API for the Eagle Eye CameraManager platform. APIs to get camera live streams." }, "host": "rest.cameramanager.com", "schemes": [ "http", "https" ], "basePath": "/rest/v2.3", "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" ] }, "Id": { "type": "object", "properties": { "value": { "type": "integer", "format": "int32", "minimum": 0 } }, "description": "The identifier of this object. A positive integer.", "required": [ "value" ] }, "CameraStreams": { "type": "object", "properties": { "streamId": { "$ref": "#/definitions/Id" }, "urls": { "$ref": "#/definitions/Url" }, "outputStreamCodecs": { "$ref": "#/definitions/OutputStreamCodecs" }, "audioPushStream": { "$ref": "#/definitions/AudioPushStream" } }, "required": [ "streamId", "outputStreamCodecs", "audioPushStream" ] }, "Url": { "type": "object", "description": "A list of all possible approaches to access the stream. Each url is complete except for authentication information that has to be added by the API consumer. This can be achieved by adding one of the following parameters to the url [access_token, user_id or session_id].", "properties": { "rtsp": { "type": "string", "description": "Url where to get the RTSP stream from." }, "rtspHttp": { "type": "string", "description": "Url where to get the RTSP over HTTP stream from." }, "rtspHttps": { "type": "string", "description": "Url where to get the RTSP over HTTPS stream from." }, "hlsHttp": { "type": "string", "description": "Url where to get the HLS stream from." }, "hlsHttps": { "type": "string", "description": "Url where to get the secured HLS stream from." }, "mjpegHttp": { "type": "string", "description": "Url where to get the mjpeg stream from." }, "mjpegHttps": { "type": "string", "description": "Url where to get the secured mjpeg stream from." }, "audioPushHttp": { "type": "string", "description": "Url where to get the connection from used to send the audio data to the camera." }, "audioPushHttps": { "type": "string", "description": "Url where to get the secured connection from used to send the audio data to the camera." } } }, "UrlTypes": { "type": "string", "enum": [ "rtsp", "rtspHttp", "rtspHttps", "hlsHttp", "hlsHttps", "mjpegHttp", "mjpegHttps", "audioPushHttp", "audioPushHttps" ] }, "VideoCodec": { "type": "string", "description": "The video codec used in the camera stream. * MPEG4 - version used is MPEG-4 Part 2 * Unknown - video codec used by this camera could not be determined\n", "enum": [ "h264", "mjpeg", "mpeg4", "unknown" ] }, "AudioCodec": { "type": "string", "description": "The audio codec used in the camera stream. * Unknown - audio codec for this camera could not be determined\n", "enum": [ "g711PcmULaw", "g711PcmALaw", "aac", "g726", "unknown" ] }, "OutputStreamCodecs": { "type": "object", "description": "Define the codecs used by the stream coming from the camera. The stream where this codecs are used are RTSP, HLS. See the URL object for a list of streams available.", "properties": { "video": { "$ref": "#/definitions/VideoCodec" }, "audio": { "$ref": "#/definitions/AudioCodec" } }, "required": [ "video", "audio" ] }, "AudioPushStreamType": { "type": "string", "enum": [ "unsupported", "halfDuplex", "fullDuplex" ], "description": "Possible values:\n * Unsupported - camera does not handle pushing of audio stream\n * HalfDuplex - camera is able to receive and play audio stream, but not simultaneously with an outgoing audio stream\n * FullDuplex - camera is able to receive and play audio stream simultaneously with an outgoing audio stream\n" }, "AudioPushStream": { "type": "object", "description": "Define the type of communication system supported and if it's supported, the codec field specifies which codec to use to push audio stream. The URLs where audio should be pushed is in the URL object.\n", "properties": { "type": { "$ref": "#/definitions/AudioPushStreamType" }, "codec": { "$ref": "#/definitions/AudioCodec" } }, "required": [ "type", "codec" ] } }, "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": "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.", "required": true, "type": "integer" }, "includeUrlTypes": { "name": "includeUrlTypes", "in": "query", "description": "Specify which stream URL should be returned. By default no URL is returned", "required": false, "type": "array", "collectionFormat": "multi", "items": { "type": "string", "enum": [ "rtsp", "rtspHttp", "rtspHttps", "hlsHttp", "hlsHttps", "mjpegHttp", "mjpegHttps", "audioPushHttp", "audioPushHttps" ] } } }, "paths": { "/cameras/{cameraId}/streams": { "get": { "summary": "Get the streams of the camera.", "description": "Retrieves the audio and video streams of a specific camera.", "operationId": "getCameraStreams", "parameters": [ { "$ref": "#/parameters/cameraId" }, { "$ref": "#/parameters/includeUrlTypes" } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/CameraStreams" } } }, "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": [ "CameraStreams" ] } } } }
Camera Stream API YAML specification
swagger-camera-streams.yaml