cancel
Showing results for 
Search instead for 
Did you mean: 

Virtual SmartZone API : How should serviceTicket be used?

nick_knoebber
New Contributor
I'm currently building a service to communicate with a Virtual SmartZone. On startup, the service calls the v7_0/serviceTicket route and receives a service ticket back, which is used as a URI parameter for all other requests: http://docs.ruckuswireless.com/smartz...

 However, the docs do not state how long this service ticket is active for, and how old service tickets should be cleaned up. I have tried the DELETE method for this route and it appears to not work. After running DELETE on /serviceTicket with the ticket id, I still am able to use that ticket id. There is also no way to get a list of old service tickets so that they could be cleaned up.

 I am worried about creating too many service tickets, and eventually slowing down or crashing the server. Is this is a valid concern? Should I just create one serviceTicket and then use that as a constant value instead of creating a new one each time? 
8 REPLIES 8

nickzourdos
Contributor
Bumping this. The API documentation says that we should use serviceTicket for GET requests, but I cannot get it to work. I am able to obtain a serviceTicket value in a POST, but I keep getting "current session has timed out: error 201, no active session" when I try to make a GET. 

Can someone from Ruckus chime in with some info on whether this works or not?

nickzourdos
Contributor
I rebooted my vSZ, ran a POST with {serviceTicket} in the headers, and then ran a GET with {serviceTicket} in the headers, and it worked. I ran a DEL with {serviceTicket} in the headers to kill the session, then tried the whole process over. It did not work. I have no idea how I got it working the first time. 

Dordt
New Contributor II

You don't put the serviceTicket in the headers, you put it in the query params of the URL.

Example to get a serviceTicket: POST with the username and password to https://vsz.example.com/wsg/api/public/v9_1/serviceTicket

Example to delete a serviceTicket: DELETE to https://vsz.example.com/wsg/api/public/v9_1/serviceTicket?serviceTicket=ST_EXAMPLESERVICETICKET123

Both requests need to have the header for Content-Type: application/json;charset=UTF-8

Dordt
New Contributor II

Once a serviceTicket is generated, it is generally valid for 24 hours
...
It is recommended to delete an existing serviceTicket if you are planning to generate another serviceTicket.

https://community.ruckuswireless.com/t5/SmartZone-and-Virtual-SmartZone/ServiceTicket-time-to-live/m...