Migrations

Partial export API

Using the partial-export API, we can export one or more of our projects and choose to send the package to the destination Octopus Server's package feed.

post/migrations/partialexport

Request body

DestinationApiKeystring

The API key of your destination server (Where you'll be importing this exported package)

DestinationPackageFeedstring

The destination Octopus Server base URL

DestinationPackageFeedSpaceIdstring

The ID of the Space the Destination Package Feed is located in

EncryptPackageboolean

Encrypt the contents of your migration package (Uses the Password as a shared key so this can be decrypted by your destination server). Defaults to false if not provided

FailureCallbackUristring

A webhook URL you can add if you wish to be notified on failure of the migration task (Your Octopus Server will call this URL using a GET request)

IgnoreCertificatesboolean

Excludes certificates from partial export

IgnoreDeploymentsboolean

Excludes deployments from partial export

IgnoreMachinesboolean

Excludes machines from partial export

IgnoreTenantsboolean

Excludes tenants from partial export

IncludeTaskLogsboolean

Include the task log folder as part of the export

PackageIdstring

Package Name/ID for your export (Defaults to Octopus.Space.Migration if not provided)

PackageVersionstring

SemVer package version for your export (Defaults to 1.0.0-{RandomStringGenerator.Generate(8)} if not provided)

Passwordstring required

Password to encrypt both the migration package and any sensitive values (This is the shared key between partial-export and import migrations)

Projectsstring[] required

Projects to include in the migration

SpaceIdstring
SuccessCallbackUristring

A webhook URL you can add if you wish to be notified on successful completion of the migration task (Your Octopus Server will call this URL using a GET request, appending the packageId and packageVersion to the URL as querystring parameters)

Example request

{
  "DestinationApiKey": "API-YOUR-DESTINATION-KEY",
  "DestinationPackageFeed": "https://YOUR_DESTINATION_OCTOPUS_SERVER",
  "DestinationPackageFeedSpaceId": "Spaces-1",
  "EncryptPackage": true,
  "IncludeTaskLogs": true,
  "PackageId": "MyAwesomeOctopusMigration",
  "PackageVersion": "1.0.0",
  "Password": "Demo1234",
  "Projects": [
    "Projects-1",
    "..."
  ],
  "SpaceId": "Spaces-1"
}

Response

The requested partial export task that has been queued.

DestinationApiKeystring
DestinationPackageFeedstring
DestinationPackageFeedSpaceIdstring
EncryptPackageboolean
FailureCallbackUristring
Idstring

Gets or sets a unique identifier for this resource.

IgnoreCertificatesboolean
IgnoreDeploymentsboolean
IgnoreMachinesboolean
IgnoreTenantsboolean
IncludeTaskLogsboolean
LastModifiedBystring

Gets or sets the username of the user who last modified this resource.

LastModifiedOnstring date-time

Gets or sets the date/time that this resource was last modified.

Linksobject

Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.

PackageIdstring
PackageVersionstring
Passwordstring
Projectsstring[]
SpaceIdstring
SuccessCallbackUristring
TaskIdstring

Example response

{
  "EncryptPackage": true,
  "IncludeTaskLogs": true,
  "PackageId": "MyAwesomeOctopusMigration",
  "PackageVersion": "1.0.0",
  "Projects": [
    "Projects-1"
  ],
  "SpaceId": "Spaces-1",
  "TaskId": "ServerTasks-1234"
}

Changes