<?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 VSZ-E API have some example or suggest? in SmartZone and Virtual SmartZone</title>
    <link>https://community.ruckuswireless.com/t5/SmartZone-and-Virtual-SmartZone/Ruckus-VSZ-E-API-have-some-example-or-suggest/m-p/13016#M622</link>
    <description>Because I've just spent _way_ to much time trying to do this in powershell, I figured I'd share a working powershell example&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&lt;PRE alt="" name="" rel="" target="" title="" type="" value=""&gt;# Queries vSZ controllers using powershell&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;$UrlBase = "&lt;A alt="" href="https://vsz:8443/wsg/api/public"&gt;https://vsz:8443/wsg/api/public"&lt;/A&gt;;&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;$apiVer = "v8_0"&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;$Body = [pscustomobject]@{&amp;nbsp;&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;username = 'admin'&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;password = 'admin'&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;timeZoneUtcOffset = "+08:00"&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;}&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;$json = $Body | ConvertTo-Json&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;$session = Invoke-WebRequest -Uri $UrlBase/$apiVer/session -Method Post -Body $json -ContentType 'application/json' -SessionVariable websession&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;# Translate Cookie header into useable string&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;$stringCookie = [string]$session.Headers["Set-Cookie"]&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;$cookie = $stringCookie.substring(0,($stringCookie.length - 21))&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;# Add cookie to header&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;$headers = @{}&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;$headers.Add("Cookie",$cookie)&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;Invoke-RestMethod -Uri $UrlBase/$apiVer/session -Method GET -Headers $headers -ContentType 'application/json' -WebSession $websession&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;Invoke-RestMethod -Uri $UrlBase/apiInfo -Method GET -Headers $headers -ContentType 'application/json' -WebSession $websession&lt;/PRE&gt;			&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;</description>
    <pubDate>Mon, 10 Jun 2019 00:58:08 GMT</pubDate>
    <dc:creator>dave_watkins_74</dc:creator>
    <dc:date>2019-06-10T00:58:08Z</dc:date>
    <item>
      <title>Ruckus VSZ-E API have some example or suggest?</title>
      <link>https://community.ruckuswireless.com/t5/SmartZone-and-Virtual-SmartZone/Ruckus-VSZ-E-API-have-some-example-or-suggest/m-p/13010#M616</link>
      <description>I want to make a program use Ruckus VSZ-E API on controller that can auto change guest-ssid password.&lt;BR /&gt;Have some example or suggest?</description>
      <pubDate>Wed, 27 Sep 2017 05:47:43 GMT</pubDate>
      <guid>https://community.ruckuswireless.com/t5/SmartZone-and-Virtual-SmartZone/Ruckus-VSZ-E-API-have-some-example-or-suggest/m-p/13010#M616</guid>
      <dc:creator>ask_eye</dc:creator>
      <dc:date>2017-09-27T05:47:43Z</dc:date>
    </item>
    <item>
      <title>Re: Ruckus VSZ-E API have some example or suggest?</title>
      <link>https://community.ruckuswireless.com/t5/SmartZone-and-Virtual-SmartZone/Ruckus-VSZ-E-API-have-some-example-or-suggest/m-p/13011#M617</link>
      <description>Please clarify what you mean by "change guest-ssid password".&lt;BR /&gt;&lt;BR /&gt;Do you mean change the WPA2 passphrase needed to connect to the Guest Access WLAN you created,&lt;BR /&gt;or to Create Guest Pass for Users on this WLAN?&lt;BR /&gt;&lt;BR /&gt;See vSZ-E 3.5.1 public API reference guide at this link:&lt;BR /&gt;&lt;A href="http://docs.ruckuswireless.com/vscg-enterprise/vsz-e-public-api-reference-guide-3-5-1.html" rel="nofollow" target="_blank"&gt;http://docs.ruckuswireless.com/vscg-enterprise/vsz-e-public-api-reference-guide-3-5-1.html&lt;/A&gt;</description>
      <pubDate>Wed, 27 Sep 2017 20:24:38 GMT</pubDate>
      <guid>https://community.ruckuswireless.com/t5/SmartZone-and-Virtual-SmartZone/Ruckus-VSZ-E-API-have-some-example-or-suggest/m-p/13011#M617</guid>
      <dc:creator>michael_brado</dc:creator>
      <dc:date>2017-09-27T20:24:38Z</dc:date>
    </item>
    <item>
      <title>Re: Ruckus VSZ-E API have some example or suggest?</title>
      <link>https://community.ruckuswireless.com/t5/SmartZone-and-Virtual-SmartZone/Ruckus-VSZ-E-API-have-some-example-or-suggest/m-p/13012#M618</link>
      <description>I want&amp;nbsp;&amp;nbsp;change the WPA2 passphrase needed to connect to the Guest Access WLAN.&lt;BR /&gt;I Just want to make a program to change password every month.&lt;BR /&gt;I don't know how to make a api program. can you tell me how to make it and which program can &amp;nbsp;organization.&lt;BR /&gt;&lt;BR /&gt;Thank you</description>
      <pubDate>Thu, 28 Sep 2017 05:41:38 GMT</pubDate>
      <guid>https://community.ruckuswireless.com/t5/SmartZone-and-Virtual-SmartZone/Ruckus-VSZ-E-API-have-some-example-or-suggest/m-p/13012#M618</guid>
      <dc:creator>ask_eye</dc:creator>
      <dc:date>2017-09-28T05:41:38Z</dc:date>
    </item>
    <item>
      <title>Re: Ruckus VSZ-E API have some example or suggest?</title>
      <link>https://community.ruckuswireless.com/t5/SmartZone-and-Virtual-SmartZone/Ruckus-VSZ-E-API-have-some-example-or-suggest/m-p/13013#M619</link>
      <description>You may need a programer fot implementation.&lt;BR /&gt;&lt;BR /&gt;If you want to test API, you can test using "Restlet Client - REST API Testing"&lt;BR /&gt;&lt;BR /&gt;Get it on "&lt;A href="https://chrome.google.com/webstore/detail/restlet-client-rest-api-t/aejoelaoggembcahagimdiliamlcdmfm" rel="nofollow" target="_blank" title="Link https//chromegooglecom/webstore/detail/restlet-client-rest-api-t/aejoelaoggembcahagimdiliamlcdmfm"&gt;https://chrome.google.com/webstore/detail/restlet-client-rest-api-t/aejoelaoggembcahagimdiliamlcdmfm&lt;/A&gt;"&lt;BR /&gt;&lt;BR /&gt;It's very esay and free tool.&lt;BR /&gt;&lt;BR /&gt;Regards.</description>
      <pubDate>Thu, 28 Sep 2017 07:54:55 GMT</pubDate>
      <guid>https://community.ruckuswireless.com/t5/SmartZone-and-Virtual-SmartZone/Ruckus-VSZ-E-API-have-some-example-or-suggest/m-p/13013#M619</guid>
      <dc:creator>hyosang_choi</dc:creator>
      <dc:date>2017-09-28T07:54:55Z</dc:date>
    </item>
    <item>
      <title>Re: Ruckus VSZ-E API have some example or suggest?</title>
      <link>https://community.ruckuswireless.com/t5/SmartZone-and-Virtual-SmartZone/Ruckus-VSZ-E-API-have-some-example-or-suggest/m-p/13014#M620</link>
      <description>Any update on this? I need to do a similar thing, and would love to start from a working example...</description>
      <pubDate>Mon, 04 Mar 2019 21:16:55 GMT</pubDate>
      <guid>https://community.ruckuswireless.com/t5/SmartZone-and-Virtual-SmartZone/Ruckus-VSZ-E-API-have-some-example-or-suggest/m-p/13014#M620</guid>
      <dc:creator>james_miller_53</dc:creator>
      <dc:date>2019-03-04T21:16:55Z</dc:date>
    </item>
    <item>
      <title>Re: Ruckus VSZ-E API have some example or suggest?</title>
      <link>https://community.ruckuswireless.com/t5/SmartZone-and-Virtual-SmartZone/Ruckus-VSZ-E-API-have-some-example-or-suggest/m-p/13015#M621</link>
      <description>Try this python executable script.

