The Coralogix CLI tool supports the management of teams. Actions supported on the CLI are creating teams, inviting members to teams (with role assignment). Users to be invited can be provided in one of the following formats:
This capability makes it possible for team management to be automated using scripts or other provisioning tools.
This tutorial will guide you on how to manage teams using the CLI tool.
Environment Variable | Description |
---|---|
CORALOGIX_API_KEY | Teams API key |
Note: When the environment variable is set –api-key (-k) becomes an optional argument when using the tool.
This command creates a new team.
This command will invite users to join the specified team-id (optionally assign roles)
Note: A default role of user is assigned if none is specified
Note: Examples below assume the api-key is provided as an environment variable.
Example | Description |
---|---|
cxctl account create-team --region eu --name app01-prod | * Creates team named app01-prod in the eu cluster |
cxctl account create-team --region eu --name app01-prod --invites [email protected]:admin,[email protected]:user | * Creates team named app01-prod in the eu cluster. * Invites [email protected] with role admin and [email protected] with the user role |
cxctl account create-team --region eu --name app01-prod | * Creates team named app01-prod in the eu cluster. * Invites users from the new-line delimited invites.txt text file |
cxctl account invite --region eu --id 00001 --invites [email protected]:admin,[email protected]:user | * Invites [email protected] with role admin and [email protected] with the user role to team-id 00001 |
cxctl account invite --region eu --id 00001 --invites @invites.txt | * Invites users listed in invites.txt to join team-id 00001 |
Flags | Description | Mandatory / Optional |
---|---|---|
--region region -r region | Coralogix cluster hosting your account. Options available are: - eu - in - us | Mandatory when not using --custom-endpoint |
--name team-name | Name of the team to be created. | Mandatory for create-team command |
--id teamId | Team-Id to invite users to | Mandatory for invite command |
--invites user-list | Invites users to join a team. Users may be provided on the command-line or in a text file. (see examples above) | Mandatory for invite command |
--custom-endpoint URL | URL to your Coralogix API endpoint. (Applies for customers with private-link integrations) | Mandatory when --region is not provided |
--api-key api-key -k api-key | Teams API key | Optional if key is set in the environment variable CORALOGIX_API_KEY |