API
Baca record
Tampilkan record per halaman, atau ambil satu record lewat ID.
Contoh memakai koleksi deals dengan field title, stage, dan amount. Ganti ID dengan milikmu dari Workspace dan koleksi.
Daftar record
GET /api/v1/workspaces/:workspace/collections/:collection/records
limit menentukan ukuran halaman (default 50) dan offset melewati sejumlah baris. Tambahkan query untuk mengurutkan, memfilter, atau mencari.
curl --get 'http://127.0.0.1:8080/api/v1/workspaces/YOUR_WORKSPACE_ID/collections/YOUR_COLLECTION_ID/records' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
--data-urlencode 'limit=20' \
--data-urlencode 'offset=0' const base = `http://127.0.0.1:8080/api/v1/workspaces/${workspaceId}/collections/${collectionId}`;
const res = await fetch(`${base}/records?limit=20&offset=0`, {
headers: { Authorization: `Bearer ${token}` }
});
const { data: records, meta } = await res.json(); base := "http://127.0.0.1:8080/api/v1/workspaces/" + workspaceID + "/collections/" + collectionID
req, _ := http.NewRequest("GET", base+"/records?limit=20&offset=0", nil)
req.Header.Set("Authorization", "Bearer "+token)
res, err := http.DefaultClient.Do(req) base = f"http://127.0.0.1:8080/api/v1/workspaces/{workspace_id}/collections/{collection_id}"
res = requests.get(
f"{base}/records",
headers={"Authorization": f"Bearer {token}"},
params={"limit": 20, "offset": 0},
)
records = res.json()["data"] Respons:
{
"data": [
{
"id": "adb696e5c90257c2c313d635f892a776",
"title": "Warehouse analytics",
"stage": "Lead",
"amount": 7300000,
"created_at": "2026-10-23T07:04:27.858424Z",
"updated_at": "2026-10-23T07:04:27.858424Z"
}
],
"meta": {
"request_id": "...",
"response_time": 1.8,
"pagination": { "limit": 20, "offset": 0, "count": 1, "has_more": false }
}
} has_more memberi tahu apakah kamu perlu mengambil halaman berikutnya dengan offset yang lebih besar. Setiap record punya id, created_at, dan updated_at.
Ambil satu record
GET /api/v1/workspaces/:workspace/collections/:collection/records/:record
curl 'http://127.0.0.1:8080/api/v1/workspaces/YOUR_WORKSPACE_ID/collections/YOUR_COLLECTION_ID/records/YOUR_RECORD_ID' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' const res = await fetch(`${base}/records/${recordId}`, {
headers: { Authorization: `Bearer ${token}` }
});
const { data: record } = await res.json();
const etag = res.headers.get('ETag'); req, _ := http.NewRequest("GET", base+"/records/"+recordID, nil)
req.Header.Set("Authorization", "Bearer "+token)
res, err := http.DefaultClient.Do(req)
etag := res.Header.Get("ETag") res = requests.get(f"{base}/records/{record_id}", headers={"Authorization": f"Bearer {token}"})
record = res.json()["data"]
etag = res.headers["ETag"] Respons berisi record di data dan header ETag. Kirim nilai itu sebagai If-Match saat update, supaya kamu tidak menimpa perubahan orang lain.
Record yang tidak ada, atau yang tidak boleh kamu baca, menghasilkan 404 not_found.