Export Data Tables

post

/rest/v16/datatables/actions/export

This endpoint is used to export data tables.

Request

Supported Media Types
Body ()
Root Schema : dataTable-exportRequest
Type: object
Show Source
Nested Schema : Table Names List
Type: array
Title: Table Names List
Table name list of data tables to be exported.
Show Source
Back to Top

Response

Supported Media Types

202 Response

Export task details
Body ()
Root Schema : Task details
Type: object
Title: Task details
Task details
Show Source

Default Response

OK
Back to Top

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
Back to Top