API Image Converter
Start conversion of images
Request
POST https://www.websale.de/api/images/convert/start
Content-Type
application/json
Authorization token
requires
Response
Returns an empty JSON object if successful.
Cancel conversion of images
Request
POST https://www.websale.de/api/images/convert/cancel
Content-Type
application/json
Authorization token
requires
Response
Returns an empty JSON object if successful.
Query conversion progress
Request
GET https://www.websale.de/api/images/convert/state
Content-Type
application/json
Authorization token
requires
Response
Returns a JSON object with the following structure if successful:
Field | Type | Description |
---|---|---|
state | String | Possible values:
|
startTime | String | Time when the last or the current conversion process was started. |
progress | Object | Information about the progress of the current or the last finished conversion process. |
progress.percentage | Integer | Progress of the conversion process in percent. |
progress.currentFile | String | Name of the image file that is currently being converted or was last converted. Only set in running or canceled state, otherwise an empty string. |
progress.successCount | Integer | Number of files that could be converted correctly. |
progress.errorCount | Integer | Number of files where an error occurred during conversion. |
progress.totalFileCount | Integer | Total number of files to be converted. |
Example
{ "state": "running", "startTime": "2017-01-01 12:30:35", "progress": { "percentage": 22, "currentFile": "p12345.jpg", "successCount": 30, "errorCount": 3, "totalFileCount": 150 } }
0 Comments