Download batch job payload
curl --request GET \
--url http://api.gu1.ai/batch-import/jobs/{jobId}/payload \
--header 'Authorization: Bearer <token>'import requests
url = "http://api.gu1.ai/batch-import/jobs/{jobId}/payload"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://api.gu1.ai/batch-import/jobs/{jobId}/payload', 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 => "http://api.gu1.ai/batch-import/jobs/{jobId}/payload",
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 := "http://api.gu1.ai/batch-import/jobs/{jobId}/payload"
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("http://api.gu1.ai/batch-import/jobs/{jobId}/payload")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://api.gu1.ai/batch-import/jobs/{jobId}/payload")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyAPI Reference
Download batch job payload
Download the processed payload.json stored for a batch import job (resume/debug). Authenticated attachment β no public object-storage URL.
GET
/
batch-import
/
jobs
/
{jobId}
/
payload
Download batch job payload
curl --request GET \
--url http://api.gu1.ai/batch-import/jobs/{jobId}/payload \
--header 'Authorization: Bearer <token>'import requests
url = "http://api.gu1.ai/batch-import/jobs/{jobId}/payload"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://api.gu1.ai/batch-import/jobs/{jobId}/payload', 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 => "http://api.gu1.ai/batch-import/jobs/{jobId}/payload",
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 := "http://api.gu1.ai/batch-import/jobs/{jobId}/payload"
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("http://api.gu1.ai/batch-import/jobs/{jobId}/payload")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://api.gu1.ai/batch-import/jobs/{jobId}/payload")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyEndpoint
GET https://api.gu1.ai/batch-import/jobs/{jobId}/payload
GET /batch-import/jobs/{jobId}/source when rawSourceS3Key exists. The object-storage key is resolved server-side and is never returned as a public URL.
Authentication
Authorization: Bearer YOUR_API_KEY
/batch-import routes, plus the kind-specific export permission:
| Job kind | Permission |
|---|---|
transaction_batch | transactions:export |
user_event_batch | events:export |
entity_batch (alias entity_automatic) | entities:export |
HTTP responses
| Status | When |
|---|---|
200 | Payload bytes (Content-Type: application/json) |
401 | Not authenticated |
403 | Missing export permission |
404 | Unknown job, or payload not stored for this job (PAYLOAD_NOT_AVAILABLE) |
502 | Stored object could not be read (PAYLOAD_DOWNLOAD_FAILED) |
Notes
- Present when metadata includes
payloadS3Key(or a legacysourceS3Keythat points at this jobβspayload.json). - Related: original upload via
GET /batch-import/jobs/{jobId}/sourcewhenrawSourceS3Keyexists; row failures via the kind-specificfailures.csvendpoints.
Was this page helpful?