Get batch details
curl --request GET \
--url https://sdk.nimbleway.com/v2/batches/{batch_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://sdk.nimbleway.com/v2/batches/{batch_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://sdk.nimbleway.com/v2/batches/{batch_id}', 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://sdk.nimbleway.com/v2/batches/{batch_id}",
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://sdk.nimbleway.com/v2/batches/{batch_id}"
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://sdk.nimbleway.com/v2/batches/{batch_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sdk.nimbleway.com/v2/batches/{batch_id}")
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{
"completed": true,
"completed_count": 123,
"created_at": "<string>",
"id": "<string>",
"progress": 123,
"status": "success",
"tasks": [
{
"_query": "<unknown>",
"created_at": "2024-01-15T10:30:00Z",
"id": "123e4567-e89b-12d3-a456-426614174000",
"input": "<unknown>",
"state": "pending",
"status_url": "https://api.webit.live/api/v2/tasks/123e4567-e89b-12d3-a456-426614174000",
"account_name": "<string>",
"api_type": "web",
"batch_id": "4b0a90bf-c951-42e4-95b3-a95a65ba69fc",
"download_url": "https://api.webit.live/api/v2/tasks/123e4567-e89b-12d3-a456-426614174000/results",
"error": "Connection timeout",
"error_type": "timeout_error",
"modified_at": "2024-01-15T10:35:00Z",
"output_url": "<string>",
"queue": "<string>",
"status_code": 200
}
],
"completed_at": "<string>"
}{
"error": "task not found",
"status": "failed"
}Get batch details
Retrieve the details of a batch including all its tasks and completion status.
GET
/
v2
/
batches
/
{batch_id}
Get batch details
curl --request GET \
--url https://sdk.nimbleway.com/v2/batches/{batch_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://sdk.nimbleway.com/v2/batches/{batch_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://sdk.nimbleway.com/v2/batches/{batch_id}', 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://sdk.nimbleway.com/v2/batches/{batch_id}",
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://sdk.nimbleway.com/v2/batches/{batch_id}"
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://sdk.nimbleway.com/v2/batches/{batch_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sdk.nimbleway.com/v2/batches/{batch_id}")
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{
"completed": true,
"completed_count": 123,
"created_at": "<string>",
"id": "<string>",
"progress": 123,
"status": "success",
"tasks": [
{
"_query": "<unknown>",
"created_at": "2024-01-15T10:30:00Z",
"id": "123e4567-e89b-12d3-a456-426614174000",
"input": "<unknown>",
"state": "pending",
"status_url": "https://api.webit.live/api/v2/tasks/123e4567-e89b-12d3-a456-426614174000",
"account_name": "<string>",
"api_type": "web",
"batch_id": "4b0a90bf-c951-42e4-95b3-a95a65ba69fc",
"download_url": "https://api.webit.live/api/v2/tasks/123e4567-e89b-12d3-a456-426614174000/results",
"error": "Connection timeout",
"error_type": "timeout_error",
"modified_at": "2024-01-15T10:35:00Z",
"output_url": "<string>",
"queue": "<string>",
"status_code": 200
}
],
"completed_at": "<string>"
}{
"error": "task not found",
"status": "failed"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The unique identifier of the batch.
Example:
"123e4567-e89b-12d3-a456-426614174000"
Response
Batch found and returned successfully.
Response containing batch details with all tasks.
Whether all tasks in the batch have finished.
Number of tasks that have completed so far.
ISO timestamp when the batch was created.
Unique identifier for the batch.
Completion ratio between 0 and 1.
Allowed value:
"success"List of tasks in the batch.
Show child attributes
Show child attributes
ISO timestamp when the batch completed.
Was this page helpful?