auto_stories Bilgi Bankası chevron_right Data API chevron_right Makale

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

RequestReturns
GET /formsThe forms this key may use, with its permissions on each.
GET /forms/{form}/schemaThe form's fields as JSON Schema.
GET /forms/{form}/recordsA page of records.
GET /forms/{form}/records/{id}One record, with an ETag header.
GET /openapi.jsonAn 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), maxLength for text, and readOnly for fields the API user may not change;
  • x-required: true on fields that must have a value in a new record or line;
  • lines if the form has a grid (see Data API: Grid lines and grid forms);
  • x-permissions: the same permissions as in GET /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
}
  • id is the record's number in Xpoda.
  • _meta holds the record's history fields; they are read-only.
  • total is the number of records matching the filter, across all pages.

Query parameters

ParameterExampleMeaning
filterCode eq 'B-200'Which records to return. See Filters below.
sort-updatedAt,CodeComma-separated fields; a leading - sorts descending. At most 5 fields. Without it, records come in id order.
fieldsCode,NameReturn only these fields. id and _meta are always returned.
page2Page number, starting at 1.
pageSize100Records per page: default 50, at most 500.
expandlinesAlso 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:

OperatorMeaningExample
eq, neequal, not equalCode eq 'B-200'
gt, ge, lt, legreater, greater or equal, less, less or equalPrice ge 100
containstext containsName contains 'bolt'
startswithtext starts withCode startswith 'B-'
inone of a list (at most 100 values)id in (1, 2, 3)
eq null, ne nullempty, not emptyName eq null
and, or, not, parenthesescombine 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 / false are 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, updatedAt and updatedBy.
  • 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.