Data Rows¶
/api/repositories/{repository}/entities/{entity}/rows
Parameter | Type | Purpose |
---|---|---|
repository | string | the name of the Repository |
entity | int | The ID of the entity to view |
All Rows¶
-
GET
/api/repositories/
(string: repository)/entities/
(int: entity)/rows
¶ Lists data rows in an Entity
JSON Parameters: - body – The request body
GET /api/repositories/jupiter/entities/1/rows HTTP/1.1
Accept: application/json
Response Code | Reason |
---|---|
200 | No error |
500 | Server error |
Paging is supported for this GET request using Standard URL Query String.
The underlying data rows can be returned in a JSON key/value pair by setting the external JSON format parameter. This allows access by different external tools that requires the JSON data in a key/value pair instead of standard array of row data with columns names defined separately.
The response will be a Standard Response, with a list of records in the corresponding Entity. If external JSON format parameter was set then a list of records in a JSON key/value pair format will be returned.
The columns
array will contain the list of columns for each data row.
data row will contain the list of records of the corresponding Entity:
If there are no records in the Entity, rows
will be an empty string.
Page Rows¶
-
POST
/api/repositories/
(string: repository)/entities/
(int: entity)/rows
¶ Get a page of rows from an Entity
JSON Parameters: - body – The request body
POST /api/repositories/(string:repository)/entities/(int:entity)/rows HTTP/1.1
Content-Type: application/json
{
"command": "get",
"options": {
"pageStart": "1",
"pageSize": "50"
}
}
Response Code | Reason |
---|---|
204 | No error |
400 | Invalid data passed with request |
500 | Server error |
The underlying data rows can be returned in a JSON key/value pair by setting the external JSON format parameter. This allows access by different external tools that requires the JSON data in a key/value pair instead of standard array of row data with columns names defined separately.
The request requires a Standard Request packet. Available commands are:
Command | Description |
---|---|
get | Pages data rows of an entity |
The request packet must contain the command
and options
elements. The data
element is not required.
The response will be a Standard Response, with a list of records in the corresponding Entity. If external JSON format parameter was set then a list of records in a JSON key/value pair format will be returned.
The columns
array will contain the list of columns for each data row.
data row will contain the list of records of the corresponding Entity:
If there are no records in the Entity, rows
will be an empty string.
Export Rows¶
Some or all of the rows may be exported as a scheduled task.
POST /api/repositories/(string:repository)/entities/(int:entity)/rows HTTP/1.1
Content-type:: application/json
{
"command": "export",
"options": {
"where": "where clause"
},
"data": {
"filename": "filename.csv"
}
}
When export is required, the filename for the exported file must be specified. The file will be exported in CSV format using the native encoding of the server.
Response Code | Reason |
---|---|
200 | No error |
500 | Server error |
The response will contain the URL of the scheduled task and the link to download the exported file.
{
"job": "/api/repositories/jupiter/scheduler/1",
"file": "/api/repositories/jupiter/download/filename.csv"
}