Docs Menu
Docs Home
/ /
MongoDB Command Line Interface
/ / /

mongocli iam organization describe

On this page

  • Syntax
  • Arguments
  • Options
  • Output
  • Examples

The mongocli iam organization describe command retrieves the details of an organization in your Ops Manager instance.

To describe an organization in Ops Manager, your profile must use a Global API key pair or a Personal API key. When you use a Programmatic API Key, the command retrieves the organization only if you have the Organization Owner role for that organization.

You can also describe organizations through the API.

mongocli iam organization|organizations|org|orgs describe|show
<organization-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?
<organization-id>
string
Unique identifier of the organization you want 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 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.

no

The command prints following fields in the specified format to the terminal if the command succeeds. If the command returns errors, see Troubleshooting for recommended solutions.

Field
Description
id
Unique identifier of the organization.
links
Array of one or more links to sub-resources and/or related resources. The relations between URLs are explained in the Web Linking Specification.
name
Name of the organization.

The following mongocli iam org describe command describes an Ops Manager organization using the default profile. The profile contains a Programmatic API Key with the Organization Owner role for the organization.

mongocli iam org describe 5b07759a08372616070df448 --output json

The command returns the following JSON document:

{
"id": "5b07759a08372616070df448",
"isDeleted": false,
"links": [
{
"rel": "self",
"href": "http://example.mongodb.com/api/public/v1.0/orgs/5f07759d08382616070df339"
},
{
"rel": "http://mms.mongodb.com/groups",
"href": "http://example.mongodb.com/api/public/v1.0/orgs/5b07759a08372616070df448/groups"
},
{
"rel": "http://mms.mongodb.com/teams",
"href": "http://example.mongodb.com/api/public/v1.0/orgs/5b07759a08372616070df448/teams"
},
{
"rel": "http://mms.mongodb.com/users",
"href": "http://example.mongodb.com/api/public/v1.0/orgs/5b07759a08372616070df448/users"
}
],
"name": "Org1"
}

The following mongocli iam org describe command describes an organization in an Ops Manager deployment. The command uses the om-personalkey profile, which contains a Personal API Key.

mongocli iam org describe 5b07759a08372616070df448 --output json -P om-personalkey

The command returns the following JSON document:

{
"id": "5b07759a08372616070df448",
"isDeleted": false,
"links": [
{
"rel": "self",
"href": "http://example.mongodb.com/api/public/v1.0/orgs/5f07759d08382616070df339"
},
{
"rel": "http://mms.mongodb.com/groups",
"href": "http://example.mongodb.com/api/public/v1.0/orgs/5b07759a08372616070df448/groups"
},
{
"rel": "http://mms.mongodb.com/teams",
"href": "http://example.mongodb.com/api/public/v1.0/orgs/5b07759a08372616070df448/teams"
},
{
"rel": "http://mms.mongodb.com/users",
"href": "http://example.mongodb.com/api/public/v1.0/orgs/5b07759a08372616070df448/users"
}
],
"name": "Org1"
}

Back

List an Organization