cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to pass array for includedEventTypes

SOLVED
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

Accepted Solutions
Highlighted
Meraki Employee

Re: How to pass array for includedEventTypes

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
Highlighted
Meraki Employee

Re: How to pass array for includedEventTypes

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

Highlighted
Getting noticed

Re: How to pass array for includedEventTypes

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

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.