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:
array Links
Title:
LinksLinks to the related objects. -
taskId:
integer
Title:
Task IdThe status log task Id.
Nested Schema : Links
Type:
arrayTitle:
LinksLinks to the related objects.
Show Source
-
Array of:
object Reference Links
Title:
Reference LinksReference links for the Parent, Self, Children and Related as applicable
Nested Schema : Reference Links
Type:
objectTitle:
Reference LinksReference links for the Parent, Self, Children and Related as applicable
Show Source
-
href:
string
Title:
hrefURL to the related object -
rel:
string
Title:
LinkLink 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"
}