mongocli iam organization describe
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.
Syntax
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.
Arguments
Argument | Type | Description | Required? |
---|---|---|---|
<organization-id> | string | Unique identifier of the organization you want to describe. | yes |
Options
Option | Type | Description | Required? |
---|---|---|---|
--output , -o | string | Command output format. Valid values are:
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 |
Output
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. |
Examples
Describe an Organization Using the Default Profile
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" }
Describe an Organization Using a Defined Profile
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" }