Export Migration Package

post

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

Use this endpoint to export 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 example shows 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 - i - H Authorization: Basic c3VwZXJ1c2VyOnFhcGFzcw== Content-Type: application/json
https://sitename.oracle.com/rest/v16/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.

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/v16/tasks/41372543

Response Body Sample

{
  "id": 41372543,
  "dateModified": "04/15/2020 3:33 PM",
  "links": [{
      "rel": "self",
      "href": "https://sitename.oracle.com/rest/v16/tasks/41372543"
    }, {
      "rel": "parent",
      "href": "https://sitename.oracle.com/rest/v16/tasks"
    }, {
      "rel": "child",
      "href": "https://sitename.oracle.com/rest/v16/tasks/41372543/files"
    }
  ],
  "name": "Migration REST Export",
  "category": {
    "lookupCode": "52",
    "displayValue": "Migration Package Export"
  },
  "status": "Completed",
  "result": "MigrationPackage_2",
  "executionTime": "04/15/2020 3:33 PM",
  "dateAdded": "04/15/2020 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/v16/tasks/41372543/files

Response Body Sample

{
  "items": [{
      "links": [{
          "rel": "related",
          "href": "https://sitename.oracle.com/rest/v16/tasks/41372543/files/MigrationPackage_2"
        }
      ],
      "name": "MigrationPackage_2",
      "type": "application/zip"
    }
  ],
  "links": [{
      "rel": "self",
      "href": "https://sitename.oracle.com/rest/v16/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/v16/tasks/41372543/files/MigrationPackage_2
Back to Top