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

mongocli iam project describe

On this page

  • Syntax
  • Arguments
  • Options
  • Output
  • Examples

The mongocli iam project describe command retrieves the details of a project in your Atlas, Cloud Manager or Ops Manager instance.

You can also describe projects through the API for each service:

mongocli iam project|projects describe|show
<project-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?
<project-id>
string
Unique identifier of the project 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

If the command succeeds, it prints the following fields in JSON format. The fields returned depend on your MongoDB service. If the command returns errors, see Troubleshooting for recommended solutions.

Field
Description
clusterCount
The number of Atlas clusters deployed in the project.
created
The ISO-8601-formatted timestamp of when Atlas created the project.
id
The unique identifier of the project.
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
The name of the project.
orgId
The unique identifier of the organization to which the project belongs.
Name
Type
Description
activeAgentCount
integer

Number of active agents sending regular pings to Cloud Manager.

The value is refreshed about every 24 hours and cached. If you start a new agent or stop an existing one, the change can take up to 30 minutes to show up in the activeAgentCount field.

hostCounts
object
Total number of hosts by type. The embedded fields should be self-explanatory.
id
string
Unique identifier for the group.
lastActiveAgent
string
Time Cloud Manager last updated the activeAgentCount total for the project. Cloud Manager refreshes this value every 24 hours and caches it to record the number of active MongoDB Agents.
links
object array

One or more links to sub-resources and/or related resources.

name
string
Display name for the project.
orgId
string
Unique identifier for the organization to which the project belongs.
publicApiEnabled
boolean
Flag indicating that the API is enabled for this project. This is a read-only field that is always true.
replicaSetCount
integer
Total number of replica sets for this project.
shardCount
integer
Total number of shards for this project.
Name
Type
Description
activeAgentCount
integer

Number of active agents sending regular pings to Ops Manager.

The value is refreshed about every 24 hours and cached. If you start a new agent or stop an existing one, the change can take up to 30 minutes to show up in the activeAgentCount field.

hostCounts
object
Total number of hosts by type. The embedded fields should be self-explanatory.
id
string
Unique identifier for the project.
lastActiveAgent
string
Time Ops Manager last updated the activeAgentCount total for the project. Ops Manager refreshes this value every 24 hours and caches it to record the number of active MongoDB Agents.
ldapGroupMappings
object array
For LDAP-backed Ops Manager, the mappings of LDAP groups to Ops Manager project roles. Only present for LDAP-backed Ops Manager.
ldapGroupMappings
.roleName
string

Ops Manager user role. The mapping of Project Role to roleName follows:

User Role
roleName Value
Project Owner (required)
GROUP_OWNER
GROUP_AUTOMATION_ADMIN
GROUP_BACKUP_ADMIN
GROUP_MONITORING_ADMIN
GROUP_DATA_ACCESS_ADMIN
GROUP_DATA_ACCESS_READ_WRITE
GROUP_DATA_ACCESS_READ_ONLY
GROUP_READ_ONLY
ldapGroupMappings
.ldapGroups
string array
LDAP project(s) that map to the Ops Manager role.
links
object array

One or more links to sub-resources and/or related resources.

name
string
Display name for the project.
orgId
string
Unique identifier for the organization to which the project belongs.
publicApiEnabled
boolean
Flag indicating that the API is enabled for this project. This is a read-only field that is always true.
replicaSetCount
integer
Total number of replica sets for this project.
shardCount
integer
Total number of shards for this project.
tags
string array

Tags assigned to the project for use in programmatically identifying the project.

  • To view tags you must have the Project Read Only role.

  • To create or edit tags you must have the Project Automation Admin role.

The following mongocli iam project describe command describes an Atlas project using the default profile.

mongocli iam project describe 5e2f04abc10fab99c7d4072e --output json

The command returns the following JSON document:

{
"id": "5e2f04abc10fab99c7d4072e",
"orgId": "5df27c15f10fab55fc6c1234",
"name": "Project1",
"clusterCount": 1,
"created": "2020-01-27T15:42:39Z",
"links": [
{
"rel": "self",
"href": "https://example.mongodb.com/api/atlas/v1.0/groups/5e2f04ecf10fab66c7d4072e"
},
{
"rel": "http://mms.mongodb.com/containers",
"href": "https://example.mongodb.com/api/atlas/v1.0/groups/5e2f04ecf10fab66c7d4072e/containers"
},
{
"rel": "http://mms.mongodb.com/clusters",
"href": "https://example.mongodb.com/api/atlas/v1.0/groups/5e2f04ecf10fab66c7d4072e/clusters"
},
{
"rel": "http://mms.mongodb.com/databaseUsers",
"href": "https://example.mongodb.com/api/atlas/v1.0/groups/5e2f04ecf10fab66c7d4072e/databaseUsers"
},
{
"rel": "http://mms.mongodb.com/peers",
"href": "https://example.mongodb.com/api/atlas/v1.0/groups/5e2f04ecf10fab66c7d4072e/peers"
},
{
"rel": "http://mms.mongodb.com/processes",
"href": "https://example.mongodb.com/api/atlas/v1.0/groups/5e2f04ecf10fab66c7d4072e/processes"
},
{
"rel": "http://mms.mongodb.com/whitelist",
"href": "https://example.mongodb.com/api/atlas/v1.0/groups/5e2f04ecf10fab66c7d4072e/whitelist"
}
]
}

