Fetch Rows
curl --request GET \
--url https://api.sublay.io/v7/:projectId/db/:tableName \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sublay.io/v7/:projectId/db/:tableName"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sublay.io/v7/:projectId/db/:tableName', 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.sublay.io/v7/:projectId/db/:tableName",
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.sublay.io/v7/:projectId/db/:tableName"
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.sublay.io/v7/:projectId/db/:tableName")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sublay.io/v7/:projectId/db/:tableName")
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{
"data": [
{}
],
"pagination": {
"page": 123,
"pageSize": 123,
"totalPages": 123,
"totalItems": 123,
"hasMore": true
}
}Custom Tables — Rows
Fetch Rows
Query rows from a custom table with filters, sorting and pagination
Fetch Rows
curl --request GET \
--url https://api.sublay.io/v7/:projectId/db/:tableName \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sublay.io/v7/:projectId/db/:tableName"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sublay.io/v7/:projectId/db/:tableName', 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.sublay.io/v7/:projectId/db/:tableName",
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.sublay.io/v7/:projectId/db/:tableName"
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.sublay.io/v7/:projectId/db/:tableName")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sublay.io/v7/:projectId/db/:tableName")
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{
"data": [
{}
],
"pagination": {
"page": 123,
"pageSize": 123,
"totalPages": 123,
"totalItems": 123,
"hasMore": true
}
}Returns a paginated page of rows from a custom table.
Row endpoints capture the caller’s identity but enforce no authorization — any caller who can reach your project can read these rows. See Security: open row CRUD.
tableName is the logical name. The server applies the custom_ prefix itself, so pass orders, not custom_orders. Only custom tables are reachable here — a built-in or bundle table returns database/table-not-found, so the existence of built-in tables is never revealed through this surface.Path Parameters
string
required
Logical name of the custom table. Must match
^[a-zA-Z_][a-zA-Z0-9_]{0,62}$.Query Parameters
number
1-indexed page number. Defaults to
1.number
Rows per page. Defaults to
50. Maximum 200.string
Column to sort by. Must be a real column on the table, or the request fails with
database/invalid-sort-column.string
asc or desc.string
"true" to include soft-deleted rows on a paranoid table. Defaults to "false".string
A JSON-encoded array of filter clauses, URL-encoded. Maximum 50 clauses, all AND-combined.Each clause is
The value, before encoding:And the same request ready to run — the JSON must be percent-encoded, so let your HTTP client do it rather than pasting raw braces into a URL:A column that does not exist on the table fails with
{ "column": string, "operator": string, "value": unknown }.Show Operators and their value shapes
Show Operators and their value shapes
[{ "column": "status", "operator": "eq", "value": "open" }]
curl -G "https://api.sublay.io/v7/$PROJECT_ID/db/orders" \
--data-urlencode 'filters=[{"column":"status","operator":"eq","value":"open"}]'
database/invalid-filter-column.Response
object[]
The page of rows. Each row is a free-form column map, including the managed columns (
id, and createdAt / updatedAt / deletedAt where the table has them).object
Error Responses
Invalid Parameters — 400
Invalid Parameters — 400
{ "error": "Bad Request", "code": "database/invalid-params" }
Invalid Query — 400
Invalid Query — 400
Malformed
filters JSON, an unknown operator, a value of the wrong shape for its operator, or an out-of-range page / limit.{ "error": "Bad Request", "code": "database/invalid-query" }
Invalid Filter Column — 400
Invalid Filter Column — 400
{
"error": "Bad Request",
"code": "database/invalid-filter-column",
"column": "<column name>"
}
Invalid Sort Column — 400
Invalid Sort Column — 400
{ "error": "Bad Request", "code": "database/invalid-sort-column" }
Table Not Found — 404
Table Not Found — 404
Also returned for a built-in or bundle table, which this surface never exposes.
{ "error": "Not Found", "code": "database/table-not-found" }
Server Error — 500
Server Error — 500
{ "error": "Internal Server Error", "code": "database/server-error" }

