Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago

Get activityevents - Filter out ExportActivityEvents

Hello,

 

I'm using the Power BI ActivityEvents Rest API to fetch audit events from my platform and I'd like to filter out the ExportActivityEvents. Is it possible to do it directly with the request GET https://api.powerbi.com/v1.0/myorg/admin/activityevents ?

 

If not, can I specify multiple Activities to filter the events I need ? I tried this filter without success $filter=Activity eq 'ViewDashBoard,ViewUsageMetrics' .
Looking at the documentation it seems that you can only filter by one Activity.

 

Thanks,

Simon.

3 Replies

  • v-lionel-msft's avatar
    v-lionel-msft
    Community Support

    Hi Anonymous ,

     

    Operations available in the audit and activity logs 

     

    "Is it possible to do it directly with the request GET"

    This should not be possible, you may try this.

    $filter=Activity eq 'ExportDataflow' or Activity eq 'ExportReport' or Activity eq 'ExportTile' .

     

    Best regards,
    Lionel Chen

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

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi v-lionel-msft 

     

    Thanks for your reply.

     

    I've tried to use the or operator but it seems that it is not supported by the API.

    I got a 400 with this error message:

    "Logical operator 'Or' is not allowed. To allow it, set the 'AllowedLogicalOperators' property on EnableQueryAttribute or QueryValidationSettings."

     

    Best regards,

    Simon. 

  • nlevine's avatar
    nlevine
    Regular Visitor

    Did anyone get a resolution, if I try $filter=Activity eq 'EditReport' or Activity eq 'CreateReport' I get "'Or' is not allowed. To allow it, set the 'AllowedLogicalOperators' property on EnableQueryAttribute or QueryValidationSettings"