Community discussions

MikroTik App
 
jeremycoulter
just joined
Topic Author
Posts: 5
Joined: Mon Jul 20, 2015 12:51 am

API Output fields

Tue Mar 28, 2017 9:27 am

HI.
Is there a way to specify what fields are output by the API when you call in particular "ip/hotspot/active/print"
I noticed that what was out put on an RB with ver 5.X is different to whats output by v 6.x.


Thanks, Jeremy
 
User avatar
boen_robot
Forum Guru
Forum Guru
Posts: 2400
Joined: Thu Aug 31, 2006 4:43 pm
Location: europe://Bulgaria/Plovdiv

Re: API Output fields

Tue Mar 28, 2017 11:26 am

You can filter properties by using an argument called ".proplist" (including the dot), which is a comma separated list of properties to include.

For example
/ip/hotspot/active/print
=.proplist=user,login-by
may return for example
!re
=user=user1
=login-by=cookie

!re
=user=user2
=login-by=mac
However, you can't rename properties, or include ones that are not there, so any differences between v5 and v6 are still going to be there.

Who is online

Users browsing this forum: No registered users and 9 guests