Skip to main content

checkConversionStatus

ConversationResultArrayWrapper checkConversionStatus(fileId, start)

GET /api/2.0/files/file/{fileId}/checkconversion

Get conversion status

Reports how far the conversion of a file has got, as a list that holds one entry while the portal still knows about that conversion and nothing once it is over. Read progress, which counts from 0 to 100, error for the reason a conversion failed, and file, which carries the converted file as soon as it exists. Queue the conversion with PUT api/2.0/files/file/{fileId}/checkconversion and poll this operation until the entry reaches 100 or disappears: a finished entry is handed out once and then dropped, and an entry whose conversion stopped is discarded a few minutes later, so an empty list means either already reported or never started rather than an error. The same empty list is the answer for an identifier no file matches. Passing start=true starts the conversion as well, with the format from the portal settings and no password, which makes that one flag mutating; without it the operation is read-only. The caller needs read access to the file, and anyone else is refused.

Parameters​

NameInTypeDescriptionNotes
fileIdpathInteger (int32)The file whose conversion is asked about.[required] [example: 1]
startqueryBooleanWhether to start the conversion as well: true queues it with the default output format and no password, false only reports what the portal already knows.[optional] [example: false]

Responses​

Status codeDescriptionTypeResponse headers
200The conversion entry of the file, or an empty list when the portal has noneConversationResultArrayWrapperX-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
403The caller cannot read the file, or, with start=true, may not convert it--
404The file id is neither a number nor the id of a file in a known third-party storage--
401UnauthorizedErrorApiResponse-
429Too Many Requests.ErrorApiResponseRetry-After
500Internal Server Error.ErrorApiResponse-
400Bad Request.ErrorApiResponse-
502Bad Gateway. Returned by the reverse proxy, response body may be HTML and not JSON.--
503Service Unavailable. Returned by the reverse proxy, response body may be HTML and not JSON.--

Return type​

ConversationResultArrayWrapper

Third-party storage​

For a file or folder in a connected third-party storage the identifier is a string such as sbox-42, and the call differs in these parts only:

NameInTypeDescriptionNotes
fileIdpathStringThe file whose conversion is asked about.[required] [example: sbox-42-L1JlcG9ydC5kb2N4]

Authorization​

Basic, OAuth2 (scopes: read, write), ApiKeyBearer, asc_auth_key, Bearer, OpenId

HTTP request headers​

  • Content-Type: Not defined
  • Accept: application/json