Skip to main content

Client for the Vista API

Project description

Vista API for Python

Python implementation of the Vista API.

Reference

Prerequisites

You'll need to create a Vista API key from the Vista Dashboard.

Usage

Install the dependency:

pip install vista_api_client

Then in your Node application:

from vista_api_client import VistaClient

if __name__ == '__main__':
    client = VistaClient('z9Not6ZyDQn8YGw3GxHZx54k0U1qA_2KIL1HktuYPc5EKEfd', 'branch_name')
    roles = client.resources.list('test')
    print(roles)

After that you are good to go!

Please see the Vista API Documentation for documentation of the API. ://docs.govista.io/api/) for documentation of the API.

API

method description
client.admin.create_branch(branch : String) Creates new Branch
client.admin.create_read_tokens() Creates a set of read-only tokens meant to be used by Vista React components
client.resource_types.list() Lists all Resource Types
client.resource_types.create(name : String, actions : Array(String))`
client.roles.list() Lists all Roles
client.roles.create(role_id : String, actionsByResourceType : Array(Dict(Resource Type, Action), parent_roles : Array(String)) Creates a new Role
client.roles.inherit(child_role_id : String, parent_role_id : String) Adds Role as child of parent role
client.users.create(user_id : String) Creates new User
client.users.assign_to_userset(user_id : String, userset_id : String) Adds User to a Userset
client.users.remove_from_userset(user_id : String, userset_id : String) Removes User from Userset
client.users.check(user_id : String, action : String, resource_type : String, resource_id : String) Checks User access
client.users.expand(user_id : String) Lists all granted permissions for User.
client.users.grant_action(user_id : String, action : String, resource_type : String, resource_id : String) Allows user to perform action on (resource_id, resource_type)
client.users.revoke_action(user_id : String, action : String, resource_type : String, resource_id : String) Revokes action on (resource_id, resource_type) for User.
client.users.grant_role(user_id : String, role_id : String, resource_type : String, resource_id : String) Grants Role to User
client.users.revoke_role(user_id : String, role_id : String, resource_type : String, resource_id : String) Revokes Role from User
client.usersets.create(user_id : String) Creates Userset
client.usersets.inherit(child_role_id : String, parent_role_id : String) Adds Userset as child of parent Userset
client.usersets.grant_action(user_id : String, action : String, resource_type : String, resource_id : String) Allows User to perform action on (resource_id, resource_type)
client.usersets.revoke_action(user_id : String, action : String, resource_type : String, resource_id : String) Revokes action on (resource_id, resource_type) for Userset
client.usersets.grant_role(user_id : String, role_id : String, resource_type : String, resource_id : String) Grants Role to Userset
client.usersets.revoke_role(user_id : String, role_id : String, resource_type : String, resource_id : String) Revokes Role from Userset

Project details


Download files

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

Source Distribution

vista_api_client-0.1.9.tar.gz (4.1 kB view details)

Uploaded Source

File details

Details for the file vista_api_client-0.1.9.tar.gz.

File metadata

  • Download URL: vista_api_client-0.1.9.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5

File hashes

Hashes for vista_api_client-0.1.9.tar.gz
Algorithm Hash digest
SHA256 51e93d566019edfb298ad74bdf645e1f1b5153f0ff60df6afd6b9a9a34641d76
MD5 980e4204c66976a632947452fbc21a5f
BLAKE2b-256 f89d3b3d8cab64bd1f97b0ff6b58f50205217e04113436b6dab704a3aa0a4499

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page