Skip to content

airt api-key

A set of commands for managing the API keys in the server.

Both the API key and the token can be used for accessing the airt services. However, there is a slight difference in generating and managing the two.

For generating the API key, you first need to get the token. Once the token is generated, you can create any number of API keys and set an expiration date individually. Also, you can use the other commands available in the airt api-key to list, revoke the keys at any time.

Once the new API key is generated, you can set it in the AIRT_SERVICE_TOKEN environment variable and start accessing the services with it.

Usage:

$ airt api-key [OPTIONS] COMMAND [ARGS]...

Options:

  • --install-completion [bash|zsh|fish|powershell|pwsh]: Install completion for the specified shell.
  • --show-completion [bash|zsh|fish|powershell|pwsh]: Show completion for the specified shell, to copy it or customize the installation.
  • --help: Show this message and exit.

Commands:

  • create: Create a new API key.
  • details: Return details of an API key.
  • ls: Return the list of API keys available in...
  • rm: Delete an API key from the server.

airt api-key create

Create a new API key.

Usage:

$ airt api-key create [OPTIONS]

Options:

  • -n, --name TEXT: API key name. [required]
  • -e, --expiry INTEGER: The validity for the API key in the number of days [required]
  • -q, --quiet: Output access token only.
  • -d, --debug: Set logger level to DEBUG and output everything.
  • --help: Show this message and exit.

airt api-key details

Return details of an API key.

Usage:

$ airt api-key details [OPTIONS] ID

Arguments:

  • ID: API key id. [required]

Options:

  • -d, --debug: Set logger level to DEBUG and output everything.
  • --help: Show this message and exit.

airt api-key ls

Return the list of API keys available in the server.

Usage:

$ airt api-key ls [OPTIONS]

Options:

  • -o, --offset INTEGER: The number of API keys to offset at the beginning. If None, then the default value 0 will be used. [default: 0]
  • -l, --limit INTEGER: The maximum number of API keys to return from the server. If None, then the default value 100 will be used. [default: 100]
  • --disabled: If set to True, then the disabled API keys will also be included in the result.
  • -q, --quiet: Output only API key ids separated by space
  • -d, --debug: Set logger level to DEBUG and output everything.
  • --help: Show this message and exit.

airt api-key rm

Delete an API key from the server.

Usage:

$ airt api-key rm [OPTIONS] ID

Arguments:

  • ID: API key id. [required]

Options:

  • -q, --quiet: Output only the deleted API key id.
  • -d, --debug: Set logger level to DEBUG and output everything.
  • --help: Show this message and exit.
Back to top