Capture / Platesolve
This endpoint captures and/or returns an image. Can optionally solve the image.
Query parameters
-
solve
boolean Whether to solve the image.
-
duration
number(double) The duration of the exposure. If omitted the exposure time for plate solving will be used.
-
gain
number(int32) The gain to use for the exposure. If omitted, the camera's default gain will be used.
-
getResult
boolean Whether to get the result.
-
resize
boolean Whether to resize the image.
-
quality
number(int32) The quality of the image, ranging from 1 (worst) to 100 (best). -1 or omitted for png
-
size
string The size of the image ([width]x[height]). Requires resize to be true.
-
scale
number(double) The scale of the image. Requires resize to be true.
-
stream
boolean Stream the image to the client. This will only stream the image in image/jpg or image/png format. The platesolve result is not included.
-
omitImage
boolean Omit the image from the response. This will only send the platesolve result, if the image was platesolved. Use it if you do not care about the image, only about the platesolve result.
-
waitForResult
boolean Wait for the capture to finish and then return the result. This will immediately take into account all the settings you would otherwise use together with getResult, like resize and stream.
-
save
boolean Save the image to the disk. This needs to be set, when capturing the image.
Responses
-
200application/json
Successful response
Image in png format, when stream is set to true and the image quality is not specified or set to -1
Image in jpg format, when stream is set to true and the image quality is specified
-
409 application/json
Camera not connected / Camera currently exposing
-
500 application/json
Internal server error, Unknown error
curl \
--request GET 'http://localhost:1888/v2/api/equipment/camera/capture'
{
"Response": "Capture already in progress",
"Error": "string",
"StatusCode": 200,
"Success": true,
"Type": "API"
}
{
"Response": "Camera not connected",
"Error": "string",
"StatusCode": 409,
"Success": false,
"Type": "API"
}
{
"Response": "string",
"Error": "Unknown error",
"StatusCode": 500,
"Success": false,
"Type": "API"
}