Importación masiva de ítems
curl --request POST \
--url http://api.gu1.ai/data-lists/{id}/items/bulk \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"items": [
{}
],
"skipValidationErrors": true,
"replaceExisting": true
}
'import requests
url = "http://api.gu1.ai/data-lists/{id}/items/bulk"
payload = {
"items": [{}],
"skipValidationErrors": True,
"replaceExisting": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({items: [{}], skipValidationErrors: true, replaceExisting: true})
};
fetch('http://api.gu1.ai/data-lists/{id}/items/bulk', 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/data-lists/{id}/items/bulk",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'items' => [
[
]
],
'skipValidationErrors' => true,
'replaceExisting' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://api.gu1.ai/data-lists/{id}/items/bulk"
payload := strings.NewReader("{\n \"items\": [\n {}\n ],\n \"skipValidationErrors\": true,\n \"replaceExisting\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://api.gu1.ai/data-lists/{id}/items/bulk")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"items\": [\n {}\n ],\n \"skipValidationErrors\": true,\n \"replaceExisting\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://api.gu1.ai/data-lists/{id}/items/bulk")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"items\": [\n {}\n ],\n \"skipValidationErrors\": true,\n \"replaceExisting\": true\n}"
response = http.request(request)
puts response.read_bodyReferencia API
Importación masiva de ítems
Importación masiva de ítems en una lista con flag opcional replaceExisting y modos de validación, pensada para lotes grandes — POST /data-lists//items/bulk.
POST
/
data-lists
/
{id}
/
items
/
bulk
Importación masiva de ítems
curl --request POST \
--url http://api.gu1.ai/data-lists/{id}/items/bulk \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"items": [
{}
],
"skipValidationErrors": true,
"replaceExisting": true
}
'import requests
url = "http://api.gu1.ai/data-lists/{id}/items/bulk"
payload = {
"items": [{}],
"skipValidationErrors": True,
"replaceExisting": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({items: [{}], skipValidationErrors: true, replaceExisting: true})
};
fetch('http://api.gu1.ai/data-lists/{id}/items/bulk', 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/data-lists/{id}/items/bulk",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'items' => [
[
]
],
'skipValidationErrors' => true,
'replaceExisting' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://api.gu1.ai/data-lists/{id}/items/bulk"
payload := strings.NewReader("{\n \"items\": [\n {}\n ],\n \"skipValidationErrors\": true,\n \"replaceExisting\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://api.gu1.ai/data-lists/{id}/items/bulk")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"items\": [\n {}\n ],\n \"skipValidationErrors\": true,\n \"replaceExisting\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://api.gu1.ai/data-lists/{id}/items/bulk")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"items\": [\n {}\n ],\n \"skipValidationErrors\": true,\n \"replaceExisting\": true\n}"
response = http.request(request)
puts response.read_bodyResumen
Importa muchos ítems en una sola solicitud (validación por fila). Pensado para carga masiva o migraciones.Endpoint
POST https://api.gu1.ai/data-lists/{id}/items/bulk
Autenticación
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
Cuerpo de la solicitud
array
required
Each item may include:
primaryValue, secondaryValue, searchKeys, category, riskScore, severity (low | medium | high | critical), reason, sourceReference, itemData, metadata, isActive, plus passthrough fields as accepted by the API.boolean
When true, continues importing valid rows while collecting errors for invalid ones (behavior as implemented server-side).
boolean
When true, replaces existing matches according to server merge rules.
Respuesta
Usually200 with successful, errors, and per-row errorDetails for partial failures.
Permisos
Requires bulk import permission for data lists. Global lists accept writes only from system administrators.Was this page helpful?