List Subscription Operations is not returning anything

Unanswered List Subscription Operations is not returning anything

All Replies

  • Wednesday, April 25, 2012 10:38 PM
     
     
    What values are you passing to the call?

    Don Glover: AzureDocGuy

  • Thursday, April 26, 2012 8:34 AM
    Moderator
     
     

    Hi,

    How do you get Subscription operation? With REST API? Refer to this article:

    http://msdn.microsoft.com/en-us/library/gg715318.aspx

    The subscription ID, start time and end time is required, try to replace your information and have a try, for example:

    https://management.core.windows.net/XXX-XXXX-XXXX-XXXXX/operations?StartTime=2012-01-01&EndTime=2012-04-26

    Hope this helps.


    Please mark the replies as answers if they help or unmark if not. If you have any feedback about my replies, please contact msdnmg@microsoft.com Microsoft One Code Framework

  • Thursday, April 26, 2012 3:27 PM
     
     

    I tried this https://management.core.windows.net/XXX-XXXX-XXXX-XXXXX/operations?StartTime=2012-01-01&EndTime=2012-04-26 but got null. Added the required header(x-ms-version) with a value of "2011-06-01"

    A big range like StartTime=2012-01-01&EndTime=2012-04-26 always returns null.

    A small range like StartTime=2012-04-01&EndTime=2012-04-02  returns the following:

    <SubscriptionOperationCollection xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
      <SubscriptionOperations />
    </SubscriptionOperationCollection>

  • Friday, April 27, 2012 2:44 AM
    Moderator
     
     

    Hi,

    Note: "This parameter cannot indicate a start date of more than 90 days in the past. " in the StartTime=<start-of-timeframe> of the link i give you, it seems that you can not retrieve older than 3 months logs, so i guess you will get null, and about the second situation, perhaps your Azure account does not record any operations you have done, so it's only returns some blank response body, try to use your subscription (for example, add some certificate in Azure mangement Portal), then have a try with StartTime=2012-04-26&EndTime=2012-04-27.

    Hope this helps. 


    Please mark the replies as answers if they help or unmark if not. If you have any feedback about my replies, please contact msdnmg@microsoft.com Microsoft One Code Framework

  • Monday, April 30, 2012 5:09 PM
     
     

    Thanks Arwind...the use case you described worked. However, I am seeing sporadic behavior; the dates below are not older than 3 months but i still get null

    string startDate = "2012-04-16T02:30:00Z";
    string endDate = "2012-04-16T22:30:00Z";

    What are the scenarios when I would get null? cannot really count on the sporadic behavior....

  • Tuesday, May 01, 2012 3:56 AM
    Moderator
     
     

    Hi,

    I am trying to involve someone familiar with this topic to further look at this issue. There might be some time delay.
     
    Appreciate your patience.


    Please mark the replies as answers if they help or unmark if not. If you have any feedback about my replies, please contact msdnmg@microsoft.com Microsoft One Code Framework

  • Wednesday, May 02, 2012 3:50 AM
     
     

    Hi RucheeG,

    Do you perform any subscription operation during that period?

    string startDate = "2012-04-16T02:30:00Z";
    string endDate = "2012-04-16T22:30:00Z";

    If not, it will return the null result.

    You may check any exist operation during 3 month, then you can make sure anything happen at the specified time frame.

    We have demo sample code to list Host service, you may apply the same code logical in your application.

    Code Quick Start: Create a console application that lists your Windows Azure hosted services
    http://msdn.microsoft.com/en-us/library/gg651127.aspx

    Thanks

    Leo Lin

  • Wednesday, May 02, 2012 4:22 PM
     
     

    Hi Leo,

    Thanks for your response.

    First of all, there is no issue with making a call to Azure REST API - I am very well able to make call to about 15 methods so I dont think I need to go through you demo sample.

    Secondly,

    if there is no data would it not return me the following instead of null. null seems to me like an undhandled excpetion getting thrown at your end :

    <SubscriptionOperationCollection xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
      <SubscriptionOperations />
    < /SubscriptionOperationCollection>

    As far as any operations being perfomed or not in that date range, let me give you this scenario:

    I get 39 operations for 4/9/2012 - 4/10/2012 and 9 operations for 4/27/2012 - 4/30/2012. But when I use 4/1/2012 - 4/30/2012 i get null instead of 48+ as excpected. How will you explain this behavior?

    Thanks,

    Ruchi

  • Friday, May 04, 2012 9:28 AM
     
     

    Hi Ruchi,

    Can you share your subscription ID and some result you get from  4/27/2012 - 4/30/2012

    I will check any server side issue

    Thanks

    Leo Lin

  • Friday, May 04, 2012 9:57 AM
     
     

    By the way, do you try to add <opaque-continuation-token> for the query?

    Leo Lin

  • Tuesday, June 19, 2012 8:58 PM
     
     

    Hi Jian,

    I was hoping that this API will be fixed in June 7th release but it's still broken. Can you shed any light on this? It still shows the same behavior as descibed above.

    Thanks,

    Ruchi