Import Data Tables
post
/rest/v19/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 ListList Tasks created for importing files
Nested Schema : Tasks List
Type:
arrayTitle:
Tasks ListList Tasks created for importing files
Show Source
-
Array of:
object Task Details
Title:
Task DetailsTask details.
Nested Schema : Task Details
Type:
objectTitle:
Task DetailsTask details.
Show Source
-
links:
object reference links
Title:
reference linksReference links for the Parent, Self, Children and Related as applicable -
taskId:
integer
Title:
Task IdTask id.
Nested Schema : reference links
Type:
objectTitle:
reference linksReference links for the Parent, Self, Children and Related as applicable
Show Source
-
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
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 -H "Authorization: Bearer <token>" --request POST 'https://sitename.oracle.com.oracle.com/rest/v19/datatables/actions/import' \ \ \ --form 'file=@/D:/Status.csv' \ --form 'columnDelimiter=,' \ --form 'dataHasDelimiter=true'
Response Body Sample
{
"links": [{
"rel": "related",
"href": "https://sitename.oracle.com/rest/v19/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/v19/tasks/41361486
Response Body Sample
{
"id": 41372454,
"dateModified": "04/15/2020 1:49 PM",
"links": [{
"rel": "self",
"href": "https://sitename.oracle.com/rest/v19/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"
}