locked
Automation REST apis not working RRS feed

  • Question

  • Automation apis for creating runbook and automation account not working. Please check the links:

    https://msdn.microsoft.com/en-us/library/azure/mt674569.aspx

    https://msdn.microsoft.com/en-us/library/azure/mt674482.aspx

    The error i got:

    1. Creation of runbook

    -----------------------------

    Response Message
    Bad Request

    Response Body
    stdClass Object
    (
        [code] => BadRequest
        [message] => {"Message":"Invalid argument specified. Argument content cannot be null."}
    )

    2. Creation of automation account

    ----------------------------------------------

    Response code
    404

    Response Message
    Not Found
    Response Body
    stdClass Object
    (
        [message] => No HTTP resource was found that matches the request URI 'https://management.azure.com/subscriptions/7ab02383-4402-4ad2-9920-f99146cf7fcf/resourceGroup/AzureCloudTest/providers/Microsoft.Automation/automationAccounts/testshilpaaccount?api-version=2015-11-01'.
    )

    Thursday, January 12, 2017 10:45 AM

Answers

  • Hi,

     Thanks for checking my issue. I found out where the problem is. It was a spelling mistake. For "resourceGroups", it was given as "resourceGroup" in api doc and for "providers" in  api doc, i was given as "provider" in my request. By updating the api with correct parameters, "resourceGroups" and "providers", the problem got solved. And i got the response. Anyway great thanks for checking my issue....

    • Marked as answer by Shilpawork Monday, January 16, 2017 12:05 PM
    Monday, January 16, 2017 12:04 PM

All replies

  • Could anyone please check and provide me a solution..... Thanks in advance...
    Thursday, January 12, 2017 10:46 AM
  • Greetings!

    Thank you for contacting Microsoft forums.

    The query posted by you has not reached the right forum. In order to assist best on your query, I am moving the query to the right forum.

    This will assist you with a faster reply to your query.

    In the meantime, you may check the following links which may help:

    https://docs.microsoft.com/en-us/azure/automation/automation-webhooks#using-a-webhook

    Troubleshoot Azure Automation

    Create a new Automation Account from the Azure Portal

    Regards,
    Ajay

    ---------------------------------------------------------------------------------------------------

    Kindly click "Mark as Answer" on the post that helps you, this can be beneficial to other community members reading the thread and ‘Vote as Helpful’

    Friday, January 13, 2017 10:23 AM
  • Please try using "?api-version=2015-10-31" in your URL
    • Proposed as answer by Brandon [MSFT] Friday, January 13, 2017 8:16 PM
    Friday, January 13, 2017 7:13 PM
  • Hi,

      ?api-version=2015-10-31 doesn't work... It is showing that api version as invalid and listing some other api versions. "2015-11-01" comes in that list. But even after using that, i got result as error: "message=No HTTP resource was found that matches the request URI 'https://management.azure.com/subscriptions/subscriptionid/resourceGroup/resourcegroupname/providers/Microsoft.Automation/automationAccounts/testshilpaaccount?api-version=2015-01-01'.

    Can you please test the creation of runbook and automation account api once...

    https://msdn.microsoft.com/en-us/library/azure/mt674569.aspx

    https://msdn.microsoft.com/en-us/library/azure/mt674482.aspx

    Hoping to find a solution soon....

    Monday, January 16, 2017 4:56 AM
  • Hi,

     Thanks for checking my issue. I found out where the problem is. It was a spelling mistake. For "resourceGroups", it was given as "resourceGroup" in api doc and for "providers" in  api doc, i was given as "provider" in my request. By updating the api with correct parameters, "resourceGroups" and "providers", the problem got solved. And i got the response. Anyway great thanks for checking my issue....

    • Marked as answer by Shilpawork Monday, January 16, 2017 12:05 PM
    Monday, January 16, 2017 12:04 PM