Skip to main content

CLI to interact with Genesys Cloud

Project description

Genesys Cloud CLI

WARNING: This is a result of a hackathon project and while it is functional it is not officially supported by the Genesys Development Group.

The Genesys Cloud cli is a tool to interact with Genesys Cloud

Note that if you us oh-my-zsh, it aliases gc to a git command, this cli works using either gc or gcli if you are using that alias.

Install

pip install genesyscloudcli

Local setup

The cli authenticates using client credentials which you will have to create yourself

gc profile new is the easiest way to setup your credentials. This will create a credentials file at ~/.genesyscloud/credentials and can support multiple profiles for different organizations.

$ gc profile new
Profile Name [DEFAULT]: mycompanyname
Genesys Cloud Environment (mypurecloud.com, usw2.pure.cloud): mypurecloud.com
OAuth Client ID: dfbdc514-e830-4745-bffa-1cb7ee7f2736
OAuth Client Secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY

Profiles

With multiple profiles configured, you can either specify one when connnecting:

$ gc --profile <profilename> <command>

Or switch a named profile to the default

$ gc profile setdefault <profilename>

Configuration Options

~/.genesyscloud/config contains configurable options in the DEFAULT section

[DEFAULT]
output_type = yaml

Command Structure

The Genesys Cloud cli uses a multipart structure

$ gc <command> <subcommand> [options and params]

Pagination

For resources that have multiple pages such as listing users, there are options available on how to process the pages. By default the cli uses a page size of 250 and retrieves all items.

--page-size    # set a page size other than 250
--page-number   # return a specific page

Data Inputs

Some commands require bodies to be sent with the request, such as creating a new user. The body can be supplied a number of ways.

  1. Passing json with the command (escaped whitespace is not currently supported)

    $ gc users new "{\"name":\"Joe Smith\"}"
    
  2. Referencing a file

    $ gc users new user.json
    
  3. Stream input

    $ gc users new < user.json
    
    $ echo "{\"name":\"Joe Smith\"}" | gc user new
    

Testing locally

$ virtualenv venv
$ . venv/bin/activate
$ pip install --editable .

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

genesyscloudcli-0.4.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

genesyscloudcli-0.4-py2-none-any.whl (3.6 kB view details)

Uploaded Python 2

File details

Details for the file genesyscloudcli-0.4.tar.gz.

File metadata

  • Download URL: genesyscloudcli-0.4.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.52.0 CPython/3.9.0

File hashes

Hashes for genesyscloudcli-0.4.tar.gz
Algorithm Hash digest
SHA256 edf47c18acd9b2ad66a118a9ee5b03a036313ab257c480249e817a6728411fe3
MD5 06dd0ae7aba5edb47a3c7f06758cd669
BLAKE2b-256 dc861339fc8ad0368226f9b92332d063e08d2ca2dfd52fd32af2d30a5ffac7c6

See more details on using hashes here.

File details

Details for the file genesyscloudcli-0.4-py2-none-any.whl.

File metadata

  • Download URL: genesyscloudcli-0.4-py2-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.52.0 CPython/3.9.0

File hashes

Hashes for genesyscloudcli-0.4-py2-none-any.whl
Algorithm Hash digest
SHA256 575dd2d8dc7c47843b3e4a536766c8dc6f81c1d08e6631800a9ae17fb05fe771
MD5 6d1a7bbbc94aadbac47881b7ff7f4a8c
BLAKE2b-256 1eb297a3b58712eed98ed2332c7823af8cedd997a7a0503d20d4c05a3cfa86ee

See more details on using hashes here.

Supported by

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