Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Current »

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:

  • 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

{
	"state": "running",
	"startTime": "2017-01-01 12:30:35",
	"progress": {
		"percentage": 22,
		"currentFile": "p12345.jpg",
		"successCount": 30,
		"errorCount": 3,
		"totalFileCount": 150
	}
}

  • No labels

0 Comments

You are not logged in. Any changes you make will be marked as anonymous. You may want to Log In if you already have an account.