-
Type: Sub-task
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 7.4
-
Tags:
-
Sprint:TGV 07
Launch an asynchronous by doing a POST on the @convert adapter, with the parameter async to true:
POST http://localhost:8080/nuxeo/api/v1/path/to/file/@convert?async=true
Returns a JSON object with the following data:
{ "entity-type": "conversionScheduled", "conversionId": "id", "pollingURL": "http://localhost:8080/nuxeo/api/v1/conversion/id/poll" }
New endpoint available to poll and get the result of a conversion:
GET http://localhost:8080/nuxeo/api/v1/conversion/id/poll
For conversion not completed, returns the status of the conversion with a 200 HTTP code:
{ "entity-type": "conversionStatus", "conversionId": "id", "status": "running" // scheduled, completed }
For conversion completed, returns the result URL in the Location header with a 303 HTTP code.
GET http://localhost:8080/nuxeo/api/v1/conversion/id/result
Returns the result Blob of the conversion if any, returns 404 if there is no conversion / no result yet for the conversion.