.. _api_camera: Cameras ======================== .. _add_a_new_camera: Create a new camera ----------------------- To add a new camera, use the following method: .. code:: POST /cameras/ The REQUEST BODY contains an application/json object with the following required parameters: .. list-table:: :widths: 14 8 45 :header-rows: 1 * - Name - Type - Description * - ``group*`` - integer - Camera group ID. * - ``name*`` - string - Camera name. Constraints: Min 1┃Max 256 chars. The list of all available parameters can be found at ``http:///api-docs``. You can send the request with the following parameters, substituting your own values: .. rubric:: Request example .. code:: { "group": 1, "active": false, "name": "Camera_name", "comment": "AAAAAA", "url": "http://my_url" } .. rubric:: CURL example .. code:: curl -X POST "http:///cameras/" \ -H "Authorization: Token " \ -H "Content-Type: application/json" \ -d '{"group":1,"active":false,"name":"Camera_name","comment":"AAAAAA","url":"http://my_url"}' **Returns** * Created: 201 – on success.