Navigation

mongocli iam globalApiKey describe

The iam globalApiKey describe command provides details about the specified Global API Key. You can also retrieve details about the key using the Ops Manager API.

mongocli iam globalApiKey|globalApiKeys describe <api-key-id>
[ --output|-o <output-format> ]
[ --profile|-P <profile-name> ]
Note

Use -h or --help to view the command-line help for this command.

Argument
Type
Description
Required?
<api-key-id>
string
Unique identifier of the Global API Key to describe.
yes
Option
Type
Description
Required?
--output, -o
string

Command output format. Valid values are:

  • json for output in JSON format
  • go-template for custom output using the Go template
  • go-template-file for custom output specified using the Go template file

If omitted, the command returns output in the default format.

no
--profile, -P
string

Name of the profile where your credentials are saved. If omitted, uses the default profile. To learn more about creating a profile, see Configure the MongoDB CLI.

You must have credentials with the Global Read Only role to retrieve details about a Global API Key.

no

If the command succeeds, it returns the following output in the default format. If the command returns errors, see Troubleshooting for recommended solutions.

ID DESCRIPTION PUBLIC KEY PRIVATE KEY
<key-id> <key-description> <public-key> <private-key>

For the complete list of JSON fields returned by the command, see the API reference. The default output only includes a subset of the fields returned by this command.

The following command describes a Global API Key using the default profile, which contains credentials for accessing the Ops Manager instance. The output is returned in the default format.

mongocli iam globalApiKey describe 5f5aa08257aef32b04ec588c

The previous command prints the following to the terminal.

ID DESCRIPTION PUBLIC KEY PRIVATE KEY
5f5aa08257aef32b04ec588c My Global API key abcdefgh ********-****-****-f4d64595457e
Give Feedback