&lt;PRE&gt;
&lt;CODE alt="" name="" rel="" target="" title="" type="" value=""&gt;
#!/usr/bin/env python

import csv, threading, requests

host = '&amp;lt;&lt;SZ hostname=""&gt;&amp;gt;'
adminname = '&amp;lt;&lt;ADMIN username=""&gt;&amp;gt;'
adminpassword = '&amp;lt;&lt;ADMIN password=""&gt;&amp;gt;'
zoneid = '&amp;lt;&lt;ZONE id=""&gt;&amp;gt;'
wlanid = '&amp;lt;&lt;WLAN id=""&gt;&amp;gt;'
newwifikey = '&amp;lt;&lt;NEW wpa2="" key=""&gt;&amp;gt;'

def loginRuckus():
  import urllib3
  urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)

  session = requests.session()
  urlsession = 'https://%s:8443/wsg/api/public/v8_0/session' % (host)

  response = session.post(urlsession, json={"username":adminname, "password":adminpassword }, verify=False)
  print(response.text)
  return session

def change_enc_key(session):
  url = 'https://%s:8443/wsg/api/public/v8_0/rkszones/%s/wlans/%s/encryption' % (host, zoneid, wlanid)
  response = session.patch(url, json={"method":"WPA2","passphrase":newwifikey},  verify=False)
  print(response.text)
  print(response)
  return

