curl --request GET \
--url https://api.getoneprofile.ai/chat-attachments/{attachment_id}/rows/length/ \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.getoneprofile.ai/chat-attachments/{attachment_id}/rows/length/"
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}/rows/length/', 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}/rows/length/",
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}/rows/length/"
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}/rows/length/")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getoneprofile.ai/chat-attachments/{attachment_id}/rows/length/")
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{
"columns": [
"<string>"
],
"comment_notes": [
"<string>"
],
"count": 123,
"header_is_title": true,
"notes": [
"<string>"
],
"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>"
}Count the rows of a file attached to an AI Assistant message
Count a file’s rows, read as a page of its rows reads them, with what a reader needs beside them: the sheet’s column names, the sheet read and the workbook’s other sheets, whether the first row is only a title over the column names, and what reading the sheet had to do. The cell comments on no data row are read through GET …/comments/. For a workbook, sheet counts another sheet. A PDF’s rows are the table its pages hold, read off its pages the first time any are asked for. Only your own files.
curl --request GET \
--url https://api.getoneprofile.ai/chat-attachments/{attachment_id}/rows/length/ \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.getoneprofile.ai/chat-attachments/{attachment_id}/rows/length/"
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}/rows/length/', 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}/rows/length/",
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}/rows/length/"
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}/rows/length/")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getoneprofile.ai/chat-attachments/{attachment_id}/rows/length/")
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{
"columns": [
"<string>"
],
"comment_notes": [
"<string>"
],
"count": 123,
"header_is_title": true,
"notes": [
"<string>"
],
"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
Query Parameters
A workbook sheet by name, matched without case when no sheet has exactly that name; omit for the attached sheet.
1 - 255Response
Successful Response
How many rows a file's sheet has, with what the sheet says about itself.
The count of the rows GET …/rows/ pages through, read the same way, and
what a reader needs to read those rows: their column names, the sheet they
come from and the workbook's others, whether the header is only a title,
and what reading the sheet had to do. The comments on no data row are a
list of their own, GET …/comments/: a count holds values, never
records.
The header row's names for the sheet read, one per cell of each row.
Why some of the sheet's cell comments could not be read: true of the rows whose comments_unread is true.
Data rows in the whole sheet read.
Whether the first row is a one-cell title over a wider table, so the column names, if any, are in one of the rows below; the import and the column read take that row's number as header_row.
Sentences about what reading the sheet had to do.
The workbook sheet read; null for a CSV or a PDF.
Every visible sheet of the workbook, in tab order; empty for a CSV or a PDF.
Was this page helpful?