An API Client to use the Virtual SmartZone - High Scale Public API.
Project description
RuckusVirtualSmartZoneAPIClient
Ruckus - Virtual SmartZone - High Scale Public API Reference Guide
An API Client for the Virtual SmartZone - High Scale Public API Reference Guide to be able to easily use the API in a more standard way.
How to install
$ pip install RuckusVirtualSmartZoneAPIClient
Usage
The argument 'method' must be specify every time.
Default arguments and attributes
import RuckusVirtualSmartZoneAPIClient
client = RuckusVirtualSmartZoneAPIClient.Client(verify=False, warnings=False, api_version='v9_1')
client.get(url=None, method='', data=None, auth = None)
# client.headers
# client.base_url
# client.token
# client.auth
# client.server
Authentication
import RuckusVirtualSmartZoneAPIClient
client = RuckusVirtualSmartZoneAPIClient.Client()
client.connect(url='https://localhost:8443', username='admin', password='Admin123')
client.disconnect()
The first query
import RuckusVirtualSmartZoneAPIClient
import json
client = RuckusVirtualSmartZoneAPIClient.Client()
client.connect(url='https://localhost:8443', username='admin', password='Admin123')
response = client.get(method='/domains')
print(json.dumps(response.json(), indent=4))
client.disconnect()
Creating
import RuckusVirtualSmartZoneAPIClient
import json
client = RuckusVirtualSmartZoneAPIClient.Client()
client.connect(url='https://localhost:8443', username='admin', password='Admin123')
response = client.post(method='/domains', data={'name': 'TestDomain'})
domain_id = response.json()['id']
print(json.dumps(response.json(), indent=4)) # --> 201
client.disconnect()
Updating
import RuckusVirtualSmartZoneAPIClient
import json
client = RuckusVirtualSmartZoneAPIClient.Client()
client.connect(url='https://localhost:8443', username='admin', password='Admin123')
domain_id = '1234567890asdfg'
response = client.patch(method=f'/domains/{domain_id}', data={'description': 'I updated this description.'})
print(response.status_code) # --> 204
client.disconnect()
Deleting
import RuckusVirtualSmartZoneAPIClient
client = RuckusVirtualSmartZoneAPIClient.Client()
client.connect(url='https://localhost:8443', username='admin', password='Admin123')
domain_id = '1234567890asdfg'
response = client.delete(method=f'/domains/{domain_id}')
print(response.status_code) # --> 204
client.disconnect()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file RuckusVirtualSmartZoneAPIClient-0.0.1.tar.gz
.
File metadata
- Download URL: RuckusVirtualSmartZoneAPIClient-0.0.1.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.1 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | aca2cf5cd131c4fa219db67615dd642b15080d97f8f012c7243d15006fb65316 |
|
MD5 | 6407f36f96dbfcfd7eca8c5a0ec8dcaf |
|
BLAKE2b-256 | 3a78282cf34afb2190209fed226ec4818f64b083c144d511d56d365b345de2ed |
File details
Details for the file RuckusVirtualSmartZoneAPIClient-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: RuckusVirtualSmartZoneAPIClient-0.0.1-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.1 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4df16cda590f3f8085b6cf9585bc424cb58959eed9222f46cc2e37ce093f6002 |
|
MD5 | 08724f6310e0d569854f81f3abceeaeb |
|
BLAKE2b-256 | 65bf0219b098cf80ba12b236a783793fd05c7345722b5542d48398c89153a485 |