Table Of Contents

Migratable

This type allows the provider and resellers to migrate subscriptions between accounts.

The Migratable schema: download

{
    "apsVersion": "2.0",
    "name": "SubscriptionMigratable",
    "id": "http://aps-standard.org/types/core/subscription/migratable/1.0",
    "operations": {
        "migrationPreCheck": {
            "path": "/migrationPreCheck",
            "verb": "POST",
            "response": { "type": "MigrationPreCheckResult" },
            "parameters": { "body": { "kind": "body", "type": "MigrationSet" } }
        }
    },
    "structures": {
        "MigrationSet": {
            "type": "object",
            "properties": {
                "targetAccount": {
                    "type": "string",
                    "required": true
                }
            }
        },
        "MigrationPreCheckResult": {
            "type": "object",
            "properties": {
                "canMigrate": {
                    "type": "boolean",
                    "required": true,
                    "description": "True if migration is allowed"
                },
                "message": {
                    "type": "string",
                    "description": "This string will be shown to user in case if migration is not possible"
                }
            }
        }
    }
}

When the provider initiates migration of a subscription from the current subscriber to another, the APS controller calls the migrationPreCheck method at the resource that implements the Migratable type in this subscription. This method returns a structure that either allows the system to proceed with the migration or not.

The migrationPreCheck method accepts the MigrationSet structure in the message body that specifies APS ID of the target account resource. It returns the MigrationPreCheckResult structure containing two properties:

  • canMigrate is mandatory. It specifies if the migration is allowed (true) or not (false).

  • If migration is not allowed, the message property is a string that the system will display on the screen.

To enable subscription migration, the resource implementing the subscription service type must also implement the migratable type.