none
Using Rest Api's for Migrate Service RRS feed

  • Question

  • I am facing problem in using rest API's like to create migrate project. Link Followed: https://docs.microsoft.com/en-us/rest/api/migrate/projects/create. 

    Having issue in finding value for properties.customerWorkspaceId present in request body. Added Subscription id there and than had Internal Server Error.

    Are these API's supported as the migration service is updated? 
    As these Api's are for older version and we have a new version now for which API's are not present yet. 
    Note on this page: https://docs.microsoft.com/en-us/rest/api/migrate/

    Can I get the newer API's or resolution for the older Issue?

    Thursday, September 5, 2019 1:10 PM

All replies

  • Thanks for reaching out! Azure Migrate uses Service Map solution in Azure Monitor Logs for dependency visualization. To enable Service Map solution , you need log analytics workspace to be created.

    properties.customerWorkspaceId  is the log analytics workspace id

    properties.customerWorkspaceLocation  is the location of log analytics workspace

    Details of these properties (Red highlighted) can be found in log analytics as shown below figure.

    Here are few references that might help you 

    1)  Dependency Visualization

    2)  Creation of Log analytics workspace

    3) Enable service map solution

    Hope this helps!




    Thursday, September 5, 2019 4:14 PM
    Moderator
  • Thanks for the reply! After this also I am getting errors, moreover my UI is different from yours, My UI is in blue color and have different layout.

    When using direct values like: "customerWorkspaceId": "4a**",

    {
      "error": {
        "code": "LinkedInvalidPropertyId",
        "message": "Property id '4a**' at path 'properties.customerWorkspaceId' is invalid. Expect fully qualified resource Id that start with '/subscriptions/{subscriptionId}' or '/providers/{resourceProviderNamespace}/'."
      }
    }


    When using value in format "customerWorkspaceId": "/subscriptions/4a**",

    {
      "error": {
        "code": "LinkedAuthorizationFailed",
        "message": "The client has permission to perform action 'Microsoft.Resources/subscriptions/write' on scope '/subscriptions/c0ce3c5d-e074-4974-b2e6-0693621fa357/resourcegroups/Test/providers/Microsoft.Migrate/projects/testproject', however the linked subscription '4abbf4e1-1c1c-4584-a903-3f5d3ee23738' was not found. "
      }
    }



    Friday, September 6, 2019 10:56 AM
  • Apologies for late response.As per this document, we will no longer be able to create new Azure migrate projects using old API. We recommend you to create projects from azure portal as of now. For more information, i will check internally with Azure Migrate Technical team and provide you an update on this.
    Tuesday, September 10, 2019 9:45 AM
    Moderator
  • We recommend you to create migrate projects via Azure portal. The newer version of API will be available soon.

    However, if you want to create the project using older version. Please note Azure Migrate currently supports creation of OMS workspace in East US, Southeast Asia and West Europe regions. If the workspace is created outside of Azure Migrate in any other region, it currently cannot be associated with an Azure Migrate project.

    Here is the request body i have used to create migrate project.

    {
      "properties": {
        "customerWorkspaceId": "/subscriptions/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/resourcegroups/rgname/providers/Microsoft.OperationalInsights/workspaces/wsname",
        "customerWorkspaceLocation": "West Europe"
      },
      "id": "/subscriptions/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/resourceGroups/swdhanwa-Management_Migration/providers/Microsoft.Migrate/projects/swmigration",
      "name": "swmigration",
      "type": "Microsoft.Migrate/projects",
      "eTag": "*",
      "location": "West Europe",
      "tags": {}
    }
    

    Tuesday, September 24, 2019 4:23 AM
    Moderator