Skip to content

newscred/settings-ex-im-automation-sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Welcome Settings Import/Export Example

API Documentation

Update target Welcome instance via Github Action

Import in target instance

API Documentation

Import an existing config file ./config.json (see how to generate it in the "Export from source instance" section below).
Get an access token using an app from the target instance. Use it as ACCESS_TOKEN environment variable to run ./scripts/curl/import.sh.

Manually

ACCESS_TOKEN=USE_YOUR_TOKEN_FROM_TARGET_INSTANCE bash ./scripts/curl/import.sh

With CI/CD Job

Example: Github action (see .github/workflows/import.yml)

  • Set environment variables in Github repository
  • Push a change in default branch to see the action trigger

Export from source instance

API Documentation

Get an access token using an app from the source instance.
Use it as ACCESS_TOKEN environment variable to run ./scripts/curl/export.sh and save the response in ./config.json.

ACCESS_TOKEN=USE_YOUR_TOKEN_FROM_SOURCE_INSTANCE bash ./scripts/curl/export.sh > config.json

# if you want to pretty print the json using python
ACCESS_TOKEN=USE_YOUR_TOKEN_FROM_SOURCE_INSTANCE bash ./scripts/curl/export.sh | python -m json.tool > config.json