Ruckus VSZ-E API have some example or suggest?

  • 1
  • Question
  • Updated 1 year ago
  • In Progress
  • (Edited)
I want to make a program use Ruckus VSZ-E API on controller that can auto change guest-ssid password.
Have some example or suggest?
Photo of Wu Yen Yi

Wu Yen Yi

  • 6 Posts
  • 0 Reply Likes

Posted 3 years ago

  • 1
Photo of Michael Brado

Michael Brado, Official Rep

  • 3298 Posts
  • 523 Reply Likes
Please clarify what you mean by "change guest-ssid password".

Do you mean change the WPA2 passphrase needed to connect to the Guest Access WLAN you created,
or to Create Guest Pass for Users on this WLAN?

See vSZ-E 3.5.1 public API reference guide at this link:
Photo of Wu Yen Yi

Wu Yen Yi

  • 6 Posts
  • 0 Reply Likes
I want  change the WPA2 passphrase needed to connect to the Guest Access WLAN.
I Just want to make a program to change password every month.
I don't know how to make a api program. can you tell me how to make it and which program can  organization.

Thank you
Photo of Jeronimo


  • 397 Posts
  • 50 Reply Likes
You may need a programer fot implementation.

If you want to test API, you can test using "Restlet Client - REST API Testing"

Get it on ""

It's very esay and free tool.

Photo of James Miller

James Miller

  • 1 Post
  • 0 Reply Likes
Any update on this? I need to do a similar thing, and would love to start from a working example...
Photo of Tony Heung

Tony Heung, Official Rep

  • 65 Posts
  • 16 Reply Likes
Try this python executable script.

#!/usr/bin/env python

import csv, threading, requests

host = '<<SZ hostname>>'
adminname = '<<admin username>>'
adminpassword = '<<admin password>>'
zoneid = '<<Zone ID>>'
wlanid = '<<WLAN ID>>'
newwifikey = '<<New WPA2 Key>>'

def loginRuckus():
  import urllib3

  session = requests.session()
  urlsession = 'https://%s:8443/wsg/api/public/v8_0/session' % (host)

  response =, json={"username":adminname, "password":adminpassword }, verify=False)
  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)

def main():

if __name__ == '__main__':

Photo of Dave Watkins

Dave Watkins

  • 74 Posts
  • 14 Reply Likes
Because I've just spent _way_ to much time trying to do this in powershell, I figured I'd share a working powershell example

# Queries vSZ controllers using powershell
$UrlBase = "https://vsz:8443/wsg/api/public";
$apiVer = "v8_0"
$Body = [pscustomobject]@{ 
username = 'admin'
password = 'admin'
timeZoneUtcOffset = "+08:00"
$json = $Body | ConvertTo-Json
$session = Invoke-WebRequest -Uri $UrlBase/$apiVer/session -Method Post -Body $json -ContentType 'application/json' -SessionVariable websession
# Translate Cookie header into useable string
$stringCookie = [string]$session.Headers["Set-Cookie"]
$cookie = $stringCookie.substring(0,($stringCookie.length - 21))
# Add cookie to header
$headers = @{}
Invoke-RestMethod -Uri $UrlBase/$apiVer/session -Method GET -Headers $headers -ContentType 'application/json' -WebSession $websession
Invoke-RestMethod -Uri $UrlBase/apiInfo -Method GET -Headers $headers -ContentType 'application/json' -WebSession $websession