Camera Driver API Information
1. Open Camera
Description:This API can be used to open camera device
URI: /camera
Method: PUT
Header: Authrization: {token}
Body:
Return: success (string)
Error: 401 (authorized failed)
500 (open camera failed)
2. Close Camera
Description:This API can be used to colse camera device
URI: /camera
Method: DELETE
Header: Authrization: {token}
Body:
Return: success (string)
Error: 401 (authorized failed)
500 (close camera failed)
3. Capture Image Buffer
Description:This API can be used to capture an image, which will be send to client as file stream.
URI: /image/capture
Method: GET
Header: Authrization: {token}
Return: (file stream, image/jpeg)
Error: 401 (authorized failed)
500 (capture image failed)
4. Save Image
Description:This API can be used to save image into an directory
URI: /image/capture
Method: POST
Header: Authrization: {token}
Body: {directory: "directory", filename: "filename"}
Return: success (string)
Error: 401 (authorized failed)
400 (miss parameters)
500 (save image failed)
5. Start Saving Serial Image
Description:This API can be used to start saving a serials of images into an directory
URI: /images/capture
Method: PUT
Header: Authrization: {token}
Body: {directory: "directory", prename: "prename", bufsize: 100, duration: 500}
Return: success (string)
Error: 401 (authorized failed)
400 (miss parameters)
500 (start saving serial image failed)
6. Stop Saving Serial Image
Description:This API can be used to stop saving a serials of images into an directory
URI: /images/capture
Method: DELETE
Header: Authrization: {token}
Body:
Return: success (string)
Error: 401 (authorized failed)
400 (miss parameters)
500 (stop saving serial image failed)