Skip to main content
GET
/
v2
/
workflow
/
get-task-status
Retrieve a task status
curl --request GET \
  --url https://api.browseract.com/v2/workflow/get-task-status \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.browseract.com/v2/workflow/get-task-status"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.browseract.com/v2/workflow/get-task-status', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://api.browseract.com/v2/workflow/get-task-status",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer <token>"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.browseract.com/v2/workflow/get-task-status"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.browseract.com/v2/workflow/get-task-status")
  .header("Authorization", "Bearer <token>")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.browseract.com/v2/workflow/get-task-status")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "status": "running"
}
{
  "code": 123,
  "msg": "Invalid task_id",
  "data": {},
  "ts": 1699335116000,
  "time": "2023-11-07T05:31:56Z",
  "traceId": "b4bb01c1b2b14f11a6a2d7c1c8b0e3a1"
}
{
  "code": 123,
  "msg": "Invalid task_id",
  "data": {},
  "ts": 1699335116000,
  "time": "2023-11-07T05:31:56Z",
  "traceId": "b4bb01c1b2b14f11a6a2d7c1c8b0e3a1"
}

Authorizations

Authorization
string
header
required

Send your API key in the Authorization header as Bearer <API_KEY>.

Query Parameters

task_id
string
required

Task ID returned by run-task or run-task-by-template.

Minimum string length: 1

Response

OK

Lightweight response containing only the task status.

status
enum<string>
required

Current task status.

  • created: Task is created but not yet running
  • running: Task is currently executing
  • finished: Task completed successfully
  • canceled: Task was canceled (e.g., via Stop Task)
  • pausing: Task is transitioning into paused state
  • paused: Task is paused and can be resumed
  • failed: Task ended with an error
  • unknown: Unknown or unsupported status
Available options:
created,
running,
finished,
canceled,
pausing,
paused,
failed,
unknown