7.0 Step 4: Create a Transformation

This example shows how to create a transformation by linking a platform and a source. The request body includes the ID for the platform and the ID for the source, which you have from the responses of prior actions to Add an Azure Platform and Discover a Windows Source. The transformation contains default settings. Look at the API reference documentation under Transformations > POST to understand what parameters to include with the request body.

Method: POST

https://10.10.10.143/MigrateApi/2019.8/transformations

{
    "platformId": "82bf9b3f-075d-4513-8124-aa6400e2b870",
    "sourceId": "676a5aa3-91fa-400d-abef-cb8fc77ed83a",
    "storageLayout": "sameAsSource"
}

Here is the data that the POST method returned. The current state is "Configured". The response provides links for operations that can be performed on the transformation as well as links to configuration settings options.

Response: Data returned from POST

{
    "id": "50023e0d-91e3-4aef-b847-aa6400e4ffa2",
    "displayName": "SB-W2012-R2-STD",
    "sourceId": "676a5aa3-91fa-400d-abef-cb8fc77ed83a",
    "platformId": "82bf9b3f-075d-4513-8124-aa6400e2b870",
    "currentState": "Configured",
    "tags": null,
    "links": [
        {
            "href": "https://10.10.10.143/MigrateApi/2019.8/transformations/50023e0d-91e3-4aef-b847-aa6400e4ffa2",
            "rel": "self",
            "methods": [
                "GET"
            ]
        },
        {
            "href": "https://10.10.10.143/MigrateApi/2019.8/operations/8bf13a70-91d1-48b6-b498-aa6400e504e8",
            "rel": "lastOperation",
            "methods": [
                "GET"
            ]
        },
        {
            "href": "https://10.10.10.143/MigrateApi/2019.8/transformations/50023e0d-91e3-4aef-b847-aa6400e4ffa2?operation=Prepare",
            "rel": "operation-Prepare",
            "methods": [
                "POST"
            ]
        },
        {
            "href": "https://10.10.10.143/MigrateApi/2019.8/transformations/50023e0d-91e3-4aef-b847-aa6400e4ffa2",
            "rel": "operation-Remove",
            "methods": [
                "DEL"
            ]
        },
        {
            "href": "https://10.10.10.143/MigrateApi/2019.8/transformations/50023e0d-91e3-4aef-b847-aa6400e4ffa2/storage",
            "rel": "Storage",
            "methods": [
                "GET",
                "PUT"
            ]
        },
        {
            "href": "https://10.10.10.143/MigrateApi/2019.8/transformations/50023e0d-91e3-4aef-b847-aa6400e4ffa2/networking",
            "rel": "Networking",
            "methods": [
                "GET",
                "PUT"
            ]
        },
        {
            "href": "https://10.10.10.143/MigrateApi/2019.8/transformations/50023e0d-91e3-4aef-b847-aa6400e4ffa2/schedule",
            "rel": "Schedule",
            "methods": [
                "GET",
                "PUT"
            ]
        },
        {
            "href": "https://10.10.10.143/MigrateApi/2019.8/transformations/50023e0d-91e3-4aef-b847-aa6400e4ffa2/targetSettings",
            "rel": "TargetSettings",
            "methods": [
                "GET",
                "PUT"
            ]
        },
        {
            "href": "https://10.10.10.143/MigrateApi/2019.8/transformations/50023e0d-91e3-4aef-b847-aa6400e4ffa2/replicationSettings",
            "rel": "ReplicationSettings",
            "methods": [
                "GET",
                "PUT"
            ]
        },
        {
            "href": "https://10.10.10.143/MigrateApi/2019.8/transformations/50023e0d-91e3-4aef-b847-aa6400e4ffa2/validationResults",
            "rel": "ValidationResults",
            "methods": [
                "GET"
            ]
        }
    ]
}