Skip to content

Commit ed84032

Browse files
(DOCSP-10817)(DOCSP-10819): Describe orgs & describe projects (#134)
* (DOCSP-10817): Describe organizations * (DOCSP-10819): Describe projects * Cleanup * Copy & tech review
1 parent cff9388 commit ed84032

File tree

3 files changed

+717
-0
lines changed

3 files changed

+717
-0
lines changed

source/reference/access.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,11 @@ instance.
2121

2222
- :ref:`Create an organization <mcli-iam-organization-create>`
2323
- :ref:`List an organization <mcli-iam-organization-list>`
24+
- :ref:`Describe an organization <mcli-iam-organization-describe>`
2425
- :ref:`Delete an organization <mcli-iam-organization-delete>`
2526
- :ref:`Create a project <mcli-iam-project-create>`
2627
- :ref:`List projects <mcli-iam-project-list>`
28+
- :ref:`Describe a project <mcli-iam-project-describe>`
2729
- :ref:`Delete a project <mcli-iam-project-delete>`
2830

2931
.. class:: hidden
@@ -33,7 +35,9 @@ instance.
3335

3436
Create an Organization </reference/iam-organization-create>
3537
List an Organization </reference/iam-organization-list>
38+
Describe an Organization </reference/iam-organization-describe>
3639
Delete an Organization </reference/iam-organization-delete>
3740
Create a Project </reference/iam-project-create>
3841
List Projects </reference/iam-project-list>
42+
Describe a Project </reference/iam-project-describe>
3943
Delete a Project </reference/iam-project-delete>
Lines changed: 198 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,198 @@
1+
.. _mcli-iam-organization-describe:
2+
3+
==================================
4+
mongocli iam organization describe
5+
==================================
6+
7+
.. default-domain:: mongodb
8+
9+
.. contents:: On this page
10+
:local:
11+
:backlinks: none
12+
:depth: 1
13+
:class: singlecol
14+
15+
The ``mongocli iam organization describe`` command retrieves the details
16+
of an organization in your |onprem| instance.
17+
18+
To describe an organization in |onprem|, your profile must use a
19+
:opsmgr:`Global API key pair
20+
</reference/api/global-api-keys/index.html#global-programmatic-api-keys>`
21+
or a :opsmgr:`Personal API key
22+
</tutorial/configure-public-api-access/#personal-api-keys-deprecated>`.
23+
When you use a
24+
:opsmgr:`Programmatic API Key </tutorial/configure-public-api-access/#programmatic-api-keys>`,
25+
the command retrieves the organization only if you have the
26+
``Organization Owner`` role for that organization.
27+
28+
You can also describe organizations through the
29+
:opsmgr:`API </reference/api/organizations/organization-get-one/>`.
30+
31+
.. _mcli-iam-organization-describe-syntax:
32+
33+
Syntax
34+
------
35+
36+
.. code-block:: text
37+
38+
mongocli iam organization|organizations|org|orgs describe|show
39+
<organization-id>
40+
[ --profile|-P <profile-name> ]
41+
42+
.. include:: /includes/fact-command-line-help.rst
43+
44+
.. _mcli-iam-organization-describe-arguments:
45+
46+
Arguments
47+
---------
48+
49+
.. list-table::
50+
:header-rows: 1
51+
:widths: 20 10 60 10
52+
53+
* - Argument
54+
- Type
55+
- Description
56+
- Required?
57+
58+
* - ``<organization-id>``
59+
- string
60+
- Unique identifier of the organization you want to describe.
61+
- yes
62+
63+
.. _mcli-iam-organization-describe-options:
64+
65+
Options
66+
-------
67+
68+
.. list-table::
69+
:header-rows: 1
70+
:widths: 20 10 60 10
71+
72+
* - Option
73+
- Type
74+
- Description
75+
- Required?
76+
77+
* - ``--profile``, ``-P``
78+
- string
79+
- Name of the profile where your credentials are saved.
80+
81+
If omitted, uses the {+default-profile+}. To learn more about
82+
creating a profile, see :ref:`mcli-configure`.
83+
84+
- no
85+
86+
.. _mcli-iam-organization-describe-output:
87+
88+
Output
89+
------
90+
91+
The command prints following fields in |json| format to the
92+
terminal if the command succeeds. If the command returns errors,
93+
see :ref:`Troubleshooting <troubleshooting>` for recommended
94+
solutions.
95+
96+
.. list-table::
97+
:widths: 20 80
98+
:header-rows: 1
99+
100+
* - Field
101+
- Description
102+
103+
* - ``id``
104+
- Unique identifier of the organization.
105+
106+
* - ``links``
107+
- Array of one or more links to sub-resources
108+
and/or related resources. The relations between |url|\s are
109+
explained in the :rfc:`Web Linking Specification <5988>`.
110+
111+
* - ``name``
112+
- Name of the organization.
113+
114+
.. _mcli-iam-organization-describe-examples:
115+
116+
Examples
117+
--------
118+
119+
Describe an Organization Using the Default Profile
120+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
121+
122+
The following ``mongocli iam org describe`` command describes an
123+
|onprem| organization using the {+default-profile+}. The profile
124+
contains a :opsmgr:`Programmatic API Key
125+
</tutorial/configure-public-api-access/#programmatic-api-keys>` with the
126+
``Organization Owner`` role for the organization.
127+
128+
.. code-block:: sh
129+
130+
mongocli iam org describe 5b07759a08372616070df448
131+
132+
The command returns the following |json| document:
133+
134+
.. code-block:: json
135+
:copyable: false
136+
137+
{
138+
"id": "5b07759a08372616070df448",
139+
"links": [
140+
{
141+
"rel": "self",
142+
"href": "http://example.mongodb.com/api/public/v1.0/orgs/5f07759d08382616070df339"
143+
},
144+
{
145+
"rel": "http://mms.mongodb.com/groups",
146+
"href": "http://example.mongodb.com/api/public/v1.0/orgs/5b07759a08372616070df448/groups"
147+
},
148+
{
149+
"rel": "http://mms.mongodb.com/teams",
150+
"href": "http://example.mongodb.com/api/public/v1.0/orgs/5b07759a08372616070df448/teams"
151+
},
152+
{
153+
"rel": "http://mms.mongodb.com/users",
154+
"href": "http://example.mongodb.com/api/public/v1.0/orgs/5b07759a08372616070df448/users"
155+
}
156+
],
157+
"name": "Org1"
158+
}
159+
160+
Describe an Organization Using a Defined Profile
161+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
162+
163+
The following ``mongocli iam org describe`` command describes an
164+
organization in an |onprem| deployment. The command uses the
165+
``om-personalkey`` profile, which contains a
166+
:opsmgr:`Personal API Key </tutorial/configure-public-api-access/#personal-api-keys-deprecated>`.
167+
168+
.. code-block:: sh
169+
170+
mongocli iam org describe 5b07759a08372616070df448 -P om-personalkey
171+
172+
The command returns the following |json| document:
173+
174+
.. code-block:: json
175+
:copyable: false
176+
177+
{
178+
"id": "5b07759a08372616070df448",
179+
"links": [
180+
{
181+
"rel": "self",
182+
"href": "http://example.mongodb.com/api/public/v1.0/orgs/5f07759d08382616070df339"
183+
},
184+
{
185+
"rel": "http://mms.mongodb.com/groups",
186+
"href": "http://example.mongodb.com/api/public/v1.0/orgs/5b07759a08372616070df448/groups"
187+
},
188+
{
189+
"rel": "http://mms.mongodb.com/teams",
190+
"href": "http://example.mongodb.com/api/public/v1.0/orgs/5b07759a08372616070df448/teams"
191+
},
192+
{
193+
"rel": "http://mms.mongodb.com/users",
194+
"href": "http://example.mongodb.com/api/public/v1.0/orgs/5b07759a08372616070df448/users"
195+
}
196+
],
197+
"name": "Org1"
198+
}

0 commit comments

Comments
 (0)