bluedot
Documentation / Convert

Retrieve a list of conversion results

This is a REST API that returns AVIF conversion requested results.

Request

curl -x GET  
      https://avif-service-api.kokoon.cloud/avif/convert/tasks/{id}/results
     -H "Authorization: <api_key>"
     -H "Accept: application/json"

List of request parameters

Parameter nameTypeDescription
idstringconversion id.

Response

{
    "id" : "835f24b0-90be-11ed-b598-cbb34621d6d4",
    "step" : "finish",
    "src" : {
      "filename": "example1.jpeg",
      "size" : 104860,
      "width" : 1280,
      "height" : 720
    },
    "request_time" : "2022-12-14T03:00:01.514Z",
    "finish_time" : "2022-12-14T03:00:03.514Z",
    "convert_results": [
    {
      "size": 3224,
      "url": "https://avif-api.kokoon.cloud/avif/convert/tasks/f06a09c0-76b6-11ed-afae-570de5d298a7/results/worst.avif",
      "compression_ratio": "level0"
    }, {
      "size": 5896,
      "url": "https://avif-api.kokoon.cloud/avif/convert/tasks/f06a09c0-76b6-11ed-afae-570de5d298a7/results/bad.avif",
      "compression_ratio": "level1"
    }, {
      "size": 10580,
      "url": "https://avif-api.kokoon.cloud/avif/convert/tasks/f06a09c0-76b6-11ed-afae-570de5d298a7/results/good.avif",
      "compression_ratio": "level2"
    }, {
      "size": 15024,
      "url": "https://avif-api.kokoon.cloud/avif/convert/tasks/f06a09c0-76b6-11ed-afae-570de5d298a7/results/best.avif",
      "compression_ratio": "level3"
    }
  ]
}

List of response parameters

Response fieldTypeDescription
idstringconversion id
stepwait, finish, convert, uploadIndicates the conversion progress. wait, finish, convert, upload
src.filenamestringThe name of the src file.
src.sizenumberThe size of the src file. (bytes)
src.widthnumberThe width of the src file. (px)
src.heightnumberThe height of the src file. (px)
request_timestringTime at which AVIF conversion was requested.
finish_timestringTime at which AVIF conversion was completed.
convert_results.urlstringThis is the url of the converted image.
convert_results.compression_ratiolevel0, level1, level2, level3The name of the compression_ratio option of the converted result image.
convert_results.sizenumberThis is the size of the converted result image file. (bytes)

Response error

Error nameStatusDescription
Not found404This error occurs when there is no conversion corresponding to the requested conversion id.
<< PrevConvert image by uploadingNext >>Retrieve a task status of each conversion task