Community discussions

MikroTik App
 
Kobe14
just joined
Topic Author
Posts: 20
Joined: Tue Oct 14, 2014 5:15 am

API command for hotspot state

Mon May 23, 2022 3:16 am

Hi, i googled and check the docs but i cant seem to find it.
What's the API command for querying hotspot state of a host?
e.g : Authenticated / Bypassed / dynamic/ DHCP / static

The CLI command is this but i'm sure it's not the same for API.
ip hotspot host print where authorized
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7038
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: API command for hotspot state

Mon May 23, 2022 2:19 pm

You can read on how to use queries with examples here:
https://help.mikrotik.com/docs/display/ ... PI-Queries
 
Kobe14
just joined
Topic Author
Posts: 20
Joined: Tue Oct 14, 2014 5:15 am

Re: API command for hotspot state

Tue May 24, 2022 11:45 am

You can read on how to use queries with examples here:
https://help.mikrotik.com/docs/display/ ... PI-Queries
Thanks, but 2 things are still unclear
is this correct then?
/IP/hotspot/hosts/print
?type= X
?type=A or (authenticated?)
But the column name for hotspot status is blank (leftmost) so what should i put in "X" ?
Secondly i only see "print" and "set" is "count" not possible?
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7038
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: API command for hotspot state

Tue May 24, 2022 11:55 am

You can do print and see what values API exactly returns, typically for flags it is either yes or no, so something like this should work:
/ip/hotspot/hosts/print
?authenticated=yes

Who is online

Users browsing this forum: diamuxin, rextended and 25 guests