How to pass array for includedEventTypes

SOLVED
boomi
Getting noticed

How to pass array for includedEventTypes

Not quite sure how to do this, I would like to specifiy "vrrp" and "dhcp" as the included event types. I would have thought that this is correct, but it returns nothing, as if it's interpreting it as the string literal 'vrrp,dhcp':

 

{{API}}/networks/{{netID}}/events?includedEventTypes[]=vrrp,dhcp&productType=appliance

 

If I try the following instead, it applies the last filter only (dhcp):

 

{{API}}/networks/{{netID}}/events?includedEventTypes[]=vrrp&productType=appliance&includedEventTypes[]=dhcp

 

I also tried moving the productType to the end, and including it after each event type, just in case it mattered. 

 

I have verified that both vrrp and dhcp return events when specified alone.

1 ACCEPTED SOLUTION
chengineer
Meraki Alumni (Retired)

Your second request there has the correct format (the positions of the parameters do not matter), but you may need to also include perPage so you do not miss any events of a second category that are on a different page.

 

This works for me:

https://n7.meraki.com/api/v1/networks/L_566890603095268587/events?includedEventTypes[]=vrrp&productT...
Screen Shot 2020-06-27 at 10.55.19.png

Solutions Architect @ Cisco Meraki | API & Developer Ecosystem

View solution in original post

2 REPLIES 2
chengineer
Meraki Alumni (Retired)

Your second request there has the correct format (the positions of the parameters do not matter), but you may need to also include perPage so you do not miss any events of a second category that are on a different page.

 

This works for me:

https://n7.meraki.com/api/v1/networks/L_566890603095268587/events?includedEventTypes[]=vrrp&productT...
Screen Shot 2020-06-27 at 10.55.19.png

Solutions Architect @ Cisco Meraki | API & Developer Ecosystem

View solution in original post

Yep, that was it, I forgot about the pagination. Thanks!

Get notified when there are additional replies to this discussion.
Welcome to the Meraki Community!
To start contributing, simply sign in with your Cisco account. If you don't yet have a Cisco account, you can sign up.