Security

Reply
Occasional Contributor II
Posts: 13
Registered: ‎10-04-2016

how to query user-table via clear pass api v6.5

[ Edited ]

Via terminal, I am getting data from user-table with the following command.

show user-table | include <mac-address>

 Clear pass API version is 6.5

OS Version is 6.4

But how can I get the same information via clear pass API?

Guru Elite
Posts: 19,983
Registered: ‎03-29-2007

Re: how to query user-table via clear pass api v6.5

ClearPass does not really know what is in the user table on a controller, and it does not keep that state...

Colin Joseph
Aruba Customer Engineering

Looking for an Answer? Search the Community Knowledge Base Here: Community Knowledge Base

Validated Reference Design Guides : http://community.arubanetworks.com/t5/Validated-Reference-Design/tkb-p/Aruba-VRDs
Occasional Contributor II
Posts: 13
Registered: ‎10-04-2016

Re: how to query user-table via clear pass api v6.5

Right now, via terminal I follow these steps to clear the session on the mobility controller.

 

show user-table | include <mac address>

i will confirm whether the mac address is present as guest-logon. And then I will be deleting the mac address with the following command:

 

aaa user delete mac <mac address>

 

I am looking for an API to do these steps instead of me manually doing it on the controller.

 

Thank you!

Guru Elite
Posts: 19,983
Registered: ‎03-29-2007

Re: how to query user-table via clear pass api v6.5

You can do that with the controller xml-api here:  http://www.arubanetworks.com/techdocs/ArubaOS_65x_WebHelp/Web_Help_Index.htm#ArubaFrameStyles/XML_API/Using_the_XML_API_Server.htm 

Colin Joseph
Aruba Customer Engineering

Looking for an Answer? Search the Community Knowledge Base Here: Community Knowledge Base

Validated Reference Design Guides : http://community.arubanetworks.com/t5/Validated-Reference-Design/tkb-p/Aruba-VRDs
Guru Elite
Posts: 7,849
Registered: ‎09-08-2010

Re: how to query user-table via clear pass api v6.5

Take a look at this: https://community.arubanetworks.com/t5/Controller-Based-WLANs/How-does-the-ArubaOS-XML-API-Work/ta-p/179218


Tim Cappalli | Aruba ClearPass TME
@timcappalli | ACMX #367 / ACCX #480 / ACEAP / CWSP
Occasional Contributor II
Posts: 13
Registered: ‎10-04-2016

Re: how to query user-table via clear pass api v6.5

thank you..

Occasional Contributor II
Posts: 13
Registered: ‎10-04-2016

Re: how to query user-table via clear pass api v6.5

Hi,

I am using PHP for backend scripting. 

I have formed the xml api request with the following xml:

 

        $xml='<aruba command="user_query">

               <macaddr>xx:xx:xx:xx:xx:xx</macaddr>

               <key>key which i have created while setting the controller for xml api</key>

              <version>1.0</version>

              </aruba>';

And the curl request to get information fromthe controller are as follows:

 

       $curl = curl_init();

                       $url = "https://xx.xx.xx.xx/auth/command.xml";

                      // set URL and other appropriate options

                       curl_setopt($curl, CURLOPT_URL, $url);

                       curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type: application/xml','Authorization: Bearer key that i have generated while generating the xml api in controlller'));

                       curl_setopt($curl, CURLOPT_HEADER, 1);

                       curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY);

                       curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);

                       curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);

                       curl_setopt($curl, CURLOPT_FOLLOWLOCATION, TRUE);

                       // This sets the number of fields to post

                       curl_setopt($curl,CURLOPT_POST, sizeof($xml));

                       // This is the fields to post in the form of an array.

                       curl_setopt($curl,CURLOPT_POSTFIELDS, $xml);

 

                       //execute the post

                       $result = curl_exec($curl);

                       $info = curl_getinfo($curl);

                       curl_close($curl);

 

but I am getting "504 Gateway Time-out" error. not sure where I am going wrong.

 

can you please validate the xml and format of the xml api url pls?

 

Thank you!

Search Airheads
Showing results for 
Search instead for 
Did you mean: