Export Migration Package

post

/rest/v19/migrationPackages/{identifier}/actions/export

This endpoint exports an existing migration package. Dependencies are included by default, but the request can contain an option to exclude dependencies.

Request

Supported Media Types
Path Parameters
Body ()
Root Schema : migrationPackages-exportRequest
Type: object
Show Source
Back to Top

Response

Supported Media Types

Default Response

Migration Package Export Task details
Body ()
Root Schema : Task details
Type: object
Title: Task details
Task details
Show Source
Back to Top

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