curl --request POST \
--url https://api.platform.infino.ws/v1/join_keys/{database} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"tables": [
"logs",
"issues"
]
}
'import requests
url = "https://api.platform.infino.ws/v1/join_keys/{database}"
payload = { "tables": ["logs", "issues"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({tables: ['logs', 'issues']})
};
fetch('https://api.platform.infino.ws/v1/join_keys/{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/join_keys/{database}",
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([
'tables' => [
'logs',
'issues'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.platform.infino.ws/v1/join_keys/{database}"
payload := strings.NewReader("{\n \"tables\": [\n \"logs\",\n \"issues\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.platform.infino.ws/v1/join_keys/{database}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"tables\": [\n \"logs\",\n \"issues\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.platform.infino.ws/v1/join_keys/{database}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"tables\": [\n \"logs\",\n \"issues\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"joins": [
{
"from_table": "logs",
"from_column": "instance_id",
"to_table": "issues",
"to_column": "instance_id",
"predicate": "logs.instance_id = issues.instance_id",
"inclusion": 0.98,
"coverage": 0.41,
"verified": true
}
],
"pairs": 1,
"counted": 1,
"model_tokens": 1840
}Find join keys
For a caller about to write a JOIN: name the tables and get every join
among them as a predicate ready to paste into ON, measured on the data
rather than guessed from column names.
Preview: this route may change between releases. It needs the agent APIs enabled on your account, and answers 403 until they are.
curl --request POST \
--url https://api.platform.infino.ws/v1/join_keys/{database} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"tables": [
"logs",
"issues"
]
}
'import requests
url = "https://api.platform.infino.ws/v1/join_keys/{database}"
payload = { "tables": ["logs", "issues"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({tables: ['logs', 'issues']})
};
fetch('https://api.platform.infino.ws/v1/join_keys/{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/join_keys/{database}",
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([
'tables' => [
'logs',
'issues'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.platform.infino.ws/v1/join_keys/{database}"
payload := strings.NewReader("{\n \"tables\": [\n \"logs\",\n \"issues\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.platform.infino.ws/v1/join_keys/{database}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"tables\": [\n \"logs\",\n \"issues\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.platform.infino.ws/v1/join_keys/{database}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"tables\": [\n \"logs\",\n \"issues\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"joins": [
{
"from_table": "logs",
"from_column": "instance_id",
"to_table": "issues",
"to_column": "instance_id",
"predicate": "logs.instance_id = issues.instance_id",
"inclusion": 0.98,
"coverage": 0.41,
"verified": true
}
],
"pairs": 1,
"counted": 1,
"model_tokens": 1840
}Authorizations
Body
Response
Every join among the named tables, each as the two sides and the ON clause to write (logs.instance_id = issues.instance_id, split_part(code.path, '/', 1) = issues.project), with the share of the referencing side's values found on the other side and whether a statement counted it. The first call over a pair counts its joins on the data (the estimates from samples of the tables' values, and the joins the deployment's model proposes from the two cards, each measured by a statement) and records the verdict; later calls over the pair read it back while both tables stand as they were counted. pairs is the pairs the tables make, counted how many this call measured, model_tokens the tokens the proposing model used, the count this call's inference was billed on. What the inference was billed is in the x-infino-inference-nanodollars response header, 0 when no model ran.
The keys among the named tables.
Was this page helpful?
