Data API: Reading records
This article explains how to discover forms and read records with the Xpoda Data API. Paths are relative to the base URL https://{your-xpoda-service}/api/v1/{moduleId}; see Data API: Authentication, limits and errors for the key and the error format.
Endpoints
| Request | Returns |
|---|---|
GET /forms | The forms this key may use, with its permissions on each. |
GET /forms/{form}/schema | The form's fields as JSON Schema. |
GET /forms/{form}/records | A page of records. |
GET /forms/{form}/records/{id} | One record, with an ETag header. |
GET /openapi.json | An OpenAPI 3.1 document of everything this key may do. |
{form} is the form's API name (for example stock-items), not its title.
List the forms
GET /forms
{
"items": [
{
"name": "stock-items",
"title": "Stock items",
"permissions": { "read": true, "create": true, "update": true, "delete": false },
"links": {
"schema": "/api/v1/7/forms/stock-items/schema",
"records": "/api/v1/7/forms/stock-items/records"
}
}
]
}
permissions already combines the key's permissions with the API user's form authorities: if create is false, a POST will be refused.
Field definitions
GET /forms/stock-items/schema
Returns a JSON Schema (draft 2020-12) of a record:
- every field with its JSON type,
format(date-time,uuid),maxLengthfor text, andreadOnlyfor fields the API user may not change; x-required: trueon fields that must have a value in a new record or line;linesif the form has a grid (see Data API: Grid lines and grid forms);x-permissions: the same permissions as inGET /forms.
Fields the API user may not see are left out of the schema and of every response.
List records
GET /forms/stock-items/records?filter=Price gt 100&sort=-id&page=1&pageSize=50
{
"items": [
{
"id": 2,
"Code": "B-200",
"Name": "Steel bolt M8",
"Price": 120.5,
"_meta": {
"createdAt": "2026-08-25T15:27:39.640",
"createdBy": 2,
"updatedAt": "2026-09-01T09:12:03.117",
"updatedBy": 5,
"recordGuid": "284109c4-6c49-4f87-bcfa-07b0f08a8819"
}
}
],
"page": 1,
"pageSize": 50,
"total": 1
}
idis the record's number in Xpoda._metaholds the record's history fields; they are read-only.totalis the number of records matching the filter, across all pages.
Query parameters
| Parameter | Example | Meaning |
|---|---|---|
filter | Code eq 'B-200' | Which records to return. See Filters below. |
sort | -updatedAt,Code | Comma-separated fields; a leading - sorts descending. At most 5 fields. Without it, records come in id order. |
fields | Code,Name | Return only these fields. id and _meta are always returned. |
page | 2 | Page number, starting at 1. |
pageSize | 100 | Records per page: default 50, at most 500. |
expand | lines | Also return each record's grid lines. |
Encode parameter values in the URL (spaces as %20, quotes as %27). With cURL, -G --data-urlencode "filter=..." does this for you.
Filters
A filter compares fields with values and combines the comparisons:
| Operator | Meaning | Example |
|---|---|---|
eq, ne | equal, not equal | Code eq 'B-200' |
gt, ge, lt, le | greater, greater or equal, less, less or equal | Price ge 100 |
contains | text contains | Name contains 'bolt' |
startswith | text starts with | Code startswith 'B-' |
in | one of a list (at most 100 values) | id in (1, 2, 3) |
eq null, ne null | empty, not empty | Name eq null |
and, or, not, parentheses | combine conditions | (Price gt 100 or Code eq 'A-1') and not Name eq null |
Writing values:
- Text and dates go in single quotes:
Name eq 'Bolt',updatedAt ge '2026-10-01'. Write a quote inside text as two quotes:Name eq 'O''Brien'. - Numbers and
true/falseare written as they are:Price lt 9.99,Active eq true. - Besides the form's fields you can filter and sort on
id,createdAt,createdBy,updatedAtandupdatedBy. - Field names are not case-sensitive. Whether text comparisons are case-sensitive depends on the database (usually not).
- A filter may be at most 2000 characters, with at most 50 conditions.
A value of the wrong type (for example text compared with a number field) or an unknown field gives 400 invalid_query with a detail that points to the problem.
Fetching everything: loop over page until you have total records. To pick up only what changed since your last run, filter on updatedAt, for example filter=updatedAt gt '2026-10-26T08:00:00'&sort=updatedAt.
Read one record
GET /forms/stock-items/records/2
Returns the record in the same shape as a list item, plus its grid lines if the form has a grid. The response has an ETag header:
ETag: W/"639232684527170000"
The ETag identifies this version of the record. Send it back in If-Match when you change or delete the record (see Data API: Writing records). It changes every time the record is saved.
A record that does not exist gives 404 record_not_found. fields works here too.
OpenAPI
GET /openapi.json
Returns an OpenAPI 3.1 document generated for this key: only the forms, fields and operations the key is allowed are in it. Load it in Postman, Swagger UI, or a client generator (NSwag, openapi-generator) to get typed code for your forms. Generate it again after the forms change in Studio.