Export Data Tables
/rest/v16/datatables/actions/export
Request
- application/json
object
-
onlyInvalidRows:
boolean
Title:
Export only Invalid Rows
Export only invalid rows -
selections(required):
array Table Names List
Title:
Table Names List
Table name list of data tables to be exported.
array
Table Names List
Response
- application/json
202 Response
object
Task details
-
links:
array Links
Title:
Links
Links to the related objects. -
taskId:
integer
Title:
Task Id
The status log task Id.
array
Links
-
Array of:
object Reference Links
Title:
Reference Links
Reference links for the Parent, Self, Children and Related as applicable
object
Reference Links
-
href:
string
Title:
href
URL to the related object -
rel:
string
Title:
Link
Link relationship to the current object
Default Response
Examples
The following example shows how to export data tables by submitting a POST request to the REST resource using cURL. For more information about cURL, see Use cURL
curl - X POST - i - H Authorization: Basic c3VwZXJ1c2VyOnFhcGFzcw== Content-Type: application/json https://sitename.oracle.com/rest/v16/datatables/actions/export
Request Body Sample with Selections
{ "selections": ["ServerComponents", "Shipping_Options"] }
Request Body Sample with Filtered Selections
{ "selections": ["StatusLabel", "table_100columns"], "filterCriteriaForSelections": [{ "name": "StatusLabel", "q": "{$or:[{StatusLabel:'CREATED'},{StatusID:8}]}" }, { "name": "table_100columns", "q": "{$or:[{str1:'test1'},{int10:1}]}" } ] }
Response Body Sample
{ "links": [{ "rel": "related", "href": "https://sitename.oracle.com/rest/v16/tasks/41373364" } ], "taskId": 41373364 }
A task is initiated when you export data tables and the data table zip file will be associated with the task. After exporting the data tables, you can view the status of the export, cancel the export, and download the exported data tables or log files.
Get Task Example
To view the status of the data table export initiate the Get Task REST API using the task id from the Export Data Tables REST API response.
URI Endpoint Sample
https://sitename.oracle.com/rest/v16/tasks/41373364
Response Body Sample
{ "id": 41373364, "dateModified": "04/16/2020 2:07 PM", "links": [{ "rel": "self", "href": "https://sitename.oracle.com/rest/v16/tasks/41373364" }, { "rel": "parent", "href": "https://sitename.oracle.com/rest/v16/tasks" }, { "rel": "child", "href": "https://sitename.oracle.com/rest/v16/tasks/41373364/files" } ], "name": "Data Tables (2) Export", "category": { "lookupCode": "26", "displayValue": "Data Table Export" }, "status": "Completed", "result": "datatable_1587064062872", "executionTime": "04/16/2020 2:07 PM", "dateAdded": "04/16/2020 2:07 PM" }
After the task has completed, perform the following steps to download the exported data tables:
1. Get Task File List
Initiate the Get Task File List REST API using the task id from the Export Data Tables REST API response.
URI Endpoint Sample
https://sitename.oracle.com/rest/v16/tasks/41373364/files
Response Body Sample
{ "items": [{ "links": [{ "rel": "related", "href": "https://sitename.oracle.com/rest/v16/tasks/41373364/files/datatable_1571428547692" } ], "name": "datatable_1571428547692", "type": "application/zip" } ], "links": [{ "rel": "self", "href": "https://sitename.oracle.comtasks/41373364/files" } ] }
2. Download Task File
Initiate the Download Task File REST API using the file name from the Get Task File List REST API.
URI Endpoint Sample
https://sitename.oracle.com/rest/v16/tasks/41373364/files/datatable_1571428547692