.. default-domain:: http .. highlight:: json Camera ====== .. _http-DockingCamera.Camera: .. rubric:: Camera A camera from Docking Camera (KURS), on an onboard camera part or a docking port. | Base class: :ref:`SpaceCenter.Module ` A ``Camera`` object is returned as ``{"id": ..., "class": ...}``, its identifier and the name of its own class. An argument is that object or the identifier alone. A path that acts on an object takes the identifier as ``(id)``. .. http:get:: /docking-camera/camera/(id)/name Name of the PartModule. For example, "ModuleEngines". Inherited from :ref:`SpaceCenter.Module `. :param id: The identifier of the :ref:`Camera ` object. :resjson string value: .. http:get:: /docking-camera/camera/(id)/part The part that contains this module. Inherited from :ref:`SpaceCenter.Module `. :param id: The identifier of the :ref:`Camera ` object. :resjson SpaceCenter.Part value: .. http:get:: /docking-camera/camera/(id)/config The static configuration of the module, as found in the part's `cfg file `_. This provides access to data that is not exposed as a field, such as the resources produced by a generator. Returns ``null`` if the module's configuration node cannot be found. Inherited from :ref:`SpaceCenter.Module `. :param id: The identifier of the :ref:`Camera ` object. :resjson SpaceCenter.ConfigNode value: .. http:get:: /docking-camera/camera/(id)/field-list A list of all the fields of the module, including those not visible in the right-click menu of the part. Filter by :http:get:`/space-center/part-field/(id)/visible` to get just the visible ones. Inherited from :ref:`SpaceCenter.Module `. :param id: The identifier of the :ref:`Camera ` object. :resjson list value: .. http:get:: /docking-camera/camera/(id)/event-list A list of all the events of the module, including those not currently visible or active. Events are the clickable buttons visible in the right-click menu of the part. Filter by :http:get:`/space-center/part-event/(id)/visible` and :http:get:`/space-center/part-event/(id)/active` to get just the ones shown in the menu. Inherited from :ref:`SpaceCenter.Module `. :param id: The identifier of the :ref:`Camera ` object. :resjson list value: .. http:get:: /docking-camera/camera/(id)/action-list A list of all the actions of the module. These are the parts actions that can be assigned to action groups in the in-game editor. Inherited from :ref:`SpaceCenter.Module `. :param id: The identifier of the :ref:`Camera ` object. :resjson list value: .. http:post:: /docking-camera/camera/(id)/image The image from the camera, 256 by 256 pixels. Throws an exception if the camera is off or not started. .. note:: The camera is switched on by setting the ``IsEnabled`` field of its ``PartCameraModule`` or ``DockingCameraModule`` to ``true``, which also opens the camera window. :param id: The identifier of the :ref:`Camera ` object. :reqjson StdLib.ImageFormat format: The format of the image. Optional, defaults to ``"png"``. :reqjson int32 quality: The quality of a JPEG image, from 1 to 100. Optional, defaults to ``75``. :resjson bytes value: The image data.