I was trying to us the sample code on github, but I keep getting an empty set when try to search for the active sessions (even though the count value returned is 151).
I pulled out the code into my script, and can reproduce the issue
Here is the Request I'm sending:
https://clrpass-e-1-m.its.uiowa.edu:443/api/session?filter={"mac_address":"20ab375a1c4f"}&sort=-id&offset=0&limit=1&calculate_count=true
Here is the json I'm receiving:
{
"count":151,
"_links":{
"self":{
"href":"https://clrpass-e-1-m.its.uiowa.edu/api/session?calculate_count=true&offset=0&limit=1&sort=-id&filter=%7B%22mac_address%22%3A%2220ab375a1c4f%22%7D"
},
"first":{
"href":"https://clrpass-e-1-m.its.uiowa.edu/api/session?calculate_count=true&offset=0&limit=1&sort=-id&filter=%7B%22mac_address%22%3A%2220ab375a1c4f%22%7D"
},
"next":{
"href":"https://clrpass-e-1-m.its.uiowa.edu/api/session?calculate_count=true&offset=1&limit=1&sort=-id&filter=%7B%22mac_address%22%3A%2220ab375a1c4f%22%7D"
},
"last":{
"href":"https://clrpass-e-1-m.its.uiowa.edu/api/session?calculate_count=true&offset=150&limit=1&sort=-id&filter=%7B%22mac_address%22%3A%2220ab375a1c4f%22%7D"
}
},
"_embedded":{
"items":[]
}
}
As you can see the items array is empty, even though the count calcuated is 151.
I'm sure I'm missing something obvious, but I can't figure it out.
Thanks!
-Neil