Editing startingBefore and endingAfter when searching for events

JacobH
Conversationalist

Editing startingBefore and endingAfter when searching for events

Hey guys, I'm relatively new here. I'm trying to use Python to search for events with the Meraki API. I know it says it is not recommended to do so, but I am trying to refine searches using startingBefore and endingAfter but it is currently not working. How do I go about this?

Cheers.

2 Replies 2
david_n_m_bond
Building a reputation

You can't (I also need this).

 

You just have to do an initial query (say, a page of 100 items) and then the response will give you the information you need to page backwards through the events until they have sent you too many.

 

It seems obvious that the sensible thing would be to add event time range support.

 

It's a pity that there's no way here to submit a feature request to Meraki.

 

Author, https://www.nuget.org/packages/Meraki.Api/
sungod
Head in the Cloud

In general, the API call support for grabbing data for a specific time period is inconsistent, in some cases absent..

 

For events, I just grab the lot and iterate through with...

 

if event['occurredAt'] >= starttime and event['occurredAt'] <= endtime:

    do something

 

...to get events for the time period I want.

 

Forty years ago I was tweaking every line of assembler and using tricks to save CPU cycles, this just makes me feel dirty.

 

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.