Query Records
curl --request GET \
--url https://api.example.com/api/database/records/{tableName} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/api/database/records/{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.example.com/api/database/records/{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.example.com/api/database/records/{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.example.com/api/database/records/{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.example.com/api/database/records/{tableName}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/database/records/{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[
{
"id": "248373e1-0aea-45ce-8844-5ef259203749",
"title": "Getting Started with InsForge",
"content": "This is a guide to help you get started...",
"createdAt": "2025-07-18T05:37:24.338Z",
"updatedAt": "2025-07-18T05:37:24.338Z"
},
{
"id": "348373e1-0aea-45ce-8844-5ef259203750",
"title": "Advanced Database Queries",
"content": "Learn how to write complex queries...",
"createdAt": "2025-07-19T08:15:10.123Z",
"updatedAt": "2025-07-19T08:15:10.123Z"
}
]{
"error": "INVALID_QUERY",
"message": "Invalid filter syntax",
"statusCode": 400,
"nextActions": "Check PostgREST filter documentation"
}{
"error": "TABLE_NOT_FOUND",
"message": "Table 'nonexistent' does not exist",
"statusCode": 404,
"nextActions": "Check table name and try again"
}Client
Query Records
Query records from a table with filtering, sorting, and pagination
GET
/
api
/
database
/
records
/
{tableName}
Query Records
curl --request GET \
--url https://api.example.com/api/database/records/{tableName} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/api/database/records/{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.example.com/api/database/records/{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.example.com/api/database/records/{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.example.com/api/database/records/{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.example.com/api/database/records/{tableName}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/database/records/{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[
{
"id": "248373e1-0aea-45ce-8844-5ef259203749",
"title": "Getting Started with InsForge",
"content": "This is a guide to help you get started...",
"createdAt": "2025-07-18T05:37:24.338Z",
"updatedAt": "2025-07-18T05:37:24.338Z"
},
{
"id": "348373e1-0aea-45ce-8844-5ef259203750",
"title": "Advanced Database Queries",
"content": "Learn how to write complex queries...",
"createdAt": "2025-07-19T08:15:10.123Z",
"updatedAt": "2025-07-19T08:15:10.123Z"
}
]{
"error": "INVALID_QUERY",
"message": "Invalid filter syntax",
"statusCode": 400,
"nextActions": "Check PostgREST filter documentation"
}{
"error": "TABLE_NOT_FOUND",
"message": "Table 'nonexistent' does not exist",
"statusCode": 404,
"nextActions": "Check table name and try again"
}Authorizations
bearerAuthapiKey
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Name of the table to query
Query Parameters
Maximum number of records to return
Required range:
1 <= x <= 1000Number of records to skip for pagination
Required range:
x >= 0Sort order (e.g., "createdAt.desc", "name.asc")
Comma-separated list of columns to return
Filter by field value (e.g., "?status=eq.active", "?age=gt.18")
Response
List of records
⌘I