curl --request GET \
--url https://api.platform.infino.ws/v1/table_card/{database} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.platform.infino.ws/v1/table_card/{database}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.platform.infino.ws/v1/table_card/{database}', 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.platform.infino.ws/v1/table_card/{database}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.platform.infino.ws/v1/table_card/{database}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.platform.infino.ws/v1/table_card/{database}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.platform.infino.ws/v1/table_card/{database}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"card": {
"table": "issues",
"rows": 1250,
"schema": [
{
"name": "id",
"type": "Int64",
"index": "scalar",
"count": 1250,
"min": "1",
"max": "1250",
"distinct": 1250
},
{
"name": "status",
"type": "Utf8",
"index": "scalar",
"count": 1250,
"distinct": 3,
"top_values": [
"open",
"closed",
"triaged"
]
},
{
"name": "title",
"type": "Utf8",
"index": "fts",
"count": 1250,
"max_chars": 140
}
],
"text_column": "title",
"sample_rows": [
{
"id": 1,
"status": "open"
}
]
},
"tier": "lean",
"built_ms": 1772445600000,
"storage_bytes": 482113,
"sketched": true,
"card_version": 7,
"logical_bytes": 391000
}Read a table card
A card is the table’s schema with index roles, per-column statistics and
sample rows, computed by the service shortly after the table changes. It
says nothing about the table’s keys to other tables: those are the
join_keys route’s to return. One route, two answers: table reads one
table’s card, tables renders several tables’ cards as prompt text.
For example, GET /v1/table_card/support?table=issues&tier=enriched
reads one card, and
GET /v1/table_card/support?tables=issues,logs&question=which+issues+mention+a+timeout
renders two tables’ cards for a question.
Preview: this route may change between releases. It needs the agent APIs enabled on your account, and answers 403 until they are.
curl --request GET \
--url https://api.platform.infino.ws/v1/table_card/{database} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.platform.infino.ws/v1/table_card/{database}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.platform.infino.ws/v1/table_card/{database}', 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.platform.infino.ws/v1/table_card/{database}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.platform.infino.ws/v1/table_card/{database}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.platform.infino.ws/v1/table_card/{database}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.platform.infino.ws/v1/table_card/{database}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"card": {
"table": "issues",
"rows": 1250,
"schema": [
{
"name": "id",
"type": "Int64",
"index": "scalar",
"count": 1250,
"min": "1",
"max": "1250",
"distinct": 1250
},
{
"name": "status",
"type": "Utf8",
"index": "scalar",
"count": 1250,
"distinct": 3,
"top_values": [
"open",
"closed",
"triaged"
]
},
{
"name": "title",
"type": "Utf8",
"index": "fts",
"count": 1250,
"max_chars": 140
}
],
"text_column": "title",
"sample_rows": [
{
"id": 1,
"status": "open"
}
]
},
"tier": "lean",
"built_ms": 1772445600000,
"storage_bytes": 482113,
"sketched": true,
"card_version": 7,
"logical_bytes": 391000
}Authorizations
Query Parameters
What the caller is asking, in a sentence. With tables, the cards
are ranked and laid out for it. With table, the response lists the
columns the question needs first: every column is a candidate, or
only those a pattern matches (a question with no pattern reads
as pattern=*). A blank question is ignored. A ranking may call the
deployment's grading model, billed as inference.
With table: look columns up by name. A column name, matched whole;
* matches any run of characters (name*, *word*); or * alone
for every column. The matching entries come back whole, those with a
value in the most rows first, without sample rows, and matched
says how many there were in all. Must not be empty, and is refused
with whole, families or tables.
Response
One of two shapes, by query form. With table (TableCardResponse): the table's stored card of the requested tier, its schema with index roles, per-column statistics and sample rows as last computed, with when it was built, and logical_bytes, the bytes the table is billed storage on, when the deployment meters them. With whole and families the card is laid out within that budget; with pattern, it holds the entries matching it, most rows first, and matched says how many there were; with question, the entries that question needs come first. With tables (PromptCardsResponse), instead of a card: the named tables' cards rendered as text the way the sub-agent's prompt carries them (cards, vocabulary, shown, listed, missing, tier, ranked and graded), ranked for question when one is sent, or one line per table with overview, for a caller to fold into its own prompt unchanged. The x-infino-inference-nanodollars response header says what a ranking's model call was billed, 0 when no model ran.
- Option 1
- Option 2
What GET /v1/table_card/{database} answers, by query form: a table's
card with table, the rendered cards of several with tables.
The bytes the table is billed storage on: what was sent, the figure
the invoice's storage line is computed from. The card's own
storage_bytes is the footprint on storage, indexes included, and
is not what is billed. Absent when the deployment does not meter it
or has recorded nothing for the table yet.
x >= 0Was this page helpful?
