2.3 Exploring Migrate Resources

The list of resources on the Migrate API landing page is only the beginning. You can navigate the interface to learn more information about the resources, available methods to perform on them, and operations and relationships for them.

2.3.1 Method Details for a Simple Request

Click a method to expand the reference and view more details about it.

For example, Figure 2-3 shows details for Platforms > GET.

Figure 2-3 Details for Platforms > GET Method

In the Responses panel, you can click the following options to get more information:

Example Value

Click Example Value to view example data as it might appear in the code.

Schema

Click Schema to view the schema for the object model.

2.3.2 Method Details If a Request Body Can Accept Multiple Data Types

If a method accepts multiple data types in a request body, the Request Body panel displays acceptable schema definitions. If you click Example Value, no information displays.

For example, Figure 2-4 displays details for Platforms > POST. It identifies fields and values that you can use in the request body. The Example Value panel is empty. A superscripted key word in red font next to the Request Body title indicates if the request body content is required or optional.

Figure 2-4 Details for Platforms > POST Method

You can click Schema to get information about what data the method accepts. You can expand a platform type to view the model for fields and values to include in the request body. A red asterisk (*) next to the field indicates that it is required.

For example, Figure 2-5 shows the platform type with information about its fields and values to specify in a request body.

Figure 2-5 Details for Platforms > POST > Schema

The schema definition for AddPlatformAzureCloud indicates what information is needed to add a new Azure location to the Migrate Server. The POST request body would be similar to the following:

{
    "username": "username@accountname.onmicrosoft.com",
    "password": "Azure password goes here",
    "type": "AddPlatformAzureCloud",
    "azureCloudName": "AzureCloud",
    "locationName": "centralus",
    "subscriptionId": "Subscription id goes here",
    "applicationId": "Application id goes here"
}

NOTE:The apiEndpoint, authenticationEndpoint, and storageEndpointSuffix fields are optional (nullable). They correspond to an AzureCustom value for azureCloudName. They are intentionally excluded in this example because custom Azure clouds are currently not supported in the PlateSpin Migrate Web Interface.

2.3.3 Method Details If a Request Can Return Multiple Types

If a method can return multiple types, the Example Data panel and the Schema panel are not included with the API reference documentation.

For example, Figure 2-6 shows the documentation for request to get information about a specified platform.

Figure 2-6 Details for Platforms > GET > Platform ID