...
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 | ||
---|---|---|
| ||
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. |
...
title | Example - Save changes |
---|
Code Block |
---|
$ curl -X PUT -T="example.json" \
http://user:passw@localhost:9000/api/v1/save? \
sessionid=vusncl88sjghv7h8nkb0ohja6t |
example.json:
Code Block |
---|
{
"dataEdit": {
"refProfile": "Default.refTest",
"tableName": "MZADMIN.REFRENCE_DATA",
"updates": [{
"action": "insert",
"values": [{
"column": "ID",
"value": 645
}, {
"column": "FIRSTNAME",
"value": "Roberts"
}, {
"column": "LASTNAME",
"value": "Polis"
}]
}]
}
} |
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.
...
title | Example - Commit changes |
---|
...
Body: This is where the dataEdit will be included. The dataEdit JSON payload will include 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 | ||
---|---|---|
| ||
When insert row, specifying a pseudo |
This operation saves data grid edit modification (post insert/update/delete). Changes are saved within client session. Input parameters are passed in a JSON format as part of the HTTP message body.
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 | ||
---|---|---|
| ||
|
Info | ||
---|---|---|
| ||
|
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.
...
title | Example - List changes |
---|
Code Block |
---|
$ curl -u user:passw \
http://localhost:9000/api/v1/save/list?
\sessionid=vusncl88sjghv7h8nkb0ohja6t |
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 | ||
---|---|---|
| ||
The Web UI generates surrogate Primary Keys for inserted rows for the cancel function. |
Info | |||
---|---|---|---|
|
Code Block |
---|
$ curl -u user:passw \
http://localhost:9000/api/v1/save/cancel? \
sessionid=vusncl88sjghv7h8nkb0ohja6t |
example.json:
Code Block |
---|
{
"dataEdit": {
"scope": "single",
"ids": [{
"id": [{
"column": "ORDER_NUM",
"value": 10398005
}]
}]
}
} |
Example response:
Code Block |
---|
{
"dataEdit": {
"updates": [{
"action": "update",
"ids": [{
"column": "ORDER_NUM",
"value": 10398005
}],
"undoRow": [{
"column": "SHIPPING_DATE",
"value": "2011 - 05 - 24 00: 00: 00"
},
{
"column": "ORDER_NUM",
"value": 10398005
},
{
"column": "QUANTITY",
"value": 100
}
],
"values": [{
"column": "FREIGHT_COMPANY",
"value": "Zagreb"
}],
"SaveSize": 3
}]
}
} |
title | Note! |
---|
SaveSize
indicates the number of changes remaining. 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"
}
]
}
]
}
} |
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. If Last Update feature is enabled, the user name and modification timestamp values for insert/update modifications will be stored in the Last Update columns specified in the Reference Data Management Profile. The Last Update information will be used by the Get Status
operation to retrieve the most recent Last Update user and timestamp.
Info | ||
---|---|---|
| ||
|
List Changes
Resource path: /save/list?sessionid=<session id>
HTTP method: GET
This operation returns a list of the modifications saved.
Info | ||
---|---|---|
| ||
|
Cancel Changes
Resource path: /save/cancel?sessionid=<session id>
HTTP method: PUT
Body: This is where the dataEdit will be included. The dataEdit JSON payload will include these options:
scope - specify the scope of changes to be canceled
single - allow only specific modifications identified by
ids
to be cancelledall - allow all the modifications to be canceled
ids - to specify column value pairs of primary key(s). This is only required when the
scope
issingle
.column - private key column name
value - private key value for the respective column
This operation cancels the changes made from being saved. Input parameters are passed in a JSON format as part of the HTTP message body.
Note | ||
---|---|---|
| ||
Pseudo Primary Keys for inserted rows can be included in the |
Note | ||
---|---|---|
| ||
|
Info | ||
---|---|---|
| ||
|
Show Demo Query
Resource path: /demo/queryRequestParameters
HTTP method: GET
This operation shows the an example json payload format that applies for a query operation e g rowset/. Get Query
operation.
Show Demo Changes
Resource path: /demo/dataEditRequestParameters
HTTP method: GET
This operation shows the and example json payload format that applies to edit data via the Web UI e g save/commitfor a Save Changes
operation.