cancel
Showing results for 
Search instead for 
Did you mean: 
Create Post
Level 7

API - Incidents Based on Created Date Parameters

Jump to solution

Is there no way to get a list of incidents between a date range for the date the incidents were created?

Currently it appears the only way to get a list of incidents is to basically page through all he created incidents, load them some where and then query what you want.  Am I missing something?

0 Kudos
1 Solution

Not sure if you still need this, but I use this:

 

{{base_url}}/incidents.json?created=[Select+Date+Range]&created_custom_gte=[2020-04-28T00:15:00.000000+0000]&page=1&per_page=100

I use the same method for updated_at as well.

View solution in original post

6 Replies
Level 16

Like this?

neomatrix1217_1-1587427736182.png

 

neomatrix1217_0-1587427703981.png

 

0 Kudos

Yep except it would need to work with the api.

 

Something like:

https://api.samanage.com/incidents?dateStart='01-01-2020'&dateEnd='04-20-2020'

0 Kudos

Not sure if you still need this, but I use this:

 

{{base_url}}/incidents.json?created=[Select+Date+Range]&created_custom_gte=[2020-04-28T00:15:00.000000+0000]&page=1&per_page=100

I use the same method for updated_at as well.

View solution in original post

That works, I didn't realize what you were telling me in that [Select+Date+Range] was actually directing the api to do something... little slow this morning.  I would still like to know where I could find this information.  Thanks again for your help.

0 Kudos

I found the method a couple months ago.  I think this was the forum post: 
https://help.samanage.com/s/question/0D539000069K869CAC/api-pull-incidents-updated-after-specific-da...

I also pieced my understanding of the api together from an assortment of SDKs I found on github.  The actual api documentation is a bit sparse.

In case you use python, I have a solution that connects to the api to pull data out en masse.  I use singer.io to load it elsewhere, but you could probably just use the extraction bits.  Let me know if you are interested in that.

When I use

https://api.samanage.com/hardwares.json?updated=[Select+Date+Range]&updated_custom_gte=[2020-08-30T0...

as my url for api call, it restricts the result to only 1 page. Can you please suggest how to retrieve all hardware records after a specific date if the result exceeds 100 records?

0 Kudos