Appearance
Camera info
PUT /v1/camera-info registers and updates your camera's description, and GET /v1/camera-info returns it.
PUT /v1/camera-info
Send Content-Type: application/json with the authentication headers. Unknown keys are rejected with 422, at every level.
| Field | Type | Rules |
|---|---|---|
config | object | Required. Replaced as a whole on every PUT. |
config.name | string | Required, non-empty, max 32 characters. Becomes the camera name. |
config.path | string | Optional, for example /dev/video0. |
config.driver | string | Optional, for example uvcvideo. |
config.trigger_scheme | enum | Optional, default THIRTY_SEC. See trigger schemes. |
config.rotation | integer | Optional. The physical rotation of the camera image in degrees, as mounted. Stored as sent. |
config.resolution | {width:int,height:int} | Optional. Both required when sent, at least 1. |
config.network_info | object | Optional. Any of lan_mac, lan_ipv4, lan_ipv6, wifi_mac, wifi_ipv4, wifi_ipv6, wifi_ssid, as strings. |
features | string[] | Optional. Kept unchanged when omitted. |
device | object | Required. Describes the hardware. |
device.type | enum | Required: Buddy3D, ESP32, WEB, LINK or INTERNAL. See camera types. |
device.firmware_version | string | Required, 1 to 16 characters. Use the camera's real release version, not an arbitrary build number. |
device.hardware_version | string | Required, 1 to 32 characters. |
device.protobuf_version | string | Optional, 1 to 16 characters. Only for cameras that implement the Prusa camera protocol. Kept unchanged when omitted. |
device.manufacturer | string | Optional. |
device.model | string | Optional. |
bash
curl -X PUT https://camera-service.prusa3d.com/v1/camera-info \
-H "Token: $TOKEN" -H "Fingerprint: $FINGERPRINT" \
-H "User-Agent: MyCam/1.2.0" -H "Content-Type: application/json" \
-d '{
"config": {
"name": "Workshop camera",
"trigger_scheme": "THIRTY_SEC",
"rotation": 0,
"resolution": { "width": 1600, "height": 1200 }
},
"features": ["snapshot"],
"device": {
"type": "ESP32",
"manufacturer": "AI-Thinker",
"model": "ESP32-CAM",
"firmware_version": "1.2.0",
"hardware_version": "ESP32-CAM rev1"
}
}'Trigger schemes
| Value | Meaning |
|---|---|
TEN_SEC | A snapshot every 10 seconds |
THIRTY_SEC | A snapshot every 30 seconds (default) |
SIXTY_SEC | A snapshot every 60 seconds |
TEN_MIN | A snapshot every 10 minutes |
MANUAL | Only on request. LINK cameras only |
EACH_LAYER | Every printed layer. LINK cameras only |
FIFTH_LAYER | Every fifth printed layer. LINK cameras only |
GCODE | Triggered from G-code. LINK cameras only |
config is replaced as a whole
Every PUT replaces config completely, so send the full config each time, including keys you did not change. features and device.protobuf_version are kept when you omit them.
GET /v1/camera-info
No body. It returns the same response as PUT. Use it to check that your token works.
bash
curl https://camera-service.prusa3d.com/v1/camera-info \
-H "Token: $TOKEN" -H "Fingerprint: $FINGERPRINT" -H "User-Agent: MyCam/1.2.0"Response 200
The response has the same shape as the request:
json
{
"config": {
"name": "Workshop camera",
"trigger_scheme": "THIRTY_SEC",
"rotation": 0,
"resolution": { "width": 1600, "height": 1200 }
},
"features": ["snapshot"],
"device": {
"type": "ESP32",
"manufacturer": "AI-Thinker",
"model": "ESP32-CAM",
"firmware_version": "1.2.0",
"hardware_version": "ESP32-CAM rev1",
"protobuf_version": null
}
}- Every
devicefield can benullwhen it is not known, for example for a camera that has never sent it. configonly contains the keys listed above.
When to call
Call PUT /v1/camera-info at boot, and whenever the configuration changes.
Errors are listed in errors.