How do I create a team incident report with a date range through API using the pdpyras library?

Hello PD Community,

I’m interested in querying the PD API endpoint to gather incident information by a specific team that I can use to create a bi-weekly report. The report would require the following details through PD’s REST API:

  • Team involved
  • Date Range (UTC)
  • List of ‘high’ incidents within that date range.

I’ve been working with the pdpyras library in Python and would like to pull out similar data from the following web call:[team_ids][]=ABCDEF

Can someone please explain how that would translate to pdpyras query?

Hi Nic.

I’d probably use the session.list_all() method. I don’t have exactly what you’re after, but I had something close in my stash of python junk.

1 Like

Thank you @mandi.walls!

I was uncertain as to how the parameters were set with pdpyras with the additional query details, but this clears things up for me.

I appreciate your response and support.