Execute a query.
| Header | Value | Description |
|---|---|---|
| Content-Type | text/plain | The content type. |
| X-CSRF-Token | The value from the one.erp.csrf.token cookie. | CSRF protection token. |
The payload is the fetch query:
FETCH todo (key, title, is_completed)
The operation was successful. The resultset:
[
{
"key": 1,
"title": "First todo",
"is_completed": 0
},
{
"key": 2,
"title": "Second todo",
"is_completed": 1
}
]
There was an error deserializing the JSON message.
{
"detail": "error detail"
}
The operation is not authorized.
Check if the authentication cookie is set or valid or a valid username and password are set in the URL.
All errors except for JSON message deserialization errors.
{
"detail": "error detail"
}
/rest/fetchParse a FETCH query to a JSON representation.
{
"fetch": {
"entities": [{
"entity": "",
"properties": [{
"property": "",
"aggregate": "",
"alias": "",
"groupBy": false
}],
"filter": [{
"type": "And|Or",
"conditions": [{
"property": "",
"operator": "",
"value": ""
}],
"filter": {
"type": "And|Or",
"conditions": [{
"property": "",
"operator": "",
"value": ""
}],
"filter": ...
}
}],
"links": [{
"entity": "",
"from": "",
"to": "",
"filter": [],
"links": [],
"orderBy": [
{
"name": "",
"asc": false
}
],
"offset": 0,
"limit": 0,
}],
"orderBy": [{
"name": "",
"asc": false
}],
"offset": 0,
"limit": 0,
}]
}
}
| Header | Value | Description |
|---|---|---|
| Content-Type | text/plain | The content type. |
| X-CSRF-Token | The value from the one.erp.csrf.token cookie. | CSRF protection token. |
The payload is the fetch query:
FETCH todo (key, title, is_completed)
The operation was successful. The resultset:
{
"fetch": {
"entities": [
{
"entity": "todo",
"properties": [
{ "property": "key" },
{ "property": "title" },
{ "property": "is_completed" }
]
}
]
}
}
There was an error deserializing the JSON message.
{
"detail": "error detail"
}
The operation is not authorized.
Check if the authentication cookie is set or valid or a valid username and password are set in the URL.
All errors except for JSON message deserialization errors.
{
"detail": "error detail"
}
/rest/fetch/parseRetrieve metadata about the fetch results.
| Header | Value | Description |
|---|---|---|
| Content-Type | text/plain | The content type. |
| X-CSRF-Token | The value from the one.erp.csrf.token cookie. | CSRF protection token. |
The payload is the fetch query:
FETCH todo (key, title, is_completed)
/rest/metadata/fetch