Import Data Tables
post
/rest/v16/datatables/actions/import
This endpoint is used to import data tables.
Request
Supported Media Types
- multipart/form-data
Form Parameters
-
columnDelimiter: string
The column delimiter.
-
dataHasDelimiter: boolean
This attribute is set to 'true' to indicate that the imported data table has content with delimiters (e.g. numeric values like 1,000).
-
file(required): file
The file to be imported.
-
folderVarName: string
The variable name of the parent data table folder. If this value is not specified, the new data tables will be imported into the '_default' folder.
-
rowDelimiter: string
The row delimiter.
Response
Supported Media Types
- application/json
202 Response
Import Task details
Root Schema : taskDetails-collection
Type:
Show Source
object
-
tasks:
array Tasks List
Title:
Tasks List
List Tasks created for importing files
Nested Schema : Tasks List
Type:
array
Title:
Tasks List
List Tasks created for importing files
Show Source
-
Array of:
object Task details
Title:
Task details
Task details
Nested Schema : Task details
Type:
object
Title:
Task details
Task details
Show Source
-
links:
array Links
Title:
Links
Links to the related objects. -
taskId:
integer
Title:
Task Id
The status log task Id.
Nested Schema : Links
Type:
array
Title:
Links
Links to the related objects.
Show Source
-
Array of:
object Reference Links
Title:
Reference Links
Reference links for the Parent, Self, Children and Related as applicable
Nested Schema : Reference Links
Type:
object
Title:
Reference Links
Reference links for the Parent, Self, Children and Related as applicable
Show Source
-
href:
string
Title:
href
URL to the related object -
rel:
string
Title:
Link
Link relationship to the current object
Default Response
OK
Examples
The following example shows how to import data tables by submitting a POST request to the REST resource using cURL. For more information about cURL, see Use cURL.
curl --request POST 'https://sitename.oracle.com.oracle.com/rest/v16/datatables/actions/import' \ --header 'Authorization: Basic c3VwZXJ1c2VyOnFhcGFzcw==' \ --header 'Cookie: JSESSIONID=41fdadef842a4b3ba2079846ac05a5a14ee284b2b4fc509eb875!1363400201' \ --form 'file=@/D:/Status.csv' \ --form 'columnDelimiter=,' \ --form 'dataHasDelimiter=true'
Response Body Sample
{ "links": [{ "rel": "related", "href": "https://sitename.oracle.com/rest/v16/tasks/41361486" } ], "taskId": 41361486 }
A task is initiated when you import data tables and the status log file will be associated with the task. After importing the data tables, you can view the status of the import and cancel the import.
Get Task Example
To view the status of the data table export initiate the Get Task REST API using the task id from the Import Data Tables REST API response.
URI Endpoint Sample
https://sitename.oracle.com/rest/v16/tasks/41361486
Response Body Sample
{ "id": 41372454, "dateModified": "04/15/2020 1:49 PM", "links": [{ "rel": "self", "href": "https://sitename.oracle.com/rest/v16/tasks/41372454" }, { "rel": "parent", "href": "https://sitename.oracle.com/tasks" }, { "rel": "child", "href": "https://sitename.oracle.com/tasks/41372454/files" } ], "name": "Status", "category": { "lookupCode": "13", "displayValue": "Data Table Upload" }, "status": "Completed", "result": "https://sitename.oracle.com/admin/bulkservices/view_error_log.jsp?file_name=41372454.log&company_id=4118171", "executionTime": "04/15/2020 1:49 PM", "dateAdded": "04/15/2020 1:49 PM" }