Skip to content

Locally

Jordan Moore edited this page Aug 14, 2024 · 3 revisions

Local Examples

You will either need to configure environment variables or pass in arguments. The following shows it with passing in arguments like --only-scripts.

Pass API Information as an argument:

python3 git2kandji.py --subdomain accuhive --region us --token abcd1234

Example with Only Updating Scripts

python3 git2kandji.py --subdomain accuhive --region us --token abcd1234 --only-scripts

Example with Only Updating Profiles

python3 git2kandji.py --subdomain accuhive --region us --token abcd1234 --only-profiles

Delete untracked items in Kandji:

python3 git2kandji.py --subdomain accuhive --region us --token abcd124 --delete

Dry Run:

python3 git2kandji.py --subdomain accuhive --region us --token abcd124 --dryrun

Local Examples with Environment Variables

You will either need to configure environment variables or pass in arguments. The following shows it with environment variables. Arguments passed into the script will always override environment variables.

Pass Information to Environment Variables

export INPUT_KANDJI_SUBDOMAIN=accuhive
export INPUT_KANDJI_REGION=us
export INPUT_KANDJI_TOKEN=abcd1234
export INPUT_DELETE=true

Run full synchronization:

python3 git2kandji.py