Complete a hosted upload
curl --request POST \
--url https://api.withsplendor.com/v1/ingest/sources/{source_key}/uploads/complete \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-splendor-tenant-id: <x-splendor-tenant-id>' \
--data '
{
"upload_session_id": "<string>",
"parts": [
{
"etag": "<string>",
"part_number": 5000
}
]
}
'import requests
url = "https://api.withsplendor.com/v1/ingest/sources/{source_key}/uploads/complete"
payload = {
"upload_session_id": "<string>",
"parts": [
{
"etag": "<string>",
"part_number": 5000
}
]
}
headers = {
"x-splendor-tenant-id": "<x-splendor-tenant-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-splendor-tenant-id': '<x-splendor-tenant-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({upload_session_id: '<string>', parts: [{etag: '<string>', part_number: 5000}]})
};
fetch('https://api.withsplendor.com/v1/ingest/sources/{source_key}/uploads/complete', 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.withsplendor.com/v1/ingest/sources/{source_key}/uploads/complete",
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([
'upload_session_id' => '<string>',
'parts' => [
[
'etag' => '<string>',
'part_number' => 5000
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-splendor-tenant-id: <x-splendor-tenant-id>"
],
]);
$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 := "https://api.withsplendor.com/v1/ingest/sources/{source_key}/uploads/complete"
payload := strings.NewReader("{\n \"upload_session_id\": \"<string>\",\n \"parts\": [\n {\n \"etag\": \"<string>\",\n \"part_number\": 5000\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-splendor-tenant-id", "<x-splendor-tenant-id>")
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("https://api.withsplendor.com/v1/ingest/sources/{source_key}/uploads/complete")
.header("x-splendor-tenant-id", "<x-splendor-tenant-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"upload_session_id\": \"<string>\",\n \"parts\": [\n {\n \"etag\": \"<string>\",\n \"part_number\": 5000\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.withsplendor.com/v1/ingest/sources/{source_key}/uploads/complete")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-splendor-tenant-id"] = '<x-splendor-tenant-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"upload_session_id\": \"<string>\",\n \"parts\": [\n {\n \"etag\": \"<string>\",\n \"part_number\": 5000\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"bucket": "acme-uploads",
"dataset_id": "app-logs",
"etag": "\"abc123\"",
"image_reference": "s3://acme-uploads/uploads/ups_01H8Z3/data.jsonl",
"key": "uploads/ups_01H8Z3/data.jsonl",
"source": "app-logs",
"source_id": 12,
"tenant_id": "acme"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Sources & ingest
Complete a hosted upload
Completes a multipart upload after all parts are uploaded and enqueues the uploaded object for ingestion. Track progress with the upload readiness endpoint or ingest runs.
POST
/
v1
/
ingest
/
sources
/
{source_key}
/
uploads
/
complete
Complete a hosted upload
curl --request POST \
--url https://api.withsplendor.com/v1/ingest/sources/{source_key}/uploads/complete \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-splendor-tenant-id: <x-splendor-tenant-id>' \
--data '
{
"upload_session_id": "<string>",
"parts": [
{
"etag": "<string>",
"part_number": 5000
}
]
}
'import requests
url = "https://api.withsplendor.com/v1/ingest/sources/{source_key}/uploads/complete"
payload = {
"upload_session_id": "<string>",
"parts": [
{
"etag": "<string>",
"part_number": 5000
}
]
}
headers = {
"x-splendor-tenant-id": "<x-splendor-tenant-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-splendor-tenant-id': '<x-splendor-tenant-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({upload_session_id: '<string>', parts: [{etag: '<string>', part_number: 5000}]})
};
fetch('https://api.withsplendor.com/v1/ingest/sources/{source_key}/uploads/complete', 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.withsplendor.com/v1/ingest/sources/{source_key}/uploads/complete",
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([
'upload_session_id' => '<string>',
'parts' => [
[
'etag' => '<string>',
'part_number' => 5000
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-splendor-tenant-id: <x-splendor-tenant-id>"
],
]);
$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 := "https://api.withsplendor.com/v1/ingest/sources/{source_key}/uploads/complete"
payload := strings.NewReader("{\n \"upload_session_id\": \"<string>\",\n \"parts\": [\n {\n \"etag\": \"<string>\",\n \"part_number\": 5000\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-splendor-tenant-id", "<x-splendor-tenant-id>")
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("https://api.withsplendor.com/v1/ingest/sources/{source_key}/uploads/complete")
.header("x-splendor-tenant-id", "<x-splendor-tenant-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"upload_session_id\": \"<string>\",\n \"parts\": [\n {\n \"etag\": \"<string>\",\n \"part_number\": 5000\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.withsplendor.com/v1/ingest/sources/{source_key}/uploads/complete")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-splendor-tenant-id"] = '<x-splendor-tenant-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"upload_session_id\": \"<string>\",\n \"parts\": [\n {\n \"etag\": \"<string>\",\n \"part_number\": 5000\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"bucket": "acme-uploads",
"dataset_id": "app-logs",
"etag": "\"abc123\"",
"image_reference": "s3://acme-uploads/uploads/ups_01H8Z3/data.jsonl",
"key": "uploads/ups_01H8Z3/data.jsonl",
"source": "app-logs",
"source_id": 12,
"tenant_id": "acme"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Authorizations
API token issued from the Splendor console.
Headers
Selects the tenant (workspace) the request acts within.
Path Parameters
Body
application/json
⌘I