The following mongocli iam project describe command describes a Cloud Manager project using the default profile.

mongocli iam project describe 5f0cb75408382616071076b0 --output json

The command returns the following JSON document:

{
"activeAgentCount": 1,
"agentApiKey": "abc728abd6a6d6c6b6d7826345dbcff0e",
"hostCounts": {
"arbiter": 2,
"config": 1,
"master": 0,
"mongos": 2,
"primary": 4,
"secondary": 8,
"slave": 0
},
"id": "5f0cb75408382616071076b0",
"lastActiveAgent": ISODate("2016-08-05T07:23:34Z"),
"links": [
{
"rel": "self",
"href": "http://example.mongodb.com/api/public/v1.0/groups/5f0cb75408382616071076b0"
},
{
"rel": "http://mms.mongodb.com/hosts",
"href": "http://example.mongodb.com/api/public/v1.0/groups/5f0cb75408382616071076b0/hosts"
},
{
"rel": "http://mms.mongodb.com/users",
"href": "http://example.mongodb.com/api/public/v1.0/groups/5f0cb75408382616071076b0/users"
},
{
"rel": "http://mms.mongodb.com/clusters",
"href": "http://example.mongodb.com/api/public/v1.0/groups/5f0cb75408382616071076b0/clusters"
},
{
"rel": "http://mms.mongodb.com/alertConfigs",
"href": "http://example.mongodb.com/api/public/v1.0/groups/5f0cb75408382616071076b0/alertConfigs"
},
{
"rel": "http://mms.mongodb.com/alerts",
"href": "http://example.mongodb.com/api/public/v1.0/groups/5f0cb75408382616071076b0/alerts"
},
{
"rel": "http://mms.mongodb.com/backupConfigs",
"href": "http://example.mongodb.com/api/public/v1.0/groups/5f0cb75408382616071076b0/backupConfigs"
},
{
"rel": "http://mms.mongodb.com/agents",
"href": "http://example.mongodb.com/api/public/v1.0/groups/5f0cb75408382616071076b0/agents"
}
],
"name": "Project1",
"orgId": "5e34440f08381234070df022",
"publicApiEnabled": true,
"replicaSetCount": 3,
"shardCount": 2
}

The following mongocli iam project describe command describes an Ops Manager project using the default profile.

mongocli iam project describe 5f0cb75408382616012346b0 --output json

The command returns the following JSON document:

{
"activeAgentCount": 1,
"agentApiKey": "cbd728abd6a6d6c6b6d7826345dbcff0e",
"hostCounts": {
"arbiter": 2,
"config": 1,
"master": 0,
"mongos": 2,
"primary": 4,
"secondary": 8,
"slave": 0
},
"id": "5f0cb75408382616012346b0",
"lastActiveAgent": ISODate("2016-08-05T07:23:34Z"),
"ldapGroupMappings" : [ {
"roleName": "GROUP_OWNER",
"ldapGroups": [ project-owner" ]
}, ... ],
"links": [
{
"rel": "self",
"href": "http://example.mongodb.com/api/public/v1.0/groups/5f0cb75408382616071076b0"
},
{
"rel": "http://mms.mongodb.com/hosts",
"href": "http://example.mongodb.com/api/public/v1.0/groups/5f0cb75408382616071076b0/hosts"
},
{
"rel": "http://mms.mongodb.com/users",
"href": "http://example.mongodb.com/api/public/v1.0/groups/5f0cb75408382616071076b0/users"
},
{
"rel": "http://mms.mongodb.com/clusters",
"href": "http://example.mongodb.com/api/public/v1.0/groups/5f0cb75408382616071076b0/clusters"
},
{
"rel": "http://mms.mongodb.com/alertConfigs",
"href": "http://example.mongodb.com/api/public/v1.0/groups/5f0cb75408382616071076b0/alertConfigs"
},
{
"rel": "http://mms.mongodb.com/alerts",
"href": "http://example.mongodb.com/api/public/v1.0/groups/5f0cb75408382616071076b0/alerts"
},
{
"rel": "http://mms.mongodb.com/backupConfigs",
"href": "http://example.mongodb.com/api/public/v1.0/groups/5f0cb75408382616071076b0/backupConfigs"
},
{
"rel": "http://mms.mongodb.com/agents",
"href": "http://example.mongodb.com/api/public/v1.0/groups/5f0cb75408382616071076b0/agents"
}
],
"name": "Project1",
"orgId": "5f07740f08381234070df033",
"publicApiEnabled": true,
"replicaSetCount": 3,
"shardCount": 2,
"tags": [ "DEV", "PRODUCT" ]
}

Back

List Projects