Tables, fields, and records
Query parameters and common attributes to query records with Ninox API
Tables
When retrieving data for tables using a GET
, POST
, or DELETE
request, the response body lists all available tables as well as table definitions. Each item in a response consists of three properties, which define a table: an id, a name, and fields.
Table ids start with A
, B
, … AA
, AB
, etc., and need to be provided to get, update, or delete requests. A table name is a human-friendly name for a given table. Fields are arrays of objects, each describing a column in the table.
Fields
Each field is defined by an id, a name and a field type. Field ids start with A
, B
, … AA
, AB
, etc. A field name is a human-friendly name for a given field. For field types, refer to the table below.
Field types
Field type | JSON type | Example |
text | string |
|
number | number |
|
date | number |
|
datetime | string |
|
timeinterval | string |
|
time | string |
|
appointment | string |
|
boolean | boolean |
|
choice | string |
|
url | string |
|
string |
| |
phone | string |
|
location | string |
|
html | string |
|
Table and field ids do not change during the lifetime of a database. A table or field id is a handle, also known as an opaque identifier. The id format may be subject to change in future Ninox versions.
Common attributes
Each record has the following common attributes:
Attribute | JSON type | Description | Example |
| integer | The record id, starting from 1 |
|
| integer | The database change sequence number when the record was last updated |
|
| string | The UTC timestamp when the record was created Format: |
|
| string | The id of the user who created the record |
|
| string | The UTC timestamp when the record was updated Format: |
|
| object | An object of all data fields; the field name is used as the key |
|
Query parameters
The following query parameters control which and how many records are returned when retrieving records using a GET
or POST
request.
Parameter | JSON type | Description | Default value | Example |
| string | Ninox script to be executed | n/a |
|
| string | Stringified JSON containing criteria | n/a |
|
| integer | Result set page |
|
|
| integer | Records per page |
|
|
| string | The field name to order the result | n/a |
|
| boolean | Order descending |
|
|
| boolean | Show newest records first Cannot be combined with order |
|
|
| boolean | Show latest updates first Cannot be combined with order |
|
|
| integer | Show only records with a higher id | n/a |
|
| integer | Show only records that are created or updated after the specified database change sequence number | n/a |
|
| boolean | Formats the records, either as field id value or as field name value | n/a |
|
| string | Format the choice field in a record, either as an option id or as a caption of a selected option | ids | ids names |
When filtering records, encode the path parameter using the encodeURIComponent()
function in JavaScript.
Example
Before encoding, a JSON string containing the following
after URI encoding becomes
Last updated