curl --request POST \
--url https://api.getoneprofile.ai/table-imports/{import_id}/commit/ \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"columns": [
{
"name": "<string>",
"source_index": 1
}
],
"table_name": "<string>",
"folder_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"max_rows": 2,
"row_ranges": [
{
"first": 2,
"last": 2
}
]
}
'import requests
url = "https://api.getoneprofile.ai/table-imports/{import_id}/commit/"
payload = {
"columns": [
{
"name": "<string>",
"source_index": 1
}
],
"table_name": "<string>",
"folder_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"max_rows": 2,
"row_ranges": [
{
"first": 2,
"last": 2
}
]
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
columns: [{name: '<string>', source_index: 1}],
table_name: '<string>',
folder_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
max_rows: 2,
row_ranges: [{first: 2, last: 2}]
})
};
fetch('https://api.getoneprofile.ai/table-imports/{import_id}/commit/', 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.getoneprofile.ai/table-imports/{import_id}/commit/",
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([
'columns' => [
[
'name' => '<string>',
'source_index' => 1
]
],
'table_name' => '<string>',
'folder_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'max_rows' => 2,
'row_ranges' => [
[
'first' => 2,
'last' => 2
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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.getoneprofile.ai/table-imports/{import_id}/commit/"
payload := strings.NewReader("{\n \"columns\": [\n {\n \"name\": \"<string>\",\n \"source_index\": 1\n }\n ],\n \"table_name\": \"<string>\",\n \"folder_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"max_rows\": 2,\n \"row_ranges\": [\n {\n \"first\": 2,\n \"last\": 2\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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.getoneprofile.ai/table-imports/{import_id}/commit/")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"columns\": [\n {\n \"name\": \"<string>\",\n \"source_index\": 1\n }\n ],\n \"table_name\": \"<string>\",\n \"folder_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"max_rows\": 2,\n \"row_ranges\": [\n {\n \"first\": 2,\n \"last\": 2\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getoneprofile.ai/table-imports/{import_id}/commit/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"columns\": [\n {\n \"name\": \"<string>\",\n \"source_index\": 1\n }\n ],\n \"table_name\": \"<string>\",\n \"folder_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"max_rows\": 2,\n \"row_ranges\": [\n {\n \"first\": 2,\n \"last\": 2\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"columns": [
{
"column_type": "text",
"name": "<string>",
"source_index": 1
}
],
"created_at": "2023-11-07T05:31:56Z",
"error": "<string>",
"failed_rows": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"imported_rows": 123,
"row_errors": [
{
"reason": "<string>",
"row_number": 123
}
],
"source_filename": "<string>",
"status": "pending",
"table_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"total_rows": 123,
"updated_at": "2023-11-07T05:31:56Z"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>",
"issues": [
{
"input": "<string>",
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Create the table and start loading its rows
Create the table and its columns from the reviewed mapping, then start the row load in the background.
The table exists as soon as this returns, so the client can navigate to it immediately and watch rows arrive. Poll the job to follow progress.
Committing twice is refused: the second call finds the import already running rather than creating a second table.
curl --request POST \
--url https://api.getoneprofile.ai/table-imports/{import_id}/commit/ \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"columns": [
{
"name": "<string>",
"source_index": 1
}
],
"table_name": "<string>",
"folder_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"max_rows": 2,
"row_ranges": [
{
"first": 2,
"last": 2
}
]
}
'import requests
url = "https://api.getoneprofile.ai/table-imports/{import_id}/commit/"
payload = {
"columns": [
{
"name": "<string>",
"source_index": 1
}
],
"table_name": "<string>",
"folder_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"max_rows": 2,
"row_ranges": [
{
"first": 2,
"last": 2
}
]
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
columns: [{name: '<string>', source_index: 1}],
table_name: '<string>',
folder_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
max_rows: 2,
row_ranges: [{first: 2, last: 2}]
})
};
fetch('https://api.getoneprofile.ai/table-imports/{import_id}/commit/', 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.getoneprofile.ai/table-imports/{import_id}/commit/",
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([
'columns' => [
[
'name' => '<string>',
'source_index' => 1
]
],
'table_name' => '<string>',
'folder_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'max_rows' => 2,
'row_ranges' => [
[
'first' => 2,
'last' => 2
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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.getoneprofile.ai/table-imports/{import_id}/commit/"
payload := strings.NewReader("{\n \"columns\": [\n {\n \"name\": \"<string>\",\n \"source_index\": 1\n }\n ],\n \"table_name\": \"<string>\",\n \"folder_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"max_rows\": 2,\n \"row_ranges\": [\n {\n \"first\": 2,\n \"last\": 2\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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.getoneprofile.ai/table-imports/{import_id}/commit/")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"columns\": [\n {\n \"name\": \"<string>\",\n \"source_index\": 1\n }\n ],\n \"table_name\": \"<string>\",\n \"folder_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"max_rows\": 2,\n \"row_ranges\": [\n {\n \"first\": 2,\n \"last\": 2\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getoneprofile.ai/table-imports/{import_id}/commit/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"columns\": [\n {\n \"name\": \"<string>\",\n \"source_index\": 1\n }\n ],\n \"table_name\": \"<string>\",\n \"folder_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"max_rows\": 2,\n \"row_ranges\": [\n {\n \"first\": 2,\n \"last\": 2\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"columns": [
{
"column_type": "text",
"name": "<string>",
"source_index": 1
}
],
"created_at": "2023-11-07T05:31:56Z",
"error": "<string>",
"failed_rows": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"imported_rows": 123,
"row_errors": [
{
"reason": "<string>",
"row_number": 123
}
],
"source_filename": "<string>",
"status": "pending",
"table_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"total_rows": 123,
"updated_at": "2023-11-07T05:31:56Z"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>",
"issues": [
{
"input": "<string>",
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Authorizations
Path Parameters
Body
Request body for committing an upload.
Send the mapping the user reviewed. Omitting a field's entry leaves that column out of the table entirely, which is how a user drops a column they do not want.
The reviewed mapping, in display order.
1 - 500 elementsShow child attributes
Show child attributes
Name for the table this creates.
1 - 255The folder to make the table in, as when the file is imported from inside one on the Tables list. Leave it out for the top level.
How many of the file's data rows to write, counted from the top: 1 or more. Clamped by the plan's own ceiling, so this can only ever import less than the preview's importable_row_count, never more. Omit it, or send null, for every row the plan allows; that is also how a file with a header and no data rows is committed. Named for the user's choice, unlike the preview's row_limit, which is the plan's cap.
x >= 1Which of the file's data rows to write, the way a print dialog picks pages: rows 1 to 10 and 21 to 30 are two ranges. Rows are numbered as row_errors numbers them, from 1 under the header, blank lines not counted. Overlapping and touching ranges are merged, an end past the file's last row is brought back to it, and a choice bigger than the plan's row_limit keeps its first rows up to it. Rows past the preview's importable_row_count may be chosen: the plan caps how many rows a table holds, not which. A choice wholly past the end of the file is refused, and so is one of more than 100 ranges once merged. Send this or max_rows, never both; omit both for every row the plan allows.
1 - 1000 elementsShow child attributes
Show child attributes
Response
Successful Response
A CSV import's current state.
Poll this until status is terminal. imported_rows climbs as the load
runs, so it doubles as a progress bar against total_rows.
The mapping in force.
Show child attributes
Show child attributes
Why the whole job failed, if it did.
Rows that could not be written: the exact count.
Rows written so far.
A capped sample of per-row failures; failed_rows carries the full count.
Show child attributes
Show child attributes
Where a CSV import has got to.
PENDING is a parsed-and-stored upload the user has not committed yet:
it holds an inferred mapping and nothing else. RUNNING means the table
and its columns exist and the row job is inserting. The two terminal states
are absorbing: a job never leaves them.
pending, running, succeeded, failed The table this created; null before commit.
Rows this import will write: the file's rows, capped by the plan and by whatever max_rows the commit asked for, or the rows its row_ranges hold.
Was this page helpful?