REST Bildkonverter (EN)

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

Field

Type

Description

state

String

Possible values:

  • init: No information about a running or completed conversion process is available.

    No progress and startTime fields are supplied.

  • running: A conversion process is currently running. The progress field contains information about the current progress.

  • error: There is no conversion in progress. The last operation could not be started correctly due to an error.

  • finished: No conversion is in progress. The last process was completed successfully.

    The progress field contains information about the progress when it reached 100%.

  • canceled: No conversion is in progress. The last conversion process was canceled prematurely.

    The progress field contains information about the progress at the time when the process was canceled.

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

Â