Export Data Tables
/rest/v19/datatables/actions/export
Request
- application/json
object-
onlyInvalidRows:
boolean
Title:
Export only Invalid RowsExport only invalid rows -
selections(required):
array Table Names List
Title:
Table Names ListTable name list of data tables to be exported.
arrayTable Names ListResponse
- application/json
202 Response
objectTask Details-
links:
object reference links
Title:
reference linksReference links for the Parent, Self, Children and Related as applicable -
taskId:
integer
Title:
Task IdTask id.
objectreference links-
href:
string
Title:
URL to the related objectURL to the related object -
rel:
string
Title:
Link Relationship to the current objectLink 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 -H "Authorization: Bearer <token>" Content-Type: application/json https://sitename.oracle.com/rest/v19/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/v19/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/v19/tasks/41373364
Response Body Sample
{
"id": 41373364,
"dateModified": "04/16/2020 2:07 PM",
"links": [{
"rel": "self",
"href": "https://sitename.oracle.com/rest/v19/tasks/41373364"
}, {
"rel": "parent",
"href": "https://sitename.oracle.com/rest/v19/tasks"
}, {
"rel": "child",
"href": "https://sitename.oracle.com/rest/v19/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/v19/tasks/41373364/files
Response Body Sample
{
"items": [{
"links": [{
"rel": "related",
"href": "https://sitename.oracle.com/rest/v19/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/v19/tasks/41373364/files/datatable_1571428547692