curl --request PATCH \
--url https://api.getoneprofile.ai/table-imports/{import_id}/ \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"sheet": "<string>"
}
'import requests
url = "https://api.getoneprofile.ai/table-imports/{import_id}/"
payload = { "sheet": "<string>" }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({sheet: '<string>'})
};
fetch('https://api.getoneprofile.ai/table-imports/{import_id}/', 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}/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'sheet' => '<string>'
]),
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}/"
payload := strings.NewReader("{\n \"sheet\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.getoneprofile.ai/table-imports/{import_id}/")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"sheet\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getoneprofile.ai/table-imports/{import_id}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"sheet\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"columns": [
{
"distribution": {
"distinct_count": 123,
"empty_count": 123,
"other_count": 123,
"total_count": 123,
"values": [
{
"count": 123,
"percentage": 123,
"value": "<string>"
}
]
},
"inferred_type": "text",
"name": "<string>",
"sample_values": [
"<string>"
],
"source_index": 123
}
],
"estimated_row_count": 123,
"import_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"importable_row_count": 123,
"row_limit": 123,
"sample_rows": [
[
"<string>"
]
],
"warnings": [
"<string>"
],
"selected_sheet": "<string>",
"sheet_names": [
"<string>"
]
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>",
"issues": [
{
"input": "<string>",
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Re-read a pending upload from a different sheet
Read the workbook that was already uploaded from another of its sheets, and return a fresh preview. The upload is not sent again: the file is already stored, and it can be large.
Every column is inferred from scratch, so the mapping in the response REPLACES the one being edited rather than merging into it. Two sheets share nothing but a file.
Only a pending import can change sheet; once committed, the table exists and its columns are fixed.
curl --request PATCH \
--url https://api.getoneprofile.ai/table-imports/{import_id}/ \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"sheet": "<string>"
}
'import requests
url = "https://api.getoneprofile.ai/table-imports/{import_id}/"
payload = { "sheet": "<string>" }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({sheet: '<string>'})
};
fetch('https://api.getoneprofile.ai/table-imports/{import_id}/', 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}/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'sheet' => '<string>'
]),
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}/"
payload := strings.NewReader("{\n \"sheet\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.getoneprofile.ai/table-imports/{import_id}/")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"sheet\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getoneprofile.ai/table-imports/{import_id}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"sheet\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"columns": [
{
"distribution": {
"distinct_count": 123,
"empty_count": 123,
"other_count": 123,
"total_count": 123,
"values": [
{
"count": 123,
"percentage": 123,
"value": "<string>"
}
]
},
"inferred_type": "text",
"name": "<string>",
"sample_values": [
"<string>"
],
"source_index": 123
}
],
"estimated_row_count": 123,
"import_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"importable_row_count": 123,
"row_limit": 123,
"sample_rows": [
[
"<string>"
]
],
"warnings": [
"<string>"
],
"selected_sheet": "<string>",
"sheet_names": [
"<string>"
]
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>",
"issues": [
{
"input": "<string>",
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Body
Response
Successful Response
What an upload returns: a mapping to review, and enough of the file to judge it.
Nothing is created yet: no table, no columns, no rows. Edit the mapping and POST it to the commit endpoint to actually build the table.
When importable_row_count is below estimated_row_count the file is
longer than the plan allows and the import will take its first
importable_row_count rows. Say so before the user commits: the two numbers
are here as numbers, rather than as a sentence in warnings, because the
client puts its upgrade control beside them.
Was this page helpful?