Skip to content

Team Management (via CLI)

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:

  • Comma-separated command-line arguments

  • New-line delimited text file  

This capability allows team management to be automated using scripts or other provisioning tools. 

This tutorial will guide you on managing teams using the CLI tool.

Getting started

Only Organization and Platform administrators have the predefined permissions to manage teams.

STEP 1. Install the latest version of the Coralogix CLI.

STEP 2. Access your Teams API key by navigating to Data Flow > API Keys from your Coralogix toolbar. Input this as your CORALOGIX_API_KEY environment variable.

Note: When the environment variable is set, --api-key (-k) becomes an optional argument when using the tool.

STEP 3. Access your Team ID. (Account -> Settings -> Send Your Logs)

Commands

create-team

This command creates a new team.

invite

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 

Examples

Note: The 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
--invites @invites.txt
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

Options

Flags Description Mandatory / Optional
--region region
-r region
Coralogix cluster hosting your account. Options available are:
eu (EU1)
se (EU2)
us1 (US1)
us2 (US2)
in (API1)
sg (AP2)
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
Alerts, rules, & tags API key Optional if key is set in the environment variable CORALOGIX_API_KEY