curl --request POST \
--url https://api.platform.infino.ws/v1/update/{database} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"data": [
{}
]
}
'import requests
url = "https://api.platform.infino.ws/v1/update/{database}"
payload = { "data": [{}] }
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({data: [{}]})
};
fetch('https://api.platform.infino.ws/v1/update/{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/update/{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([
'data' => [
[
]
]
]),
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/update/{database}"
payload := strings.NewReader("{\n \"data\": [\n {}\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/update/{database}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"data\": [\n {}\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.platform.infino.ws/v1/update/{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 \"data\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_bodyUpdate rows
Replace rows matching a predicate. table and predicate are query parameters; the body carries the replacement rows (Arrow IPC or JSON), which add and are checked against the table’s columns exactly as an append’s are.
curl --request POST \
--url https://api.platform.infino.ws/v1/update/{database} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"data": [
{}
]
}
'import requests
url = "https://api.platform.infino.ws/v1/update/{database}"
payload = { "data": [{}] }
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({data: [{}]})
};
fetch('https://api.platform.infino.ws/v1/update/{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/update/{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([
'data' => [
[
]
]
]),
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/update/{database}"
payload := strings.NewReader("{\n \"data\": [\n {}\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/update/{database}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"data\": [\n {}\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.platform.infino.ws/v1/update/{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 \"data\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Target database.
Body
The replacement rows, 1:1 with the rows the predicate matches: a JSON {"data": [...]} envelope of rows keyed by column name (application/json), or an Arrow IPC stream of one record batch (application/vnd.apache.arrow.stream).
JSON row envelope for POST /v1/append/{database} and
POST /v1/update/{database} — the Content-Type: application/json
alternative to an Arrow IPC stream body. Rows are JSON objects keyed by
column name, converted server-side into one Arrow batch against the
table's schema.
A key the table has no column for adds one, typed from the values in the request and nullable, so earlier rows read back null for it. That is the table's behaviour and not this encoding's: an Arrow batch carrying a column the table lacks adds it on the same terms. What is specific to JSON is how a row is read — a nested object flattens to dot-path columns, an array becomes a list column, and the column's type is inferred from the values rather than stated by the caller.
A value whose type disagrees with a column the table already has is a 400,
naming the column, the type it holds and the one offered; the write lands
no rows. Growing past the table's max_fields is a 400 too. Neither is
retryable as sent: change the value, or change the column with a schema
patch first. Appending never creates a table — an unknown table name is a
404.
Rows as JSON objects keyed by column name.
Response
Row counts as JSON {matched, n_tombstoned, n_not_found}. Body is the replacement rows as an Arrow IPC stream.
Was this page helpful?
