curl --request GET \
--url https://api.getoneprofile.ai/chat-attachments/{attachment_id}/columns/{source_index}/distribution/ \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.getoneprofile.ai/chat-attachments/{attachment_id}/columns/{source_index}/distribution/"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.getoneprofile.ai/chat-attachments/{attachment_id}/columns/{source_index}/distribution/', 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/chat-attachments/{attachment_id}/columns/{source_index}/distribution/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.getoneprofile.ai/chat-attachments/{attachment_id}/columns/{source_index}/distribution/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.getoneprofile.ai/chat-attachments/{attachment_id}/columns/{source_index}/distribution/")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getoneprofile.ai/chat-attachments/{attachment_id}/columns/{source_index}/distribution/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"distinct_count": 123,
"empty_count": 123,
"name": "<string>",
"other_count": 123,
"total_count": 123,
"values": [
{
"count": 123,
"percentage": 123,
"value": "<string>"
}
]
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>",
"issues": [
{
"input": "<string>",
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Read an attached file column's value distribution
Count one column of your attached CSV or XLSX file, or of the table a PDF you attached holds. Counts cover every nonblank data row in its sheet, with the top 20 values, percentages of all rows, empty and distinct counts, other_count and the column’s name. source_index is zero-based, counted as a page of the file’s rows shows its columns; sheet reads another workbook sheet, and header_row names the row holding the column names under a title. The raw values are read a page at a time from the column’s values.
curl --request GET \
--url https://api.getoneprofile.ai/chat-attachments/{attachment_id}/columns/{source_index}/distribution/ \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.getoneprofile.ai/chat-attachments/{attachment_id}/columns/{source_index}/distribution/"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.getoneprofile.ai/chat-attachments/{attachment_id}/columns/{source_index}/distribution/', 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/chat-attachments/{attachment_id}/columns/{source_index}/distribution/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.getoneprofile.ai/chat-attachments/{attachment_id}/columns/{source_index}/distribution/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.getoneprofile.ai/chat-attachments/{attachment_id}/columns/{source_index}/distribution/")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getoneprofile.ai/chat-attachments/{attachment_id}/columns/{source_index}/distribution/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"distinct_count": 123,
"empty_count": 123,
"name": "<string>",
"other_count": 123,
"total_count": 123,
"values": [
{
"count": 123,
"percentage": 123,
"value": "<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
Query Parameters
A workbook sheet by name, matched without case when no sheet has exactly that name; omit for the attached sheet.
1 - 255The row holding the column names under a title, numbered as a page of the file's rows numbers them; the column is named from it and counted over the rows below. 0 keeps the first row.
x >= 0Response
Successful Response
How one column of a file's values are spread across its rows: a chart, computed on read.
Counts cover every data row of the file's selected sheet (or a CSV), before any import
row cap. Whitespace-only cells are empty; nonempty values are counted as the file spells
them, uncoerced. The raw values themselves are a page of their own, at
…/columns/{source_index}/values/.
Distinct nonempty values.
Rows whose cell is empty or whitespace-only.
The column's name, from the header row.
Nonempty rows holding a value outside values.
Every data row of the sheet, empty cells included.
The 20 most common values, most common first, ties in file order.
Show child attributes
Show child attributes
Was this page helpful?