<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Ruckus Unleashed API using curl? in Unleashed</title>
    <link>https://community.ruckuswireless.com/t5/Unleashed/Ruckus-Unleashed-API-using-curl/m-p/96263#M6447</link>
    <description>&lt;P&gt;Oh great.&lt;/P&gt;&lt;P&gt;I'll be trying this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regard.&lt;/P&gt;</description>
    <pubDate>Thu, 29 Aug 2024 09:48:14 GMT</pubDate>
    <dc:creator>Jeronimo</dc:creator>
    <dc:date>2024-08-29T09:48:14Z</dc:date>
    <item>
      <title>Ruckus Unleashed API using curl?</title>
      <link>https://community.ruckuswireless.com/t5/Unleashed/Ruckus-Unleashed-API-using-curl/m-p/96251#M6441</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;I saw a API for unleashed on &lt;A href="https://github.com/commscope-ruckus/RUCKUS-Unleashed" target="_blank"&gt;https://github.com/commscope-ruckus/RUCKUS-Unleashed&lt;/A&gt;&lt;/P&gt;&lt;P&gt;But I need a bash script using curl.&lt;BR /&gt;&lt;BR /&gt;when I tried this via postman , it worked good.&lt;/P&gt;&lt;P&gt;But I tried this via curl in centos, it didn't work like below at wlan stats.&lt;/P&gt;&lt;P&gt;1) Login :&lt;/P&gt;&lt;P&gt;curl -G '&lt;A href="https://192.168.40.241/admin/login.jsp?username=admin&amp;amp;action=login.jsp&amp;amp;password=ruckus1234&amp;amp;ok=ruckus" target="_blank"&gt;https://192.168.40.241/admin/login.jsp?username=admin&amp;amp;action=login.jsp&amp;amp;password=ruckus1234&amp;amp;ok=ruckus&lt;/A&gt;' --insecure -I -s | grep CSRF_TOKEN | awk '{print $2}'&lt;/P&gt;&lt;P&gt;vxCkT3sqRh&lt;BR /&gt;-&amp;gt; It is worked.&lt;/P&gt;&lt;P&gt;2) Get wlan stats&lt;/P&gt;&lt;P&gt;curl -i -k -X POST \&lt;BR /&gt;-H "X-CSRF-Token:vxCkT3sqRh" \&lt;BR /&gt;-H "Content-Type:text/xml" \&lt;BR /&gt;-d \&lt;BR /&gt;'&amp;lt;ajax-request action=\''getstat\'' comp=\''stamgr\'' enable-gzip="0" caller="SCI"&amp;gt;&lt;BR /&gt;&amp;lt;vap INTERVAL-STATS="yes" INTERVAL-START="1604710474" INTERVAL-STOP="1605315274" LEVEL=\''1\''/&amp;gt;&lt;BR /&gt;&amp;lt;/ajax-request&amp;gt;' \&lt;BR /&gt;'&lt;A href="https://192.168.40.241/admin/_cmdstat.jsp" target="_blank"&gt;https://192.168.40.241/admin/_cmdstat.jsp&lt;/A&gt;'&lt;/P&gt;&lt;P&gt;-&amp;gt; It didn't work like below.&lt;/P&gt;&lt;P&gt;&amp;lt;html&amp;gt;&amp;lt;head&amp;gt;&amp;lt;title&amp;gt;Moved Temporarily&amp;lt;/title&amp;gt;&amp;lt;/head&amp;gt;&lt;BR /&gt;&amp;lt;body&amp;gt;&amp;lt;h1&amp;gt;Moved Temporarily&amp;lt;/h1&amp;gt;&lt;BR /&gt;&amp;lt;p&amp;gt;The document has moved &amp;lt;a href="&lt;A href="https://192.168.40.241/admin/login.jsp" target="_blank"&gt;https://192.168.40.241/admin/login.jsp&lt;/A&gt;"&amp;gt;here&amp;lt;/a&amp;gt;.&amp;lt;/p&amp;gt;&lt;BR /&gt;&amp;lt;address&amp;gt; at https:443 Port 443&amp;lt;/address&amp;gt;&amp;lt;/body&amp;gt;&lt;BR /&gt;&amp;lt;/html&amp;gt;&lt;/P&gt;&lt;P&gt;How do I apply at curl?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Aug 2024 04:34:20 GMT</pubDate>
      <guid>https://community.ruckuswireless.com/t5/Unleashed/Ruckus-Unleashed-API-using-curl/m-p/96251#M6441</guid>
      <dc:creator>Jeronimo</dc:creator>
      <dc:date>2024-08-29T04:34:20Z</dc:date>
    </item>
    <item>
      <title>Re: Ruckus Unleashed API using curl?</title>
      <link>https://community.ruckuswireless.com/t5/Unleashed/Ruckus-Unleashed-API-using-curl/m-p/96256#M6443</link>
      <description>&lt;P&gt;I have a small bash script &lt;A href="https://ms264556.net/ruckus/PfSenseLetsEncryptToRuckus" target="_self"&gt;here&lt;/A&gt; if you want to crib the useful bits (especially the logon part and keeping track of the cookies).&lt;/P&gt;&lt;P&gt;Since every Linux comes with python3 these days, you might find it easier to just write a &lt;A href="https://pypi.org/project/aioruckus/" target="_self"&gt;python script&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Aug 2024 07:30:00 GMT</pubDate>
      <guid>https://community.ruckuswireless.com/t5/Unleashed/Ruckus-Unleashed-API-using-curl/m-p/96256#M6443</guid>
      <dc:creator>ms264556</dc:creator>
      <dc:date>2024-08-29T07:30:00Z</dc:date>
    </item>
    <item>
      <title>Re: Ruckus Unleashed API using curl?</title>
      <link>https://community.ruckuswireless.com/t5/Unleashed/Ruckus-Unleashed-API-using-curl/m-p/96257#M6444</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN&gt;ms264556.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks for reply.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;But I'm not a expert for bash script.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;That's too difficult script for me. ^^;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Aug 2024 08:07:41 GMT</pubDate>
      <guid>https://community.ruckuswireless.com/t5/Unleashed/Ruckus-Unleashed-API-using-curl/m-p/96257#M6444</guid>
      <dc:creator>Jeronimo</dc:creator>
      <dc:date>2024-08-29T08:07:41Z</dc:date>
    </item>
    <item>
      <title>Re: Ruckus Unleashed API using curl?</title>
      <link>https://community.ruckuswireless.com/t5/Unleashed/Ruckus-Unleashed-API-using-curl/m-p/96258#M6445</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN&gt;ms264556.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks for reply.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;But I'm not a expert for bash script.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;That's too difficult script for me. ^^;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Aug 2024 08:23:26 GMT</pubDate>
      <guid>https://community.ruckuswireless.com/t5/Unleashed/Ruckus-Unleashed-API-using-curl/m-p/96258#M6445</guid>
      <dc:creator>Jeronimo</dc:creator>
      <dc:date>2024-08-29T08:23:26Z</dc:date>
    </item>
    <item>
      <title>Re: Ruckus Unleashed API using curl?</title>
      <link>https://community.ruckuswireless.com/t5/Unleashed/Ruckus-Unleashed-API-using-curl/m-p/96261#M6446</link>
      <description>&lt;P&gt;Well unfortunately the output is xml, so you'll need some basic bash scripting to extract out the info you want.&lt;/P&gt;&lt;P&gt;Here is a bash script which calls the wlan stats:-&lt;/P&gt;&lt;LI-CODE lang="python"&gt;ZD='192.168.40.241'
