...
Info |
---|
title | Example - Get metadata |
---|
|
Code Block |
---|
$ curl -u user:passw \
http://localhost:9000/api/v1/refdatas/Default.refprofile_star/table/APP.STAR? \
sessionid=vusncl88sjghv7h8nkb0ohja6t |
|
...
Resource path: /refdatas/<Reference Data profile>/table/<table name>/rowset?sessionid=<session id>
HTTP method: PUTResource path:
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. |
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.
...
Info |
---|
|
Code Block |
---|
$ curl -X PUT -T="example.json" -u user:passw \
http://-H 'content-type: application/json' \
http://localhost:9000/api/v1/refdatas/Default.refprofile_star/table/APP.STAR/rowset? \
sessionid=vusncl88sjghv7h8nkb0ohja6t |
example.json: Code Block |
---|
{
"executeQuery": {
"rowsPerPage": 1024500,
"tableName": "APP.STAR",
"selectedColumns": ["ID", "FIRSTNAME", "LASTNAME"]
}
} |
|
...
Info |
---|
title | Example - Get data sets |
---|
|
Code Block |
---|
$ curl -u user:passw \
http://localhost:9000/api/v1/rowset/0? \
sessionid=vusncl88sjghv7h8nkb0ohja6t |
|
...
Info |
---|
title | Example - Get status |
---|
|
Code Block |
---|
$ curl -u user:passw \
http://localhost:9000/api/v1/status? \
sessionid=vusncl88sjghv7h8nkb0ohja6t |
|
...
Info |
---|
title | Example - Abort process |
---|
|
Code Block |
---|
$ curl -u user:passw \
http://localhost:9000/api/v1/status/abort? \
sessionid=vusncl88sjghv7h8nkb0ohja6t |
|
...
Info |
---|
title | Example - Save changes |
---|
|
Code Block |
---|
$ curl -X PUT -T="example.json" -H 'content-type: application/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"
}]
}]
}
} |
|
...
Info |
---|
title | Example - Commit changes |
---|
|
Code Block |
---|
$ curl -u user:passw \
http://localhost:9000/api/v1/commit? \
forceforce=false&sessionid=vusncl88sjghv7h8nkb0ohja6t |
|
...
Info |
---|
title | Example - List changes |
---|
|
Code Block |
---|
$ curl -u user:passw \
http://localhost:9000/api/v1/save/list?
\sessionid=vusncl88sjghv7h8nkb0ohja6t |
|
...
Info |
---|
title | Example - Cancel changes |
---|
|
Code Block |
---|
$ curl -u user:passw \
http://localhost:9000/api/v1/save/cancel? \
sessionid=vusncl88sjghv7h8nkb0ohja6t |
example.json: Code Block |
---|
{
-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 |
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
}]
}
} |
|
...