Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
1 year ago
Solved

Unauthorized 401 API powerbi admin activity events

Hello, I am trying to use admin activity events api to get views on reports in a workspace. I have created these following activities to provide proper api access: -Registered the api -Gave powerb...
  • v-venuppu's avatar
    1 year ago

    Hi Anonymous ,

    No, the GetActivityEvents API only supports retrieving one day of data per request.You cannot get multiple days in a single call.

    As a Workaround to get more than one day of metrics, you need to call the API repeatedly, once per day, using different startDateTime and endDateTime values for each date.

     

    If this post helps, then please consider Accepting as solution to help the other members find it more quickly.

    Thank you.

  • Anonymous's avatar
    Anonymous
    1 year ago

    Hey VE I made a python script to loop over the api call to get all events for the past 30 days as you can make 200 api calls in an hour so I am following that process and ingesting my data into azure sql db! Thank you for your help!