Vertopal — Free Online Converter
API Menu

Monitor Response of Task

POST /v1/task/response

Get the latest response of any task at any time.
It can be used to monitor any task and check its status.
Using this task, you can monitor a convert task until it completes. You request the latest response of the convert task in different time intervals, until the status of the convert task changes from "running" to "completed". Now you can check the converting status in the output key and if successful, proceed to download the converted file.

Request

Parameter Keys

include array

Specifies what items from the response of the monitored task should be returned in the output. It must contain a sub-array of pre-defined values.

Default
["entity", "payload", "result"]
Values
["entity", "payload", "result"]
The example code of this section shows the structure of the Monitor Response of Task request. You may see the other request structure keys such as data keys and see how the request is authenticated.
HTTP
cURL
CLI
Python
PHP
POST https://api.vertopal.com/v1/task/response
Authorization: Bearer [APP_TOKEN]

data={
    "app": "[APP_ID]",
    "connector": "[CONNECTOR]",
    "parameters": {
        "include": ["result"]
    }
}
curl -L -X POST 'https://api.vertopal.com/v1/task/response' \
-H 'Authorization: Bearer [APP_TOKEN]' \
-F 'data={
    "app": "[APP_ID]",
    "connector": "[CONNECTOR]",
    "parameters": {
        "include": ["result"]
    }
}'
vertopal api -v 1 task/response \
--app "[APP_ID]" \
--token "[APP_TOKEN]" \
-F data='{
    "app": "%app-id%",
    "connector": "[CONNECTOR]",
    "parameters": {
        "include": ["result"]
    }
}'
from vertopal.api.v1 import API

API.task_response(
    app="[APP_ID]",
    token="[APP_TOKEN]",
    connector="[CONNECTOR]",
)
use Vertopal\API\Credential;
use Vertopal\API\V1;

require "vendor/autoload.php";

$credential = new Credential("[APP_ID]", "[APP_TOKEN]");

V1::taskResponse($credential, "[CONNECTOR]")

Response

Output Keys

entity object

The same explanation for the entity of task response, but in output for the monitored task.

payload object

The same explanation for the payload of task response, but in output for the monitored task.

result object

The same explanation for the result of task response, but in output for the monitored task.

HTTP Status Codes

OK 200

The task has been executed successfully without any errors.

The example code of this section shows the structure of the Monitor Response of Task response. You may see the other response structure keys such as entity keys.
JSON
{
    "result": {
        "output": {
            "result": {
                "output": {
                    // output keys of monitored task
                },
                "error": {},
                "warning": {}
            }
        },
        "error": {},
        "warning": {}
    }
}
Loading, Please Wait...