Anhang | API Communication with Controller (Version 0.7.1)
A 3.5.3.4 /api/firmware/images
POST
Creation of a firmware image with following attributes:
The upload is accomplished in separate requests via /api/firmware/images/UUID/upload (see below).
The approach shown above for creating an image followed by uploading individual blocks is designed for
applications.
Error codes:
LPLC.validation.missing_input
LPLC.validation.string
LPLC.validation.non_negative_integer
LPLC.validation.positive_integer
LPLC.validation.smaller_integer
A 3.5.3.5 Firmware Upload with Form (Multipart)
In addition, the firmware image API endpoint also allows simple upload of a firmware image file using a form
(as part of a multipart request body):
firmware_file:
apply:
When this field is assigned a value of 1, the apply operation is accomplished immediately after receipt of the
firmware image (/api/firmware/images/UUID/apply - see below). Otherwise the request supplies the details for
the uploaded firmware image, to allow a separate apply request.
Example:
# simple upload
curl -X POST --form "firmware_file=@firmware.img" http://169.254.168.150/api/firmware/images
# Upload followed by activation of uploaded firmware image
curl -X POST --form "firmware_file=@firmware.img" --form "apply=1" http://169.254.168.150/api/firmware/
images
The POST request is acknowledged with an empty reply, if no errors occurred.
colorSENSOR CFO
Firmware image file to be uploaded (required)
Selection of immediate application of firmware image uploaded (Standard: 0).
Page 101
Need help?
Do you have a question about the colorSENSOR CFO Series and is the answer not in the manual?
Questions and answers