def main():
  change_enc_key(loginRuckus())
  return

if __name__ == '__main__':
  main()
&lt;/NEW&gt;&lt;/WLAN&gt;&lt;/ZONE&gt;&lt;/ADMIN&gt;&lt;/ADMIN&gt;&lt;/SZ&gt;&lt;/CODE&gt;
&lt;/PRE&gt;</description>
      <pubDate>Wed, 06 Mar 2019 22:10:29 GMT</pubDate>
      <guid>https://community.ruckuswireless.com/t5/SmartZone-and-Virtual-SmartZone/Ruckus-VSZ-E-API-have-some-example-or-suggest/m-p/13015#M621</guid>
      <dc:creator>tony_heung</dc:creator>
      <dc:date>2019-03-06T22:10:29Z</dc:date>
    </item>
    <item>
      <title>Re: Ruckus VSZ-E API have some example or suggest?</title>
      <link>https://community.ruckuswireless.com/t5/SmartZone-and-Virtual-SmartZone/Ruckus-VSZ-E-API-have-some-example-or-suggest/m-p/13016#M622</link>
      <description>Because I've just spent _way_ to much time trying to do this in powershell, I figured I'd share a working powershell example&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;&lt;PRE alt="" name="" rel="" target="" title="" type="" value=""&gt;# Queries vSZ controllers using powershell&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;$UrlBase = "&lt;A alt="" href="https://vsz:8443/wsg/api/public"&gt;https://vsz:8443/wsg/api/public"&lt;/A&gt;;&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;$apiVer = "v8_0"&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;$Body = [pscustomobject]@{&amp;nbsp;&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;username = 'admin'&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;password = 'admin'&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;timeZoneUtcOffset = "+08:00"&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;}&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;$json = $Body | ConvertTo-Json&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;$session = Invoke-WebRequest -Uri $UrlBase/$apiVer/session -Method Post -Body $json -ContentType 'application/json' -SessionVariable websession&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;# Translate Cookie header into useable string&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;$stringCookie = [string]$session.Headers["Set-Cookie"]&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;$cookie = $stringCookie.substring(0,($stringCookie.length - 21))&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;# Add cookie to header&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;$headers = @{}&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;$headers.Add("Cookie",$cookie)&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;Invoke-RestMethod -Uri $UrlBase/$apiVer/session -Method GET -Headers $headers -ContentType 'application/json' -WebSession $websession&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;Invoke-RestMethod -Uri $UrlBase/apiInfo -Method GET -Headers $headers -ContentType 'application/json' -WebSession $websession&lt;/PRE&gt;			&lt;BR alt="" name="" rel="" target="" title="" type="" value="" /&gt;</description>
      <pubDate>Mon, 10 Jun 2019 00:58:08 GMT</pubDate>
      <guid>https://community.ruckuswireless.com/t5/SmartZone-and-Virtual-SmartZone/Ruckus-VSZ-E-API-have-some-example-or-suggest/m-p/13016#M622</guid>
      <dc:creator>dave_watkins_74</dc:creator>
      <dc:date>2019-06-10T00:58:08Z</dc:date>
    </item>
  </channel>
</rss>

