none
How can I page all the results when I exceed the query limit? RRS feed

  • Question

  • Greetings,

    I am developing a script in Python where I make requests to the REST API of Log Analytics (https://dev.loganalytics.io/documentation/overview), with the intention of getting all the results. 

    How can I access these results when the query limit is exceeded?

    For example, if I would like to get all the activity on the last day by using the query: " AzureActivity | where TimeGenerated > ago(24h) ".

    How can I see all the results when I know that the limit is exceeded?

    Thank you very much. 

    • Moved by litdev Tuesday, June 12, 2018 11:40 AM
    Tuesday, June 12, 2018 10:18 AM

Answers

All replies

  • Small Basic <> Python

    Try to find a Python forum to ask your question.


    Jan [ WhTurner ] The Netherlands

    Tuesday, June 12, 2018 11:41 AM
  • Hello,

    you should ask here: https://www.python.org/community/forums/

    Regards, Guido

    Tuesday, June 12, 2018 12:02 PM
    Moderator
  • or also ask for help over here.

    https://github.com/Microsoft/PTVS/issues

     

     



    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows Server] Datacenter Management

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.

    Tuesday, June 12, 2018 12:34 PM
    Moderator
  • First of all, thanks for the quick response.

    I will also ask in the Python forum, but I do not know if I have expressed myself correctly, so I am sorry to insist. 

    As I understand it, the limit of rows in the response to a query is 500,000. If I make a request to the API, with a query like the previous example: 

    " AzureActivity | where TimeGenerated > ago(24h) "

    If the answer contained for example 500100 rows, how could I access all the content? 

    I cannot see in the response to the request fields such as "next link" or"@odata" or similar fields to link the pagination.

    I thought this iteration of results corresponded to the API, that's why I insisted. 

    Greetings and sorry for the inconvenience.

    Tuesday, June 12, 2018 1:23 PM
  • I will also ask in the Python forum, but I do not know if I have expressed myself correctly, so I am sorry to insist. 

    You asked in small basic forum. Since off topic your post was moved to "where is" forum for direction on where best to ask questions. So I'd ask in the linked forums for further help.

     

     



    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows Server] Datacenter Management

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.

    Tuesday, June 12, 2018 1:36 PM
    Moderator