RESTful Interface for Reference Data Management
Database operations are supported via a RESTful HTTP Interface on the Platform.
Note!
Temporary files are created on the Platform host when the user executes queries via Reference Data Management. These temporary files, which are stored in $MZ_HOME/tmp/rowset
, are removed automatically when the user session expires. User sessions expire automatically after six (6) hours.
Restful Operations
The tables below describe the various operations 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 Administrator'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 |
Example
$ curl -u \
user:passw http://localhost:9000/api/v1/session
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 |
Example - Closing a session
$ curl -u user:passw \
http://localhost:9000/api/v1/session/close?sessionid=vusncl88sjghv7h8nkb0ohja6t
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 |
Get Metadata
This operation retrieves table metadata that can be used for viewing or to derive parameters for other REST APIs. If the Last Update feature is enabled, the values stored in the most recent Last Update user and timestamp column are retrieved as well. The result is returned synchronously.
Resource path | /refdatas/<Reference Data profile>/table/<table name>?sessionid=<session id> |
---|---|
HTTP method | GET |
Get Query
This operation executes database queries on a specific 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 Input parameters that are passed in a JSON format as part of the HTTP message body.
Resource path | /refdatas/<Reference Data profile>/table/<table name>/rowset?sessionid=<session id> |
---|---|
HTTP method | PUT |
Body | This is where the executeQuery is included. The executeQuery JSON payload includes these options:
|
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 Get Status
operation.
Resource path | /rowset/<rowset number>?sessionid=<session id> |
---|---|
HTTP method | GET |
Get Status
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 the status of imports and exports. If the Last Update feature is enabled, the values stored in the most recent Last Update user and timestamp column are retrieved as well.
Resource path | /status?sessionid=<session id> |
---|---|
HTTP method | GET |
Abort Process
This operation requests the active process to abort.
Resource path | /status/abort?sessionid=<session id> |
---|---|
HTTP method | GET |
Table Export
This operation performs a database table export. Input parameters are passed in a JSON format as part of the HTTP message body.
Resource path | /refdatas/<Reference Data profile>/table/<table name>/download?sessionid=<sessionid> |
---|---|
HTTP method | POST |
Body | This is where the exportParams are included. The exportParams JSON payload includes these options:
|
Table Import
This operation performs a database table import. Input parameters are passed in a JSON format as part of the form-data in the HTTP message body.
Resource path | /refdatas/<Reference Data profile>/table/<table name>/upload?sessionid=<sessionid> |
---|---|
HTTP method | POST |
Body | This is where the file and the input parameters are included. The exportParams format includes these options:
|
Save Changes
This operation saves data modification (insert/update/delete). Changes are saved within the client session. Input parameters are passed in a JSON format as part of the HTTP message body.
Resource path | /save?sessionid=<session id> |
---|---|
HTTP method | PUT |
Body | This is where the dataEdits are included. The dataEdit JSON payload includes these options:
|
Commit Changes
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. If the Last Update feature is enabled, the user name and modification timestamp values for insert/update modifications are stored in the Last Update columns specified in the Reference Data Management Profile. The Last Update information is used by the Get Status
operation to retrieve the most recent Last Update user and timestamp.
Resource path | /save/commit?force=<true|false>&sessionid=<session id> |
---|---|
HTTP method | GET |
List Changes
This operation returns a list of the modifications saved.
Resource path | /save/list?sessionid=<session id> |
---|---|
HTTP method | GET |
Cancel Changes
This operation cancels the changes made from being saved. Input parameters are passed in a JSON format as part of the HTTP message body.
Resource path | /save/cancel?sessionid=<session id> |
---|---|
HTTP method | PUT |
Body | This is where the dataEdits are included. The dataEdit JSON payload includes these options:
|
Show Demo Query
This operation shows an example JSON payload format that applies for a Get Query
operation.
Resource path | /demo/queryRequestParameters |
---|---|
HTTP method | GET |
Show Demo Changes
This operation shows an example JSON payload format that applies for a Save Changes
operation.
Resource path | /demo/dataEditRequestParameters |
---|---|
HTTP method | GET |