Learn more about Streama© – the foundational technology behind our stateful streaming data platform. Learn More

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 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.

Getting started:

  1. Install the latest version of the Coralogix CLI
  2. Teams API key (Fetch this from Account -> Settings -> API access)
  3. Team Id (Fetch this from Account -> Settings -> send your logs)
  4. User must have an admin role.

Environment variables:

Environment VariableDescription
CORALOGIX_API_KEYTeams API key

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

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: Examples below assume the api-key is provided as an environment variable.

ExampleDescription
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 user1@example.com:admin,user2@example.com:user* Creates team named app01-prod in the eu cluster.

* Invites user1@example.com with role admin and user2@example.com 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 user1@example.com:admin,user2@example.com:user* Invites user1@example.com with role admin and user2@example.com 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

FlagsDescriptionMandatory / Optional
--region region
-r region
Coralogix cluster hosting your account. Options available are:
- eu
- in
- us
Mandatory when not using --custom-endpoint
--name team-nameName of the team to be created.Mandatory for create-team command
--id teamIdTeam-Id to invite users to Mandatory for invite command
--invites user-listInvites 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 URLURL 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 keyOptional if key is set in the environment variable CORALOGIX_API_KEY