curl --request POST \
--url https://api.getoneprofile.ai/tables/{table_id}/rows/query/ \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"column_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"cursor": "<string>",
"limit": 10,
"offset": 1,
"record_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"sorts": [
{
"column_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"direction": "asc"
}
],
"where": {
"items": [
{
"column_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"path": "<string>",
"type": "condition",
"value": "<string>"
}
],
"joiner": "and",
"unique_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"within": "<unknown>"
}
}
'import requests
url = "https://api.getoneprofile.ai/tables/{table_id}/rows/query/"
payload = {
"column_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"cursor": "<string>",
"limit": 10,
"offset": 1,
"record_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"sorts": [
{
"column_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"direction": "asc"
}
],
"where": {
"items": [
{
"column_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"path": "<string>",
"type": "condition",
"value": "<string>"
}
],
"joiner": "and",
"unique_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"within": "<unknown>"
}
}
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({
column_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
cursor: '<string>',
limit: 10,
offset: 1,
record_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
sorts: [{column_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a', direction: 'asc'}],
where: {
items: [
{
column_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
path: '<string>',
type: 'condition',
value: '<string>'
}
],
joiner: 'and',
unique_by: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
within: '<unknown>'
}
})
};
fetch('https://api.getoneprofile.ai/tables/{table_id}/rows/query/', 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/tables/{table_id}/rows/query/",
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([
'column_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'cursor' => '<string>',
'limit' => 10,
'offset' => 1,
'record_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'sorts' => [
[
'column_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'direction' => 'asc'
]
],
'where' => [
'items' => [
[
'column_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'path' => '<string>',
'type' => 'condition',
'value' => '<string>'
]
],
'joiner' => 'and',
'unique_by' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'within' => '<unknown>'
]
]),
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/tables/{table_id}/rows/query/"
payload := strings.NewReader("{\n \"column_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"cursor\": \"<string>\",\n \"limit\": 10,\n \"offset\": 1,\n \"record_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"sorts\": [\n {\n \"column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"direction\": \"asc\"\n }\n ],\n \"where\": {\n \"items\": [\n {\n \"column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"path\": \"<string>\",\n \"type\": \"condition\",\n \"value\": \"<string>\"\n }\n ],\n \"joiner\": \"and\",\n \"unique_by\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"within\": \"<unknown>\"\n }\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/tables/{table_id}/rows/query/")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"column_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"cursor\": \"<string>\",\n \"limit\": 10,\n \"offset\": 1,\n \"record_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"sorts\": [\n {\n \"column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"direction\": \"asc\"\n }\n ],\n \"where\": {\n \"items\": [\n {\n \"column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"path\": \"<string>\",\n \"type\": \"condition\",\n \"value\": \"<string>\"\n }\n ],\n \"joiner\": \"and\",\n \"unique_by\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"within\": \"<unknown>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getoneprofile.ai/tables/{table_id}/rows/query/")
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 \"column_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"cursor\": \"<string>\",\n \"limit\": 10,\n \"offset\": 1,\n \"record_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"sorts\": [\n {\n \"column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"direction\": \"asc\"\n }\n ],\n \"where\": {\n \"items\": [\n {\n \"column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"path\": \"<string>\",\n \"type\": \"condition\",\n \"value\": \"<string>\"\n }\n ],\n \"joiner\": \"and\",\n \"unique_by\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"within\": \"<unknown>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"cells": {},
"created_at": "2023-11-07T05:31:56Z",
"record_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"next_page_cursor": "<string>",
"previous_page_cursor": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>",
"issues": [
{
"input": "<string>",
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Query table rows
List a table’s rows with keyset pagination on an opaque cursor. Without a sort, rows come in DISPLAY order: the user-controlled row position, with the time-ordered record ID as a tiebreak. With one, they come in that column’s value order, and rows with no value for it sort LAST in both directions. Filters are predicates on cell values and compose with either order.
column_ids projects each row’s cells: send the columns the grid will render and the response carries only those. A column outside the projection reads as ‘not fetched’ rather than ‘blank’.
A POST because a filter list has no honest query-string encoding. Each cell’s computing flag is derived: stale AND an active run covers that row.
Performance note: an unfiltered sort streams the column’s index. Add a filter and Postgres sorts the matched set instead, so a filter that matches most of a very large table is correspondingly slower.
curl --request POST \
--url https://api.getoneprofile.ai/tables/{table_id}/rows/query/ \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"column_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"cursor": "<string>",
"limit": 10,
"offset": 1,
"record_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"sorts": [
{
"column_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"direction": "asc"
}
],
"where": {
"items": [
{
"column_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"path": "<string>",
"type": "condition",
"value": "<string>"
}
],
"joiner": "and",
"unique_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"within": "<unknown>"
}
}
'import requests
url = "https://api.getoneprofile.ai/tables/{table_id}/rows/query/"
payload = {
"column_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"cursor": "<string>",
"limit": 10,
"offset": 1,
"record_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"sorts": [
{
"column_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"direction": "asc"
}
],
"where": {
"items": [
{
"column_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"path": "<string>",
"type": "condition",
"value": "<string>"
}
],
"joiner": "and",
"unique_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"within": "<unknown>"
}
}
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({
column_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
cursor: '<string>',
limit: 10,
offset: 1,
record_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
sorts: [{column_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a', direction: 'asc'}],
where: {
items: [
{
column_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
path: '<string>',
type: 'condition',
value: '<string>'
}
],
joiner: 'and',
unique_by: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
within: '<unknown>'
}
})
};
fetch('https://api.getoneprofile.ai/tables/{table_id}/rows/query/', 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/tables/{table_id}/rows/query/",
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([
'column_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'cursor' => '<string>',
'limit' => 10,
'offset' => 1,
'record_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'sorts' => [
[
'column_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'direction' => 'asc'
]
],
'where' => [
'items' => [
[
'column_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'path' => '<string>',
'type' => 'condition',
'value' => '<string>'
]
],
'joiner' => 'and',
'unique_by' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'within' => '<unknown>'
]
]),
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/tables/{table_id}/rows/query/"
payload := strings.NewReader("{\n \"column_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"cursor\": \"<string>\",\n \"limit\": 10,\n \"offset\": 1,\n \"record_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"sorts\": [\n {\n \"column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"direction\": \"asc\"\n }\n ],\n \"where\": {\n \"items\": [\n {\n \"column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"path\": \"<string>\",\n \"type\": \"condition\",\n \"value\": \"<string>\"\n }\n ],\n \"joiner\": \"and\",\n \"unique_by\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"within\": \"<unknown>\"\n }\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/tables/{table_id}/rows/query/")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"column_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"cursor\": \"<string>\",\n \"limit\": 10,\n \"offset\": 1,\n \"record_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"sorts\": [\n {\n \"column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"direction\": \"asc\"\n }\n ],\n \"where\": {\n \"items\": [\n {\n \"column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"path\": \"<string>\",\n \"type\": \"condition\",\n \"value\": \"<string>\"\n }\n ],\n \"joiner\": \"and\",\n \"unique_by\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"within\": \"<unknown>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getoneprofile.ai/tables/{table_id}/rows/query/")
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 \"column_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"cursor\": \"<string>\",\n \"limit\": 10,\n \"offset\": 1,\n \"record_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"sorts\": [\n {\n \"column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"direction\": \"asc\"\n }\n ],\n \"where\": {\n \"items\": [\n {\n \"column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"path\": \"<string>\",\n \"type\": \"condition\",\n \"value\": \"<string>\"\n }\n ],\n \"joiner\": \"and\",\n \"unique_by\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"within\": \"<unknown>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"cells": {},
"created_at": "2023-11-07T05:31:56Z",
"record_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"next_page_cursor": "<string>",
"previous_page_cursor": "<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
Request body for the rows query.
A POST rather than a GET because a filter list has no honest query-string
encoding. column_ids is the projection: send the columns the grid will
actually render and the response carries only those cells.
Start the listing this many rows in, rather than at the top: a jump-to-row seek. Mutually exclusive with cursor, which resumes a listing rather than starting one. Postgres walks the skipped rows, so use this for a deliberate jump. Keep paging with next_page_cursor.
x >= 0Hydrate exactly these rows, instead of describing a listing. Mutually exclusive with sorts, where, row_status, offset and cursor: those select rows, and this names them. Pair with /rows/ids/ to fetch an ordering once and then fill in row contents a window at a time, which lets re-sorting or re-filtering reuse cells the client already holds.
1000Restrict to rows whose CELLS are in a given state: errored (any cell failed to compute) or fully_computed (none did). ANDed with where. This is a question about computation, which the filter operators (each of which tests only one column's value) cannot ask.
errored, fully_computed Response
Successful Response
Was this page helpful?