v1
GET
List & Filter Records
GET /v1/records
Returns a paginated list of records in your organization.
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
form_id |
string | -- | Filter by form ID |
project_id |
string | -- | Filter by project ID |
since |
ISO 8601 | -- | Only records updated after this timestamp |
page |
integer | 1 | Page number |
per_page |
integer | 50 | Items per page (max 500) |
include_deleted |
boolean | false | Include soft-deleted records |
Example: List All Records
curl -H "X-API-Key: mk_live_..." \
"https://<ref>.supabase.co/functions/v1/api-gateway/v1/records"
Example: Filter by Form
curl -H "X-API-Key: mk_live_..." \
"https://<ref>.supabase.co/functions/v1/api-gateway/v1/records?form_id=frm_abc123"
Example: Delta Sync (Changes Since)
Fetch only records modified since your last sync:
curl -H "X-API-Key: mk_live_..." \
"https://<ref>.supabase.co/functions/v1/api-gateway/v1/records?since=2026-02-15T00:00:00Z"
Response
{
"ok": true,
"data": [
{
"id": "rec_abc123",
"type": "record",
"form_id": "frm_xyz",
"project_id": "prj_456",
"form_version_id": "fv_789",
"properties": {
"inspector_name": "Jane Smith",
"condition": "good",
"notes": "All systems operational"
},
"geometry": null,
"created_by": "user_id",
"updated_by": "user_id",
"created_at": "2026-02-15T14:30:00Z",
"updated_at": "2026-02-15T16:45:00Z",
"status": "active",
"assigned_to": null,
"workflow_state_id": null,
"priority": null
}
],
"pagination": {
"total": 1250,
"page": 1,
"per_page": 50,
"total_pages": 25
}
}
Note: The list endpoint omits geometry for performance. Use GET /v1/records/:id for the full record with geometry, or use spatial queries to query by location.
GET /v1/records/:id
Returns a single record with full geometry.
Example
curl -H "X-API-Key: mk_live_..." \
"https://<ref>.supabase.co/functions/v1/api-gateway/v1/records/rec_abc123"
Response
{
"ok": true,
"data": {
"id": "rec_abc123",
"type": "record",
"form_id": "frm_xyz",
"project_id": "prj_456",
"properties": { "inspector_name": "Jane Smith" },
"geometry": {
"type": "Point",
"coordinates": [-73.985, 40.758]
},
"created_at": "2026-02-15T14:30:00Z",
"updated_at": "2026-02-15T16:45:00Z",
"status": "active"
}
}
Error: Not Found
{
"ok": false,
"error": {
"code": "not_found",
"message": "Record rec_abc123 not found."
}
}
Brauchen Sie Hilfe mit der API? Kontaktieren Sie unser Support-Team.