Table Of Contents

Previous topic

Query Reports

Next topic

Submitting Reports

This Page

Filtering Reports

This section descripts the filters, or query parameters, that are available to fine tune your mPING request results.

Filters can be chained together using the & symbol to create powerful filtering capabilities.

ALL obtime FILTERS USE FORMAT YYYY-MM-DD HH:MM:SS AND ARE UTC

Filters

description

case insensitive filter for Description name

/mping/api/v2/reports?description=1.50

description_contains

case insensitive filter looking for text in a Description name

/mping/api/v2/reports?description_contains=branch

category

case insensitive filter for Category name

/mping/api/v2/reports?category=Hail

category_contains

case insensitive filter looking for text in a Category name

/mping/api/v2/reports?category_contains=damage

obtime

filter reports with a specific datetime stamp

/mping/api/v2/reports?obtime=2012-02-20 03:00:00

obtime_gte/obtime_gt

filter greater then or equal to/greater than the specified obtime

/mping/api/v2/reports?obtime_gte=2012-02-20 03:00:00

Will return all reports with obtime greater than or equal to Feb 2nd, 2012 0300Z

obtime_lte/obtime_lt

filter less then or equal to/less than the specified obtime

/mping/api/v2/reports?obtime_Lte=2012-02-20 03:00:00

Will return all reports with obtime less than or equal to Feb 2nd, 2012 0300Z

year

return all reports in specified year YYYY

/mping/api/v2/reports?year=2012

month

return all reports in specified month MM

/mping/api/v2/reports?month=5

day

return all reports on specified day of the month DD

/mping/api/v2/reports?day=2

hour

return all reports with a specified hour HH

/mping/api/v2/reports?hour=12

minute

return all reports with a specified minute MM

/mping/api/v2/reports?minute=15

olddbpk

(Internal Use for Legacy Research) return the report with the specified pk from old database (Winter2012)

/mping/api/v2/reports?olddbpk=1026

Spatial Filters

geom__within

all reports within the supplied geometry (WKT, HEXEWKB, WKB (in a buffer), and GeoJSON format)

/mping/api/v2/reports?geom_within=POLYGON((-100.55 30.05,-98.6 40.39,-81.56 39.92,-81.56 29.95,-100.55 30.05))

in_bbox

all reports within supplied bounding box

/mping/api/v2/reports?in_bbox=-90.0,29.5,-89.0,35.5

distance from point

all reports within X meters (approximate) of point

/mping/api/v2/reports?dist=4000&point=-97.44,35.22

Will return all reports with 4000m (4km) of Norman,OK

tile

filter reports by TMS tile address tile=zoom/x/y

/mping/api/v2/reports?tile=8/100/200

Will return all reports with 4000m (4km) of Norman,OK

Chaining Filters

Chain year and month

Here is an example that will return all of the reports in the month of May in the year 2013.

/mping/api/v2/reports?year=2013&month=5

Chain category and month

This example would return all of the Hail reports in the month of May.

/mping/api/v2/reports?category=hail&month=5