ZD_USERNAME='admin'
ZD_PASSWORD='ruckus1234'

# create a cookie jar
ZD_COOKIE=$(mktemp)

# sniff login url
ZD_LOGIN_URL="$(curl https://$ZD -k -s -L -I -o /dev/null -w '%{url_effective}')"
# login and collect token and session cookie
ZD_XSS="$(curl $ZD_LOGIN_URL -k -s -c $ZD_COOKIE  -d username=$ZD_USERNAME -d password=$ZD_PASSWORD -d ok=Log\ In -i | awk '/^HTTP_X_CSRF_TOKEN:/ { print $2 }' | tr -d '\040\011\012\015')"
ZD_CONF="$(dirname $ZD_LOGIN_URL)/_cmdstat.jsp"

# calculate the interval start and end time
INTERVAL_STOP=$(date +%s)
INTERVAL_START=$(date -d '24 hours ago' +%s)

# get wlan stats for the calculated interval
curl $ZD_CONF -H "X-CSRF-Token: $ZD_XSS" -k -s -b $ZD_COOKIE -c $ZD_COOKIE --data-raw "&amp;lt;ajax-request action=\"getstat\" comp=\"stamgr\" enable-gzip=\"0\" caller=\"SCI\"&amp;gt;&amp;lt;vap INTERVAL-STATS=\"yes\" INTERVAL-START=\"$INTERVAL_START\" INTERVAL-STOP=\"$INTERVAL_STOP\" LEVEL=\"1\"/&amp;gt;&amp;lt;/ajax-request&amp;gt;"

