cancel
Showing results for 
Search instead for 
Did you mean: 

Unleashed API

ms
New Contributor II

Is there published or unpublished API for Unleashed?

I'm looking for the MACs from cli command "show current-active-clients all". 

1 ACCEPTED SOLUTION

mmMOLINARI
RUCKUS Team Member

Totally agree. I just created a new repo on GitHub and added the Unleashed postman collection: https://github.com/commscope-ruckus/RUCKUS-Unleashed

You start with the call to login using the unleashed credentials, then retrieve a CSRF token, and use it in the header for subsequent calls.

 

 

View solution in original post

22 REPLIES 22

mmMOLINARI
RUCKUS Team Member

the endpoints for ZD are a little different. I will create another repo with the ZD collection

My pull updated all the requests so they work on Unleashed, ZD 9.x & ZD 10.x endpoints.

If you keep the ZoneDirector & Unleashed repos split...

  • Maybe add a note to the ZoneDirector readme that ZD 9.x users need to use the Unleashed repo (or find-replace admin10 > admin before importing the workspace).
  • The 2 initial steps (logon & get csrf) can be combined: turn off 'automatically follow redirects' for the logon request, and the login response headers include the csrf token.
  • The ZoneDirector repo has some extra requests (e.g. client list, wlan stats 2) which are also useful for Unleashed and can be converted over.

Jeronimo
New Contributor III

Hi.

 

I need a bash script using curl.

 

when I tried this via postman , it worked good.

But I tried this via curl in centos, it didn't work like below at wlan stats.

 

1) Login :

curl -G 'https://192.168.40.241/admin/login.jsp?username=admin&action=login.jsp&password=ruckus1234&ok=ruckus' --insecure -I -s | grep CSRF_TOKEN | awk '{print $2}'

vxCkT3sqRh
-> It is worked.

2) Get wlan stats

curl -i -k -X POST \
-H "X-CSRF-Token:vxCkT3sqRh" \
-H "Content-Type:text/xml" \
-d \
'<ajax-request action=\''getstat\'' comp=\''stamgr\'' enable-gzip="0" caller="SCI">
<vap INTERVAL-STATS="yes" INTERVAL-START="1604710474" INTERVAL-STOP="1605315274" LEVEL=\''1\''/>
</ajax-request>' \
'https://192.168.40.241/admin/_cmdstat.jsp'

-> It didn't work like below.

<html><head><title>Moved Temporarily</title></head>
<body><h1>Moved Temporarily</h1>
<p>The document has moved <a href="https://192.168.40.241/admin/login.jsp">here</a>.</p>
<address> at https:443 Port 443</address></body>
</html>

How do I apply at curl?

ms
New Contributor II

Amazing!  I’ll have a look. 

mmMOLINARI
RUCKUS Team Member

I uploaded a ZD 1200 collection to this repository: https://github.com/commscope-ruckus/RUCKUS-Zone-Director