RUCKUS Community Forums are now in READ-ONLY mode while we migrate to a new platform.
You will still be able to read posts and knowledge articles, but will be unable to post new content until Go Live on the new platform Monday August 17.
Lennar Smart Home customers: please contact [email protected] for assistance during the week of August 9-17.
04-12-2023 01:41 AM
Hi Team,
This is a fun Quality of Life Improvement! I love that we have APIs in our applications since it really allows us to make quick changes within applications without having to access a GUI. I use APIs in testing and sometimes I want to load users into our DPSK Pools quickly, for testing. Now, I could do this in GUI, but if I am bulk uploading more than a few, this can be quite lengthy. Let’s do it through the API! We are going to use Postman to upload a CSV file with a username and password entered in it for our users.
We have had questions from customers that have asked for this functionality as well, which we point them to the documentation that is located here:
Please point them to the RESTful API docs for Cloudpath located on that page.
If you have questions, please refer to that doc, in this QOL page we are going to show you importing a username/passphrase combination from a CSV file.
Create API key:
To begin with, let’s create an API key in Cloudpath:
You need a CSV file, with, at a minimum, a “name” column, and a “passphrase” column. You need to have these two values to create a DPSK.
Example:
POSTMAN:
Create a Collection:
This will contain our API calls for Cloudpath
In Postman, we are going to create a new Collection:
Create an Environment:
This will contain variables for us (such as AUTH token)
Create a API call to authenticate using a token:
{
“userName”: “username”,
“password”: “password”
}
const response = pm.response.json();
pm.environment.set(‘token’, response.token);
Let’s assume a DPKS pool is already created, if not, you can use APIs to create it as well.
Get a DPSK pool GUID to make DPSKs in
Create a RUN in Postman:
The name and passphrase will be read from the file headers.
{
“name”: “{{name}}”,
“passphrase”: “{{passphrase}}”,
“status”: “ACTIVE”
}
If you token has expired… get a new one by running the auth call again.
Let’s load a file!
In Postman we can run a file through a collection and an API call.
Click “Run” to import the CSV file
If you look in the console of Postman, you will see the result and time taken:
In Cloudpath, we should see those entries for the DPSK pool:
Enjoy!
