Export Migration Package
/rest/v19/migrationPackages/{identifier}/actions/export
Request
- application/json
-
identifier(required): string
The unique identifier of the Migration Package.
object
-
excludeDependencies:
boolean
Title:
Exclude Package Dependencies
Exclude Package Dependencies
Response
- application/json
Default Response
object
Task details
-
links:
array Links to the related objects
Title:
Links to the related objects
Links to the related objects -
taskId:
integer
Title:
Task Id
Task Id
array
Links to the related objects
-
Array of:
object reference links
Title:
reference links
Reference links for the Parent, Self, Children and Related as applicable
object
reference links
-
href:
string
Title:
URL to the related object
URL to the related object -
rel:
string
Title:
Link Relationship to the current object
Link Relationship to the current object
Examples
The following examples show how to export a migration package 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>" - H "Content-type: application/json" https://sitename.oracle.com/rest/v19/migrationPackages/migrationPackage_v12/actions/export
Response Body Sample
{ "taskId": 41372543, "links": [{ "rel": "related", "href": "https://sitename.oracle.com/tasks/41372543" } ] }
A task is initiated when you export a migration package and the migration package zip file will be associated with the task. After exporting the migration package, you can view the status of the export and download the exported migration package.
Note:Before initiating a migration package download, the Export Migration Package task validates the package content. If the migration package is determined invalid or without contents, the export task is not generated and an error is triggered.
Get Task Example
To view the status of the migration package export initiate the Get Task REST API using the task id from the Export Migration Package REST API response.
URI Endpoint Sample
https://sitename.oracle.com/rest/v19/tasks/41372543
Request Body Sample
{ "id": 41372543, "dateModified": "04/15/2020 3:33 PM", "links": [{ "rel": "self", "href": "https://sitename.oracle.com/rest/v19/tasks/41372543" }, { "rel": "parent", "href": "https://sitename.oracle.com/rest/v19/tasks" }, { "rel": "child", "href": "https://sitename.oracle.com/rest/v19/tasks/41372543/files" } ], "name": "Migration REST Export", "category": { "lookupCode": "52", "displayValue": "Migration Package Export" }, "status": "Completed", "result": "MigrationPackage_2", "executionTime": "04/15/2024 3:33 PM", "dateAdded": "04/15/2024 3:33 PM" }
After the task has completed, perform the following steps to download the exported migration package:
1. Get Task File List
Initiate the Get Task File List REST API using the task id from the Export Migration Package REST API response.
URI Endpoint Sample
https://sitename.oracle.com/rest/v19/tasks/41372543/files
Request Body Sample
{ "items": [{ "links": [{ "rel": "related", "href": "https://sitename.oracle.com/rest/v19/tasks/41372543/files/MigrationPackage_2" } ], "name": "MigrationPackage_2", "type": "application/zip" } ], "links": [{ "rel": "self", "href": "https://sitename.oracle.com/rest/v19/tasks/41372543/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/41372543/files/MigrationPackage_2