Database operations are supported via a RESTful HTTP Interface on the Platform.
Note |
---|
Note! Temporary files are created on the Platform host when the user executes queries via Reference Data Management. These temporary files, which stored in |
Restful Operations
The tables below describe the various operation that are available for Reference Data Management.
The service endpoint URI is http://<Platform host>:<port>/api/v1.
If encryption is enabled, the URI is https://<Platform host>:<port>/api/v1
.
For further information about enabling encryption, see Network Security in the System Administration user's guide.
Basic authentication is used and you must pass user credentials for each RESTful call.
Create and Get Session
This operation returns a session id which should be appended to all subsequent API calls where this parameter is applicable.
Resource path | /session |
---|---|
HTTP method | GET |
Rw ui textbox macro | |||||
---|---|---|---|---|---|
| |||||
Example
|
Close Session
This operation closes a session. This session id is no longer valid for any subsequent API calls.
Resource path | /session/close?sessionid=<sessionid> |
---|---|
HTTP method | GET |
Rw ui textbox macro | |||||
---|---|---|---|---|---|
| |||||
Example - Closing a session
|
Get Reference Data Profiles
This operation retrieves a list of all Reference Data profiles that are available to the user.
Resource path | /refdatas |
---|---|
HTTP method | GET |
Rw ui textbox macro | |||||
---|---|---|---|---|---|
| |||||
Example - Retrieving a list
|
Get Metadata
This operation retrieves table metadata that can be used for grid configuration, export, and Import configuration etc. If Last Update feature is enabled, the values stored in the most recent Last Update user and timestamp column will be retrieved as well. The result is returned synchronously.
Resource path | /refdatas/<Reference Data profile>/table/<table name>?sessionid=<session id> |
---|---|
HTTP method | GET |
Rw ui textbox macro | |||||
---|---|---|---|---|---|
| |||||
Example - Get metadata
|
Get Query
This operation executes database queries on specific a Reference Data profile and database table. The query is performed asynchronously and control is returned immediately. You can retrieve the result of the query by using /rowset/<rowset number>?sessionid=<session id>
. This operation requires JSON payload as input.
Resource path | /refdatas/<Reference Data profile>/table/<table name>/rowset?sessionid=<session id> |
---|---|
HTTP method | PUT |
Rw ui textbox macro | |||||
---|---|---|---|---|---|
| |||||
Example - Get query
|
Rw ui textbox macro | |||||
---|---|---|---|---|---|
| |||||
Example json
|
Get Data Sets
Data sets can be retrieved once downloaded to the file system of the Platform. This operation returns a data set for the given rowset (sequence number). The total number of available data sets can be queried with the status
operation.
Resource path | /rowset/<rowset number>?sessionid=<session id> |
---|---|
HTTP method | GET |
Rw ui textbox macro | |||||
---|---|---|---|---|---|
| |||||
Example - Get data sets
|
Get Status
Resource path: /status?sessionid=<session id>
HTTP method: GET
This operation returns a status message. It can be used to retrieve active processes and to query the number of available rows, data sets and status of imports and exports. If Last Update feature is enabled, the values stored in the most recent Last Update user and timestamp column will be retrieved as well.
Note |
---|
Note!The status is used by the Web UI to lock the interface during an active process. This prevents a user from initiating another operation before the first operation initiated is complete. However, |
Info | ||
---|---|---|
Example - Get status
|
Abort process
Resource path: /status/abort?sessionid=<session id>
HTTP method: GET
This operation request the active process to abort.
Info | ||
---|---|---|
Example - Abort process
|
Table export
This operation performs a database table export. Input parameters are passed in a JSON format as part of the HTTP message body as a APPLICATION_FORM_URLENCODED string.
Parameters | Description | Value |
---|---|---|
Resource path | The path to where the resource is located |
|
HTTP method | The HTTP method of the export command. | POST |
Basic Auth | This is a required parameter which contains the username and password. | user:passw |
Body | This is where the exportParams will be included in url encoding. The exportParams format will include these optional options:
| Example format: exportParams={"opts":{"textQualifier":"\'","separator":";","extent":"all"},"selectedColumns":["COLUMN1","COLUMN2"]} exportParams=%7B%22opts%22%3A%7B%22textQualifier%22%3A%22%5C'\''%22%2C%22separator%22%3A%22%3B%22%2C%22extent%22%3A%22all%22%7D%2C%22selectedColumns%22%3A%5B%22CITY%22%2C%22CUSTOMER_NAME%22%5D%7D |
Info | ||
---|---|---|
Example - Table export without options
|
Info | ||
---|---|---|
Example - Table export with options
|
Table Import
This operation performs a database table import. Input parameters are passed in a JSON format as part of the HTTP message body.
Parameters | Description | Value |
---|---|---|
Resource path | The path to where the resource is located |
|
HTTP method | The HTTP method of the import command. | POST |
Basic Auth | This is a required parameter which contains the username and password. | user:passw |
File Input | This is where the file input will be included in url encoding. The exportParams format will include these optional opts:
| Example format: file=@/<path to csv file>/test.csv 'opts={"textQualifier":"\'","separator":",","op":"append","force":false}' file=@/path/to/import_test.csv 'opts={"textQualifier":"\'","separator":",","op":"append","force":false}' |
Info | ||
---|---|---|
Example - Table import without options
|
Info | ||
---|---|---|
Example - Table import with options
|
Save Changes
Resource path: /save?sessionid=<session id>
HTTP method: PUT
This operation saves data grid edit modification (post insert/update/delete). Changes are saved within client session. This operation requires JSON payload as input.
Note |
---|
Note!
|
Note |
---|
Note!The save operation is supported either on Oracle (based on ROWID pseudo column) or non-Oracle type tables containing Primary Key constraint. Non-Oracle tables without a Primary Key are not supported for data modifications. |
Info | ||||
---|---|---|---|---|
Example - Save changes
example.json:
|
Commit Changes
Resource path: /save/commit?force=<true|false>&sessionid=<session id>
HTTP method: GET
This operation applies saved edits in the database and commits the work in case of success. You can use "force" commit in case of errors.
Info | ||
---|---|---|
Example - Commit changes
|
List Changes
Resource path: /save/list?sessionid=<session id>
HTTP method: GET
This operation returns a list of the modifications saved. You can use this operation to reapply changes in the Web UI during a grid refresh.
Info | ||
---|---|---|
Example - List changes
|
Cancel Changes
Resource path: /save/cancel?sessionid=<session id>
HTTP method: PUT
This operation cancels the changes made from being saved. As the input, Json payload specifies either all the changes to be canceled or lists the selected Primary Keys to be cancelled. You can cancel the saving of several changes at the same time (one Primary Key per change). The scope is single or all. The format is the same as for the Save changes operation but the ID fields are stored in a root structure. Ids are in a JSON array to hold multiple Primary Keys to be cancelled.
Note |
---|
Note!The Web UI generates surrogate Primary Keys for inserted rows for the cancel function. |
Info | ||||||
---|---|---|---|---|---|---|
Example - Cancel changes
example.json:
Example response:
|
Note |
---|
Note!
|
Show Demo Query
Resource path: /demo/queryRequestParameters
HTTP method: GET
This operation shows the json payload format that applies for a query operation e g rowset/.
Show Demo Changes
Resource path: /demo/dataEditRequestParameters
HTTP method: GET
This operation shows the json payload format that applies to edit data via the Web UI e g save/commit.