Skip to content

Add --format json for influxdb3 create token command #25913

@jules-ch

Description

@jules-ch

Add a format option for the create token command to use it with CLI in CI or scripts using jq

Use case:
Using token creation in CI, Docker compose or scripts/

Proposal:
Adding a --format json option in the cli to output token and hashed_token in json format

Current behaviour:
Tokens are printed with explanations

Desired behaviour:
Output token and hashed token in JSON format

{
"token": "apiv3_61WJy5PAZ8C**********************************************************",
"hashed_token": "e5cacb**************************************************************************"
}

Alternatives considered:
Parsing it not practical

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions