.. _api_camera: Cameras ======================== .. _add_a_new_camera: Create a new camera ----------------------- To add a new camera, use this method: .. code:: POST /cameras/ The REQUEST BODY contains application/json object with the following :ref:`required parameters `: .. _post_camera_request_parameters: .. list-table:: :widths: 14 8 45 :header-rows: 1 * - Name - Schema - Description * - ``group*`` - integer - Camera group. * - ``name*`` - string - Camera name. Constraints: 1 to 256 chars. The other parameters you can see at ``http:///api-docs``. You may send the request with these parameters substituting with your values: .. rubric:: Request example .. code:: { "group": 1, "active": false, "name": "Camera_name", "comment": "AAAAAA", "url": "url" } .. rubric:: CURL example .. code:: curl -X POST "http:///cameras/" \ -H "Accept: application/json" \ -H "Content-Language: ru" \ -H "Accept-Language: ru" \ -H "Authorization: Token " \ -H "Content-Type: application/json" \ -d '{"group":1,"active":false,"name":"Camera_name","comment":"AAAAAA","url":"url"}' \ **Returns** * Created: 201 – if success.