# remove cookie jar
rm $ZD_COOKIE&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Aug 2024 09:11:51 GMT</pubDate>
      <guid>https://community.ruckuswireless.com/t5/Unleashed/Ruckus-Unleashed-API-using-curl/m-p/96261#M6446</guid>
      <dc:creator>ms264556</dc:creator>
      <dc:date>2024-08-29T09:11:51Z</dc:date>
    </item>
    <item>
      <title>Re: Ruckus Unleashed API using curl?</title>
      <link>https://community.ruckuswireless.com/t5/Unleashed/Ruckus-Unleashed-API-using-curl/m-p/96263#M6447</link>
      <description>&lt;P&gt;Oh great.&lt;/P&gt;&lt;P&gt;I'll be trying this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regard.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Aug 2024 09:48:14 GMT</pubDate>
      <guid>https://community.ruckuswireless.com/t5/Unleashed/Ruckus-Unleashed-API-using-curl/m-p/96263#M6447</guid>
      <dc:creator>Jeronimo</dc:creator>
      <dc:date>2024-08-29T09:48:14Z</dc:date>
    </item>
    <item>
      <title>Re: Ruckus Unleashed API using curl?</title>
      <link>https://community.ruckuswireless.com/t5/Unleashed/Ruckus-Unleashed-API-using-curl/m-p/96310#M6448</link>
      <description>&lt;P&gt;Wow. It's worked perfectly.&lt;/P&gt;&lt;P&gt;Thanks Bro.&lt;/P&gt;</description>
      <pubDate>Fri, 30 Aug 2024 00:23:51 GMT</pubDate>
      <guid>https://community.ruckuswireless.com/t5/Unleashed/Ruckus-Unleashed-API-using-curl/m-p/96310#M6448</guid>
      <dc:creator>Jeronimo</dc:creator>
      <dc:date>2024-08-30T00:23:51Z</dc:date>
    </item>
    <item>
      <title>Re: Ruckus Unleashed API using curl?</title>
      <link>https://community.ruckuswireless.com/t5/Unleashed/Ruckus-Unleashed-API-using-curl/m-p/96877#M6462</link>
      <description>&lt;P&gt;;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Sep 2024 04:14:18 GMT</pubDate>
      <guid>https://community.ruckuswireless.com/t5/Unleashed/Ruckus-Unleashed-API-using-curl/m-p/96877#M6462</guid>
      <dc:creator>Jeronimo</dc:creator>
      <dc:date>2024-09-06T04:14:18Z</dc:date>
    </item>
  </channel>
</rss>

