Get batch detail
curl --request GET \
--url https://api.runflow.io/v1/batches/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.runflow.io/v1/batches/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.runflow.io/v1/batches/{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://api.runflow.io/v1/batches/{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://api.runflow.io/v1/batches/{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://api.runflow.io/v1/batches/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.runflow.io/v1/batches/{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{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"org_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"target_type_code": "<string>",
"target_type": "<string>",
"target_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status_code": "<string>",
"source_code": "<string>",
"items_total": 123,
"items_succeeded": 123,
"items_failed": 123,
"items_cancelled": 123,
"input": [
{}
],
"resolved_template_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"dispatch_provider_link_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cost": "<string>",
"output": {},
"metadata": {},
"callback_url": "<string>",
"duration_ms": 123,
"failure_code": "<string>",
"failure_message": "<string>",
"failure_stage_code": "<string>",
"created_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"links": {},
"items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sequence_index": 123,
"run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status_code": "<string>",
"client_ref": "<string>"
}
]
}{
"code": "<string>",
"message": "<string>",
"errors": [
{}
]
}{
"code": "<string>",
"message": "<string>",
"errors": [
{}
]
}{
"code": "<string>",
"message": "<string>",
"errors": [
{}
]
}{
"code": "<string>",
"message": "<string>",
"errors": [
{}
]
}{
"code": "<string>",
"message": "<string>",
"errors": [
{}
]
}Batches
Get batch detail
Get a batch by id with an inline lean items[] for polling.
items[] is always the joined batch_items × runs handle
projection (see :class:models.batch.BatchItemHandle) so customers
don’t need a second request to address each item. For the full
per-item projection (input/output/cost/timestamps), use the
paginated GET /batches/{id}/items endpoint.
GET
/
v1
/
batches
/
{id}
Get batch detail
curl --request GET \
--url https://api.runflow.io/v1/batches/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.runflow.io/v1/batches/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.runflow.io/v1/batches/{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://api.runflow.io/v1/batches/{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://api.runflow.io/v1/batches/{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://api.runflow.io/v1/batches/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.runflow.io/v1/batches/{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{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"org_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"target_type_code": "<string>",
"target_type": "<string>",
"target_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status_code": "<string>",
"source_code": "<string>",
"items_total": 123,
"items_succeeded": 123,
"items_failed": 123,
"items_cancelled": 123,
"input": [
{}
],
"resolved_template_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"dispatch_provider_link_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cost": "<string>",
"output": {},
"metadata": {},
"callback_url": "<string>",
"duration_ms": 123,
"failure_code": "<string>",
"failure_message": "<string>",
"failure_stage_code": "<string>",
"created_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"links": {},
"items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sequence_index": 123,
"run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status_code": "<string>",
"client_ref": "<string>"
}
]
}{
"code": "<string>",
"message": "<string>",
"errors": [
{}
]
}{
"code": "<string>",
"message": "<string>",
"errors": [
{}
]
}{
"code": "<string>",
"message": "<string>",
"errors": [
{}
]
}{
"code": "<string>",
"message": "<string>",
"errors": [
{}
]
}{
"code": "<string>",
"message": "<string>",
"errors": [
{}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Path Parameters
Response
Successful Response
Response shape.
Pattern:
^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$Show child attributes
Show child attributes
⌘I