Database
Get Table Entries
GET /api/db/table/{tableName}/get
Query:
Field | Value | Type |
---|---|---|
limit (optional) | rows to return (max 10000) | number |
offset (optional) | get rows with offset x | number |
columns (optional) | comma separated list of columns to return | string |
Example
http://localhost:7766/api/db/table/test/get?limit=10&offset=0&columns=id,col1
Search Table Entries
v3.0.0+POST /api/db/table/{tableName}/search
Keywords: “EQUALS”, “NOTEQUALS” , “IN” , “GT” , “GTE” , “LT” , “LTE” , “NOTIN” , “LIKE” , “NOTLIKE” , “ILIKE” , “NOTILIKE” , “ISNULL”
Special Value: ”$#(TODAY)”
Body
Field | Value | Type |
---|---|---|
filter | check the examples belows | string |
limit (optional) | rows to return (max 10000) | number |
offset (optional) | get rows with offset x | number |
columns (optional) | comma separated list of columns to return | string |
Examples:
Simple
{
"filter": {
"id": "A"
}
}
Insert Table Entry
v2.8.2+POST /api/db/table/{tableName}/insert
Insert a single entry in a table. If no id is provided, the next db_id will be used.
Body
Field | Value | Type |
---|---|---|
id (optional) | row id, will be generated if not provided | string |
columName1 | value for the column | string |
... | value for the column | string |
Example
{
"id":"123",
"col1": "test"
}
Update Table Entry
v2.8.2+POST /api/db/table/{tableName}/update
Update a single entry in a table.
Body:
Field | Value | Type |
---|---|---|
id | row to update | string |
columName1 | value for the column | string |
... | value for the column | string |
Example
{
"id":"123",
"col1": "test",
"col2": "test2"
}
Upsert Table Entry
v2.8.2+POST /api/db/table/{tableName}/upsert
Updates or inserts (if id does not exist) a single entry in a table.
Body:
Field | Value | Type |
---|---|---|
id | row to update/insert | string |
columName1 | value for the column | string |
... | value for the column | string |
Example
{
"id":"123",
"col1": "test",
"col2": "test2"
}
Add Comment to Table Entry
v2.9.0+POST /api/db/table/{tableName}/commentHistoryEntry
Adds a comment history entry for an existing field. If the current content is not the expected format, it will be replaced with the posted single entry comment history.
Body
Field | Value | Type |
---|---|---|
id | row to update | string |
column | column to update | string |
text | Entry text | string |
user | Entry user | string |
imgUrl (optional) | Entry img | string |
Example
{
"id":"A",
"column": "col1",
"text": "Some text for the entry",
"user": "User 1"
}
Bulk Insert
v2.8.2+POST /api/db/table/{tableName}/bulk/insert
Inserts multiple entries in a table. If no id is provided, the next db_id will be used.
Body [Array]:
Field | Value | Type |
---|---|---|
id (optional) | row id, will be generated if not provided | string |
columName1 | value for the column | string |
... | value for the column | string |
Example
[
{
"id":"123",
"col1": "test"
},{
"col1": "test2"
}
]
Bulk Update
v2.8.2+POST /api/db/table/{tableName}/bulk/update
Updates multiple entries in a table.
Body [Array]:
Field | Value | Type |
---|---|---|
id | row to update | string |
columName1 | value for the column | string |
... | value for the column | string |
Example
[
{
"id":"123",
"col1": "test"
},{
"id":"2",
"col1": "test2"
}
]
Bulk Upsert
v2.8.2+POST /api/db/table/{tableName}/bulk/upsert
Updates or inserts (if id does not exist) multiple entries in a table.
Body [Array]:
Field | Value | Type |
---|---|---|
id | row to update | string |
columName1 | value for the column | string |
... | value for the column | string |
Example
[
{
"id":"123",
"col1": "test"
},{
"id":"2",
"col1": "test2"
}
]
Delete Table Entry
DELETE /api/db/table/{tableName}/delete/{id}
Deletes a single entry in a table.
Body:
Field | Value | Type |
---|---|---|
table | db table name | string |
ids | list of ids to delete | array |
Example
{
"table": "test",
"ids": ["1","2"]
}