Kodall
REST API

Fetch API

POST /rest/fetch

Execute a query.

Request

HeaderValueDescription
Content-Typetext/plainThe content type.
X-CSRF-TokenThe value from the one.erp.csrf.token cookie.CSRF protection token.

The payload is the fetch query:

SQL
FETCH todo (key, title, is_completed)

Response

Example

POST/rest/fetch
Initializing connection...

POST /rest/fetch/parse

Parse a FETCH query to a JSON representation.

Request

HeaderValueDescription
Content-Typetext/plainThe content type.
X-CSRF-TokenThe value from the one.erp.csrf.token cookie.CSRF protection token.

The payload is the fetch query:

SQL
FETCH todo (key, title, is_completed)

Response

Example

POST/rest/fetch/parse
Initializing connection...

POST /rest/metadata/fetch

Retrieve metadata about the fetch results.

Request

HeaderValueDescription
Content-Typetext/plainThe content type.
X-CSRF-TokenThe value from the one.erp.csrf.token cookie.CSRF protection token.

The payload is the fetch query:

SQL
FETCH todo (key, title, is_completed)

Example

POST/rest/metadata/fetch
Initializing connection...