Migrating Resources and Transformations Between Environments

If you are developing in multiple environments or accounts, you might need to move your VDRs and transformations from one account or environment to another. You can use the organizations APIs to do this.

Migrate Virtual Data Resources

Migrating VDRs is a two step process where you first get the VDR definition from one account or environment, and then post it to another.

Note: Sub-objects appear differently depending on how you created them, as VDRs or as My Objects in Element Mapper. If you created them with Element Mapper, they are identified by a custom type and are stored as separate objects with the same name as the type value. For example, a sub-object called address will appear in the definition as:
{
"type":"address"
"path":"address"
}
Sub-objects created as VDRs are shown in dot notation, e.g., "path": "Address.street".

To migrate VDRs:

  1. In the source account or environment, call GET /organizations/objects/{objectName}/definitions, replacing {objectName} with the name of the VDR.

    Note: Use GET /organizations/objects/definitions to get the list of all VDRs.

    If your VDR has Account level definition mappings:
    Open Platform API Docs > Account > GET/accounts/{id}/elements/{keyOrId}/transformations/{objectName}

    For Instance creation:
    Open Platform API Docs > Instance > GET/instances/{id}/objects/{objectName}/definitions

    The JSON response looks like this:

    {  
      "fields":[  
        {  
          "type":"string",
          "path":"birthdate"
        },
        {  
          "type":"string",
          "path":"FirstName"
        },
        {  
          "type":"string",
          "path":"id"
        },
        {  
          "type":"string",
          "path":"LastName"
        }
      ],
      "level":"organization"
    }
  2. Optional. If you created your VDR in an earlier version of the software, it might include a sub-object that it is stored separately. Run the call again using the name of the sub-object for {objectName}.

  3. In your target account or environment, make a POST /organizations/objects/definitions API call, replacing objectName with the name of the VDR, and the fields object with the fields object from the previous step.

{  
  "<objectName>":{  
    "fields":[  
      {  
        "type":"string",
        "path":"birthdate"
      },
      {  
        "type":"string",
        "path":"FirstName"
      },
      {  
        "type":"string",
        "path":"id"
      },
      {  
        "type":"string",
        "path":"LastName"
      }
    ]
  }
}

Migrate Transformations

Migrating transformations is a two step process where you first get the transformations definition from one account or environment, and then post it to another.

To migrate transformations:

  1. In the source account or environment, call GET /organizations/elements/{keyOrId}/transformations/{objectName}, replacing keyOrId with the element key and {objectName} with the name of the VDR.

  2. Please make the corresponding calls for Account and Instance as per GET/accounts/{id}/elements/{keyOrId}/transformations/{objectName} and GET/instances/{id}/transformations/{objectName}

    The JSON response looks like this:

    {  
      "level":"organization",
      "objectName":"myContacts_API",
      "vendorName":"Contact",
      "startDate":"2017-04-24 21:05:05.51129",
      "fields":[  
        {  
          "type":"string",
          "path":"birthdate",
          "vendorPath":"Birthdate",
          "level":"organization"
        },
        {  
          "type":"string",
          "path":"FirstName",
          "vendorPath":"FirstName",
          "level":"organization"
        },
        {  
          "type":"string",
          "path":"id",
          "vendorPath":"Id",
          "level":"organization"
        },
        {  
          "type":"string",
          "path":"LastName",
          "vendorPath":"LastName",
          "level":"organization"
        }
      ],
      "configuration":[  
        {  
          "type":"passThrough",
          "properties":{  
            "fromVendor":false,
            "toVendor":false
          }
        },
        {  
          "type":"inherit"
        }
      ],
      "isLegacy":false
    }

If you have mappings at Account and Instance please make the corresponding POST call at each level

  • In your target account or environment, make a POST /organizations/elements/{keyOrId}/transformations/{objectName} API call, replacing keyOrId with the element key and objectName with the name of the VDR. Include the JSON payload from the previous step.