curl --request POST \
--url https://api.getoneprofile.ai/table-imports/{import_id}/sheet/ \
--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}/sheet/"
payload = { "sheet": "<string>" }
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({sheet: '<string>'})
};
fetch('https://api.getoneprofile.ai/table-imports/{import_id}/sheet/', 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}/sheet/",
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([
'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}/sheet/"
payload := strings.NewReader("{\n \"sheet\": \"<string>\"\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}/sheet/")
.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}/sheet/")
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 \"sheet\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"columns": [
{
"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 POST \
--url https://api.getoneprofile.ai/table-imports/{import_id}/sheet/ \
--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}/sheet/"
payload = { "sheet": "<string>" }
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({sheet: '<string>'})
};
fetch('https://api.getoneprofile.ai/table-imports/{import_id}/sheet/', 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}/sheet/",
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([
'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}/sheet/"
payload := strings.NewReader("{\n \"sheet\": \"<string>\"\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}/sheet/")
.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}/sheet/")
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 \"sheet\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"columns": [
{
"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>"
}Authorizations
Path Parameters
Body
Which sheet of an already-uploaded workbook to read instead.
A sheet name from the preview's sheet_names.
1 - 255Response
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.
The inferred mapping.
Show child attributes
Show child attributes
Data rows in the file, excluding the header.
Identifies this upload through commit and polling.
How many of those rows the import will write, once the cap is applied.
Rows one table may hold on this organisation's plan.
Raw sampled rows, in file order.
Non-fatal things the user should see.
Which sheet these columns were read from. Null for a CSV. POST it to the sheet endpoint to re-read the same upload from a different one.
Every sheet the uploaded workbook offers, in tab order. Empty for a CSV, which has no sheets — that is what says not to offer a sheet picker.
Was this page helpful?