curl --request POST \
--url https://api.platform.infino.ws/v1/graph_expand/{database} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"table_name": "issues",
"rows": [
{
"_id": "1048",
"title": "Checkout fails when the cart is empty"
}
],
"query": "checkout empty cart"
}
'import requests
url = "https://api.platform.infino.ws/v1/graph_expand/{database}"
payload = {
"table_name": "issues",
"rows": [
{
"_id": "1048",
"title": "Checkout fails when the cart is empty"
}
],
"query": "checkout empty cart"
}
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({
table_name: 'issues',
rows: [{_id: '1048', title: 'Checkout fails when the cart is empty'}],
query: 'checkout empty cart'
})
};
fetch('https://api.platform.infino.ws/v1/graph_expand/{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/graph_expand/{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([
'table_name' => 'issues',
'rows' => [
[
'_id' => '1048',
'title' => 'Checkout fails when the cart is empty'
]
],
'query' => 'checkout empty cart'
]),
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/graph_expand/{database}"
payload := strings.NewReader("{\n \"table_name\": \"issues\",\n \"rows\": [\n {\n \"_id\": \"1048\",\n \"title\": \"Checkout fails when the cart is empty\"\n }\n ],\n \"query\": \"checkout empty cart\"\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/graph_expand/{database}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"table_name\": \"issues\",\n \"rows\": [\n {\n \"_id\": \"1048\",\n \"title\": \"Checkout fails when the cart is empty\"\n }\n ],\n \"query\": \"checkout empty cart\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.platform.infino.ws/v1/graph_expand/{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 \"table_name\": \"issues\",\n \"rows\": [\n {\n \"_id\": \"1048\",\n \"title\": \"Checkout fails when the cart is empty\"\n }\n ],\n \"query\": \"checkout empty cart\"\n}"
response = http.request(request)
puts response.read_body{
"seeds": 1,
"connected": [
{
"table": "code",
"rows": [
{
"path": "src/checkout/cart.rs",
"start_line": 88,
"content": "pub fn checkout(cart: &Cart) -> Result<Order, CheckoutError> {",
"relation": "defines checkout"
}
]
}
],
"facts": [
{
"subject": "checkout",
"relation": "rejects",
"object": "an empty cart",
"table": "issues",
"via": "row"
}
]
}Expand rows through the graph
A caller hands over the rows a search or a statement returned, named by the table they came from, and gets back the rows of every other table those rows point at, with the facts the graph holds for them.
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/graph_expand/{database} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"table_name": "issues",
"rows": [
{
"_id": "1048",
"title": "Checkout fails when the cart is empty"
}
],
"query": "checkout empty cart"
}
'import requests
url = "https://api.platform.infino.ws/v1/graph_expand/{database}"
payload = {
"table_name": "issues",
"rows": [
{
"_id": "1048",
"title": "Checkout fails when the cart is empty"
}
],
"query": "checkout empty cart"
}
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({
table_name: 'issues',
rows: [{_id: '1048', title: 'Checkout fails when the cart is empty'}],
query: 'checkout empty cart'
})
};
fetch('https://api.platform.infino.ws/v1/graph_expand/{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/graph_expand/{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([
'table_name' => 'issues',
'rows' => [
[
'_id' => '1048',
'title' => 'Checkout fails when the cart is empty'
]
],
'query' => 'checkout empty cart'
]),
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/graph_expand/{database}"
payload := strings.NewReader("{\n \"table_name\": \"issues\",\n \"rows\": [\n {\n \"_id\": \"1048\",\n \"title\": \"Checkout fails when the cart is empty\"\n }\n ],\n \"query\": \"checkout empty cart\"\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/graph_expand/{database}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"table_name\": \"issues\",\n \"rows\": [\n {\n \"_id\": \"1048\",\n \"title\": \"Checkout fails when the cart is empty\"\n }\n ],\n \"query\": \"checkout empty cart\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.platform.infino.ws/v1/graph_expand/{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 \"table_name\": \"issues\",\n \"rows\": [\n {\n \"_id\": \"1048\",\n \"title\": \"Checkout fails when the cart is empty\"\n }\n ],\n \"query\": \"checkout empty cart\"\n}"
response = http.request(request)
puts response.read_body{
"seeds": 1,
"connected": [
{
"table": "code",
"rows": [
{
"path": "src/checkout/cart.rs",
"start_line": 88,
"content": "pub fn checkout(cart: &Cart) -> Result<Order, CheckoutError> {",
"relation": "defines checkout"
}
]
}
],
"facts": [
{
"subject": "checkout",
"relation": "rejects",
"object": "an empty cart",
"table": "issues",
"via": "row"
}
]
}Authorizations
Body
POST /v1/graph_expand/{database}: the rows a retrieval returned, to be
expanded to the rows of other tables they point at. An unknown field is
refused.
The rows a search or a statement returned, each a JSON object of
column name to cell value, 200 at most (the walk seeds from the
first twenty). A row carrying _id seeds by it; one carrying the
table's key columns, or a path and a start line, is looked up; any
other seeds nothing.
Response
The rows of every other table the given rows point at, by table, strongest first: the rows a verified join reaches from their key values, the definitions of the names a code row uses (relation: defines <name>, first), and the rows the service read as mentioning the same entities. Each row carries the table's placing columns and its text cut short. seeds is how many of the given rows seeded the walk; note says why nothing was reached when nothing was.
The answer: the tables reached and their rows, the facts the graph holds for them, how many of the given rows seeded the walk, and a note when nothing was reached and why.
Was this page helpful?
