...
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 |
---|
type | tip Info |
---|
Example Code Block |
---|
| $ curl -u \
user:passw http://localhost:9000/api/v1/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 |
---|
type | tip Info |
---|
Example - Closing a session Code Block |
---|
| $ curl -u user:passw \
http://localhost:9000/api/v1/session/close?sessionid=vusncl88sjghv7h8nkb0ohja6t |
|
...
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 |
---|
type | tip Info |
---|
Example - Retrieving a list Code Block |
---|
| $ curl -u \
user:passw http://localhost:9000/api/v1/refdatas |
|
...
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 |
---|
Rw ui textbox macro |
---|
type | tip Info |
---|
Example - Get metadata Code Block |
---|
| $ curl -u user:passw \
http://localhost:9000/api/v1/refdatas/Default.refprofile_star/table/APP.STAR?sessionid=vusncl88sjghv7h8nkb0ohja6t |
|
...
Note |
---|
Note!Any ongoing query process running on the same session will be aborted and a new process for the latest query will be executed. This operation will clear any uncommitted changes saved in the same session. |
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: rowsPerPage - the max number of rows (Data Set size) that are allowed in a rowset of the retrieved result. selectedColumns - allows for specific columns to be selected. filterExpression - allows optional definition of query expressions. The query will match all of the specified query expressions.
|
---|
Rw ui textbox macro |
---|
type | tip Info |
---|
Example - Get query without query expression in JSON payload body Code Block |
---|
| $ curl -X PUT -u user:passw -H 'content-type: application/json' \
http://localhost:9000/api/v1/refdatas/Default.refprofile_star/table/APP.STAR/rowset?sessionid=vusncl88sjghv7h8nkb0ohja6t \
-d '{"executeQuery": {"rowsPerPage":500,"selectedColumns":["ID","FIRSTNAME","LASTNAME"]}}' |
|
Rw ui textbox macro |
---|
type | tip
Info |
---|
Example - Get query with query expression in JSON payload body Code Block |
---|
| $ curl -X PUT -u user:passw -H 'content-type: application/json' \
http://localhost:9000/api/v1/refdatas/Default.refprofile_star/table/APP.STAR/rowset?sessionid=vusncl88sjghv7h8nkb0ohja6t \
-d '{"executeQuery": {"rowsPerPage":500,"selectedColumns":["ID","FIRSTNAME","LASTNAME"],"filterExpression":[{"col":"ID","expr":9,"op":">="},{"col":"LAST_NAME","expr":"Smith","op":"not like"}]}}' |
|
Rw ui textbox macro |
---|
type |
tip Info |
---|
Example - Get query using a JSON payload file Code Block |
---|
| $ curl -X PUT -T="Example.json" -u user:passw -H 'content-type: application/json' \
'http://localhost:9000/api/v1/refdatas/Default.refprofile_star/table/APP.STAR/rowset?sessionid=vusncl88sjghv7h8nkb0ohja6t |
Example.json file Code Block |
---|
| {
"executeQuery": {
"rowsPerPage": 500,
"selectedColumns": ["ID", "FIRSTNAME", "LASTNAME"]
}
} |
|
...
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 |
---|
Rw ui textbox macro |
---|
type | tip Info |
---|
Example - Get data sets Code Block |
---|
| $ curl -u user:passw \
http://localhost:9000/api/v1/rowset/0?sessionid=vusncl88sjghv7h8nkb0ohja6t |
|
...
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 |
---|
Rw ui textbox macro |
---|
|
Info |
---|
Example - Get status Code Block |
---|
| $ curl -u user:passw \
http://localhost:9000/api/v1/status?sessionid=vusncl88sjghv7h8nkb0ohja6t |
|
...
Note |
---|
Note!To prevent a user from initiating another operation before the first operation initiated is complete, Abort Process can be used before an operation is complete. |
Resource path | /status/abort?sessionid=<session id> |
---|
HTTP method | GET |
---|
Rw ui textbox macro |
---|
|
Info |
---|
Example - Get status Code Block |
---|
| $ curl -u user:passw \
http://localhost:9000/api/v1/status/abort?sessionid=vusncl88sjghv7h8nkb0ohja6t |
|
...
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: opts textQualifier - designated as double quotes by default. separator - designated as a comma by default. extent - designated as all by default. all - export all rows in the table. selected - export rows from the result of Get Query .
selectedColumns - allows for specific columns to be selected.
Note |
---|
Note!For the extend option, selected value is only applicable when Get Query is applied prior Table Export . |
|
---|
Rw ui textbox macro |
---|
|
Info |
---|
Example - Table export without options Code Block |
---|
| $ curl -X POST \
'http://localhost:9000/api/v1/refdatas/ref_data_mgmt_oracle.ref_data_mgmt_pf/table/TABLE.CUSTOMERS/download?sessionid=p3hce86dkb4rmls9peh4e8rps9' \
-u "user:passw" \
-d 'exportParams={}' \
> Export.csv |
|
Rw ui textbox macro |
---|
|
Info |
---|
Example - Table export with options Code Block |
---|
| $ curl -X POST \
'http://localhost:9000/api/v1/refdatas/ref_data_mgmt_oracle.ref_data_mgmt_pf/table/TABLE.CUSTOMERS/download?sessionid=p3hce86dkb4rmls9peh4e8rps9' \
-u "user:passw" \
-d 'exportParams={"opts":{"textQualifier":"'\''","separator":";","extent":"all"},"selectedColumns":["CITY","CUSTOMER_NAME"]}'
> Export.csv |
|
...
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: textQualifier - designated as double quotes by default. separator - designated as a comma by default. opts - designated as append by default. append - imported rows are appended to the table. truncate - the existing data in the table are truncated before the import is executed.
force - designated as false by default.
|
---|
Rw ui textbox macro |
---|
|
Info |
---|
Example - Table import without options Code Block |
---|
| $ curl -i -u "user:passw" \
'http://localhost:9000/api/v1/refdatas/ref_data_mgmt_oracle.ref_data_mgmt_pf/table/TABLE.CUSTOMERS/upload?sessionid=rssrh20dcd8lc1j505b3bqnstc' \
-F file=@/path/to/import_test.csv |
|
Rw ui textbox macro |
---|
type | tip |
---|
Info |
---|
Example - Table import with options Code Block |
---|
| $ curl -i -u "user:passw" \
'http://localhost:9000/api/v1/refdatas/ref_data_mgmt_oracle.ref_data_mgmt_pf/table/TABLE.CUSTOMERS/upload?sessionid=p3hce86dkb4rmls9peh4e8rps9' \
-F file=@/path/to/import_test.csv \
-F 'opts={"textQualifier":"\'","separator":",","op":"truncate","force":false}' |
|
...
Note |
---|
Note!The save operation is supported either on Oracle (based on the ROWID pseudo column) or non-Oracle type tables containing a Primary Key constraint. Non-Oracle tables without a Primary Key are not supported for data modifications. |
Resource path | /save?sessionid=<session id> |
---|
HTTP method | PUT |
---|
Body | This is where the dataEdits are included. The dataEdit JSON payload includes these options: refProfile - Reference Data Management Profile. tableName - Database table name. updates - modification parameters. action - to specify the type of modification. insert - insert a new row to the table. update - edit an existing row in the table. delete - delete an existing row in the table.
ids - to specify column value pairs of primary key(s). column - private key column name. value - private key value for the respective column.
values - to specify column value pairs to be inserted/updated. column - column name to be inserted/updated. value - insert/update value for the respective column.
Note |
---|
Note!When inserting a row, specifying a pseudo ids column value pair allows Cancel Changes to be applied to that specific insert row modification. |
|
---|
Rw ui textbox macro |
---|
|
Info |
---|
Example - Save changes with a JSON payload body Code Block |
---|
| $ curl -X PUT -u "user:passw" -H 'content-type: application/json \
-d '{"dataEdit":{"refProfile":"Default.refTest","tableName":"MZADMIN.REFRENCE_DATA","updates":[{"action":"delete","ids":[{"column":"ID","value":8}]}]}}' \
http://localhost:9000/api/v1/save?sessionid=vusncl88sjghv7h8nkb0ohja6t |
|
Rw ui textbox macro |
---|
type | tip
Info |
---|
Example - Save changes using a JSON payload file Code Block |
---|
| $ curl -X PUT -T="Example.json" -u "user:passw" -H 'content-type: application/json \
http://localhost:9000/api/v1/save?sessionid=vusncl88sjghv7h8nkb0ohja6t |
Example.json Code Block |
---|
| {
"dataEdit" : {
"refProfile" : "Default.refTest",
"tableName" : "MZADMIN.REFRENCE_DATA",
"updates" : [
{
"action" : "insert",
"ids" : [
{
"column" : "ROWID",
"value" : "ins0"
}
],
"values" : [
{
"column" : "ID",
"value" : 645
},
{
"column" : "FIRST_NAME",
"value" : "Roberts"
},
{
"column" : "LAST_NAME",
"value" : "Polis"
}
]
},
{
"action" : "update",
"ids" : [
{
"column" : "ID",
"value" : "6"
}
],
"values" : [
{
"column" : "LAST_NAME",
"value" : "Wick"
},
{
"column" : "FIRST_NAME",
"value" : "John"
}
]
},
{
"action" : "delete",
"ids" : [
{
"column" : "id",
"value" : "8"
}
]
}
]
}
} |
|
...
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 |
---|
Rw ui textbox macro |
---|
|
Info |
---|
Example - Commit changes Code Block |
---|
| $ curl -u user:passw \
http://localhost:9000/api/v1/commit?force=false&sessionid=vusncl88sjghv7h8nkb0ohja6t |
|
...
This operation returns a list of the modifications saved.
Resource path | /save/list?sessionid=<session id> |
---|
HTTP method | GET |
---|
Rw ui textbox macro |
---|
|
Info |
---|
Example - List changes Code Block |
---|
| $ curl -u user:passw \
http://localhost:9000/api/v1/save/list?sessionid=vusncl88sjghv7h8nkb0ohja6t |
|
...
Note |
---|
Note!SaveSize in the Cancel Changes response indicates the number of changes remaining.
|
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: scope - specify the scope of changes to be canceled. single - allow only specific modifications identified by ids to be cancelled. all - allow all the modifications to be canceled.
ids - to specify column value pairs of primary key(s). This is only required when the scope is single . column - private key column name. value - private key value for the respective column.
|
---|
Rw ui textbox macro |
---|
type | tip Info |
---|
Example - Cancel changes Code Block |
---|
| $ curl -u user:passw -H 'content-type: application/json' \
-d '{"dataEdit":{"scope":"single","ids": [{"id":[{"column":"ORDER_NUM","value":10398005}]}] \
http://localhost:9000/api/v1/save/cancel?sessionid=vusncl88sjghv7h8nkb0ohja6t |
|
...
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 |
---|