Read rows of a file attached to an AI Assistant message
curl --request GET \
--url https://api.getoneprofile.ai/chat-attachments/{attachment_id}/rows/ \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.getoneprofile.ai/chat-attachments/{attachment_id}/rows/"
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/', 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/",
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/"
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/")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getoneprofile.ai/chat-attachments/{attachment_id}/rows/")
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{
"attachment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"columns": [
"<string>"
],
"filename": "<string>",
"offset": 123,
"row_count": 123,
"rows": [
[
"<string>"
]
]
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>",
"issues": [
{
"input": "<string>",
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}assistant
Read rows of a file attached to an AI Assistant message
Read one page of a file’s rows as text, one cell per column, together with the file’s column names and its whole row count. offset is the first row wanted, counted from zero under the header, and limit is how many to read; page through a file bigger than one page by moving offset. Only your own files: a file someone else attached is not found.
GET
/
chat-attachments
/
{attachment_id}
/
rows
/
Read rows of a file attached to an AI Assistant message
curl --request GET \
--url https://api.getoneprofile.ai/chat-attachments/{attachment_id}/rows/ \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.getoneprofile.ai/chat-attachments/{attachment_id}/rows/"
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/', 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/",
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/"
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/")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getoneprofile.ai/chat-attachments/{attachment_id}/rows/")
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{
"attachment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"columns": [
"<string>"
],
"filename": "<string>",
"offset": 123,
"row_count": 123,
"rows": [
[
"<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
APIKeyHeaderHTTPBearer
Path Parameters
Query Parameters
The first row wanted, counted from zero under the header.
Required range:
x >= 0How many rows to read, at most 200.
Required range:
1 <= x <= 200Response
Successful Response
One page of a file's rows.
rows are rows of text, one cell per column of columns, cells
clipped to what a page keeps. offset is where the page starts,
counted from zero under the header, and row_count is the whole file's,
so a reader knows how many pages are left.
Was this page helpful?