Legacy Dev Forum Posts

 View Only

Sign Up

  • 1.  Audit Api Query Reponse

    Posted 06-05-2025 18:19

    TestUser1 | 2021-05-16 18:49:36 UTC | #1

    Hi Team,

    We have been using " /api/v2/audits/query/{transactionId}/results" api to get the results of who listened to the recording. We have used same api and developed the python code to get the auditing results.

    In this api "getauditsquerytransactionid_results()" we are passing transaction ID and pagesize =2000 in the request field and we were getting all the data in a single page . However, since few days ago we could see that we are not getting whole data in a single page which we used to get earlier. Has there been any change? If yes, How can we get all the data using python code in a single page ?


    anon11147534 | 2021-05-17 11:15:07 UTC | #2

    Hi,

    This is most likely because there are too many results for a single page. You should be getting a cursor value in the response when this happens. You will have to pass the cursor value into subsequent calls to get_audits_query_transaction_id_results() as a keyword argument in order to page through the results. When there are no further pages of data, the response will not have a cursor.


    TestUser1 | 2021-05-17 11:20:35 UTC | #3

    Hi Ronan,

    Earlier we were not using cursor in the python code and just we used page_size =2000 , we were getting all the datas. Has there been any change?

    I looked into the cursor option as well. This cursor input is not required for the first page. But for the subsequent page we need to pass the cursor. I tried this logic in the code but I am getting this error. cursor = ""

    • apiresponse3 = apiinstance.getauditsquerytransactionidresults(transactionid,page_size = 2000, cursor = cursor )*
    • cursor = api_response3.cursor*
    • while cursor in api_response3 :*
    • apiresponse3 = apiinstance.getauditsquerytransactionidresults(transactionid,page_size = 2000, cursor = cursor )*

    Error:- while cursor in api_response3 : TypeError: argument of type 'AuditQueryExecutionResultsResponse' is not iterable

    Can you help me how to achieve this?


    anon11147534 | 2021-05-17 11:28:26 UTC | #4

    If there are more than 2000 results then it will return more than one page of results.

    You should only use a cursor value for subsequent pages if a response contains a cursor value.

    You can't iterate on that response type. You'll have to apply different logic to page through the results.


    TestUser1 | 2021-05-18 10:59:07 UTC | #5

    Hi Ronan,

    It's only returning 500 results even though page_size = 2000. Actually this code was working properly till May 1st and we were getting all the datas even till pagesize 2000. My question is has there been any kind of change in the API response that limited the pageSize?


    anon11147534 | 2021-05-17 12:42:07 UTC | #6

    It appears that the page size is limited to a maximum of 500 now. If this has been a recent change, it's possible that it wasn't announced because it wasn't considered a "breaking change" by the development team.


    Becky_Powell | 2021-05-17 13:06:53 UTC | #8

    Hi there - I have spoken with the service team who owns this API and they have informed me that the page limit for this API has always been 500.

    If you are experiencing an unexpected behavior change, may I ask you to please report this issue to Customer Care so that they may investigate it through the proper channels and under SLA? Thank you!

    Becky Powell Director, Product Management


    TestUser1 | 2021-05-17 13:09:23 UTC | #10

    Thank You for quick response


    system | 2021-06-17 13:09:26 UTC | #11

    This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.


    This post was migrated from the old Developer Forum.

    ref: 10931