Skip to main content

Avi Networks Okta sdk

Project description


Provides a client abstraction to programmatically perform CRUD operations on resources in the avinetworks Okta org.

Supported objects

  • Applications
  • Users
  • User groups
  • Trusted origins
  • API tokens

Design Overview

The design philosphy is for client operations to achieve a desired state. Therefore if a resource aleady exists, calling create on that same resource will simply return the existing resource. Likewise a delete operations will succeed if the resource already does not exist. Calling get on a non-existant resource will throw an exception.

Return Values

Most client methods will return a JSON representation of a resource, but a few such as delete operations will return the status code of the API request.

Usage Examples

Initialize an API client

The client will typically be initizialized with an API token, but if you need to programatically create API tokens you’ll need to initialize with a username and password.

client = AviOktaClient(token='<your API token>')


Only SAML application creation is supported for now.

app = client.create_app("my-app", "")
app['_created'] # True
app = client.create_app("my-app")
app['_created'] # False
app = client.get_app(label="my-app")
apps = client.list_apps()


User creation will also send a user activation email to the specified email address. Application-user resources support up to ten tenant/role mappings with names Tenant<n> and Role<n> where <n> is a number from 1 to 10.

user = client.create_user("FirstName", "LastName", "")
user = client.get_user(login="")
users = client.list_users()
attrs = {'Tenant1': 'my-tenant', 'Role1': 'Tenant-Admin'}
app_user = client.assign_user_to_app(app['id'], user['id'], attributes=attrs)

User Groups

group = client.create_group('my-group')
group = client.get_group(name='my-group')
groups = client.list_groups()
client.assign_user_to_group(user['id'], group['id'])

Trusted Origins

trusted_origin = client.create_trusted_origin('My App', '', cors=False, redirect=True)

API Tokens

Created tokens will be associated with the user who’s credentials were used to initialize the client

token = client.create_token('my-token')

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for avi-okta, version 0.0.18
Filename, size File type Python version Upload date Hashes
Filename, size avi_okta-0.0.18.tar.gz (48.0 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page