Retrieve hotspot active users via API

Hi

I’m trying to grab hotspot active users via the API

I would normally use /ip/hotspot/active/print count-only, but can’t figure a cURL API call to replicate

Tried the following:

curl -k -u admin:password http://10.8.0.66/rest/ip/hotspot/active/print.proplist=count-only

curl -k -u admin:password http://10.8.0.66/rest/ip/hotspot/active/print\
–data ‘{“_proplist”: [“count-only”]}’ -H “content-type: application/json”

curl -k -u admin:password http://10.8.0.66/rest/ip/hotspot/active/print/count-only

But all return {“detail”:“no such command”,“error”:400,“message”:“Bad Request”}

Any advice well appreciated.

(PS I know http method is insecure, but I am requesting over my TLS OpenVPN connex)

Thanks

# Unix
curl -k -u admin:password http://10.8.0.66/rest/ip/hotspot/active/print\
 -X POST --data '{"count-only": ""}' -H "content-type: application/json"

# Win
curl -k -u admin:password http://10.8.0.66/rest/ip/hotspot/active/print\
 -X POST --data "{\"count-only\": \"\"}" -H "content-type: application/json"

Thanks Zainarbani,

That works PERFECTLY!

Daniel