Query function operational

The query function works with appropriate data types and tested for
PID=30080 as on the API help page.