User-event batch failures
curl --request GET \
--url http://api.gu1.ai/batch-import/user-event-jobs/{jobId}/failures \
--header 'Authorization: Bearer <token>'import requests
url = "http://api.gu1.ai/batch-import/user-event-jobs/{jobId}/failures"
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/user-event-jobs/{jobId}/failures', 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/user-event-jobs/{jobId}/failures",
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/user-event-jobs/{jobId}/failures"
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/user-event-jobs/{jobId}/failures")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://api.gu1.ai/batch-import/user-event-jobs/{jobId}/failures")
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
User-event batch failures
Download CSV or JSON reports listing failed user-event rows for a batch import job, including row numbers, error codes, and validation messages.
GET
/
batch-import
/
user-event-jobs
/
{jobId}
/
failures
User-event batch failures
curl --request GET \
--url http://api.gu1.ai/batch-import/user-event-jobs/{jobId}/failures \
--header 'Authorization: Bearer <token>'import requests
url = "http://api.gu1.ai/batch-import/user-event-jobs/{jobId}/failures"
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/user-event-jobs/{jobId}/failures', 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/user-event-jobs/{jobId}/failures",
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/user-event-jobs/{jobId}/failures"
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/user-event-jobs/{jobId}/failures")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://api.gu1.ai/batch-import/user-event-jobs/{jobId}/failures")
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_bodyEndpoints
GET https://api.gu1.ai/batch-import/user-event-jobs/{jobId}/failures.csv
GET https://api.gu1.ai/batch-import/user-event-jobs/{jobId}/failures
β¦/failures.csvβ CSV downloadβ¦/failuresβ JSON
Authentication
Authorization: Bearer YOUR_API_KEY
transactions:create, entities:bulk_import, events:create.
HTTP responses
| Status | When |
|---|---|
200 | Job found |
401 | Not authenticated |
403 | Missing permission |
404 | Job not found |
CSV columns
| Column | Description |
|---|---|
row_key | Source row id (e.g. row_5 = CSV line 5) |
code | Stable failure code β catalog |
error | Human-readable message |
JSON response
Same envelope as Transaction failures withkind: user_event_batch. The failures[] sample (max 500) is hydrated from failures.csv in S3 when available; download the CSV for the full list.
{
"success": true,
"jobId": "β¦",
"kind": "user_event_batch",
"status": "completed",
"totalItems": 50,
"succeeded": 49,
"failed": 1,
"skipped": 0,
"failures": [
{
"rowKey": "row_5",
"code": "VALIDATION_ERROR",
"message": "Required field empty"
}
],
"truncated": false,
"failuresTotal": 1
}
VALIDATION_ERROR, ENTITY_NOT_FOUND, PROCESSING_ERROR.
See also: Import user events, Failure codes.Was this page helpful?
βI