Skip to content

Commit 2c17dcf

Browse files
(DOCSP-11497)(DOCSP-11421): add programmatic api key to owner create … (#187)
* (DOCSP-11497)(DOCSP-11421): add programmatic api key to owner create and add agent api key to project create * (DOCSP-11497): copy review feedback * (DOCSP-11497): tech review feedback
1 parent 499a8f1 commit 2c17dcf

File tree

2 files changed

+100
-22
lines changed

2 files changed

+100
-22
lines changed

source/reference/iam-project-create.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,11 @@ solutions.
7878
:widths: 30 70
7979

8080
* - Field
81-
- Description
81+
- Description
82+
83+
* - ``agentApiKey``
84+
- :opsmgr:`Agent API key </tutorial/manage-agent-api-key/>` for the
85+
project. |onprem| only.
8286

8387
* - ``hostcounts``
8488
- Number of primary, secondary, slave, arbiter, config, master,
@@ -188,6 +192,7 @@ the terminal. For more information on these fields, see
188192
:copyable: false
189193

190194
{
195+
"agentApiKey": "7f36b2fbc702201990297cff5bbcc5688b98199a43467d421f05c6cb",
191196
"hostCounts": {
192197
"arbiter": 0,
193198
"config": 0,

source/reference/ops-manager/owner-create.txt

Lines changed: 94 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,22 @@ if the command succeeds. If the command prints errors, see
109109
- The :opsmgr:`personal API key </reference/api/api-key/index.html>`
110110
for the user. Save the key in a secure file.
111111

112+
* - ``programmaticApiKey``
113+
- object
114+
- An object describing the :opsmgr:`programmatic API key
115+
</tutorial/manage-programmatic-api-keys/>` for the user. For a
116+
detailed description of the object, see
117+
:ref:`om-org-owner-key-attrs`.
118+
119+
.. note::
120+
121+
The response contains a ``programmaticApiKey`` object only for
122+
|onprem| 4.4 and later.
123+
112124
* - ``user``
113125
- object
114-
- The user attributes that are set in |mms|. See
115-
:ref:`om-org-owner-user-attrs` for more information.
126+
- The user attributes that are set in |mms|. For a detailed
127+
description of the object, see :ref:`om-org-owner-user-attrs`.
116128

117129
.. _om-org-owner-user-attrs:
118130

@@ -147,6 +159,55 @@ User Attributes
147159
and/or related resources. The relations between |url|\s are
148160
explained in the :rfc:`Web Linking Specification <5988>`.
149161

162+
.. _om-org-owner-key-attrs:
163+
164+
Programmatic API Key Attributes
165+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
166+
167+
.. list-table::
168+
:widths: 15 10 75
169+
:header-rows: 1
170+
:stub-columns: 1
171+
172+
* - Name
173+
- Type
174+
- Description
175+
176+
* - ``desc``
177+
- string
178+
- Description of the programmatic |api| key.
179+
180+
* - ``id``
181+
- string
182+
- Unique identifier of the programmatic |api| key.
183+
184+
* - ``links``
185+
- array of objects
186+
- Array of objects with one or more links to sub-resources
187+
and/or related resources. The relations between |url|\s are
188+
explained in the :rfc:`Web Linking Specification <5988>`.
189+
190+
* - ``privateKey``
191+
- string
192+
- A series of alphanumeric characters and dashes that serve as the
193+
password of the programmatic |api| key.
194+
195+
* - ``publicKey``
196+
- string
197+
- A series of alphanumeric characters that serve as the username of
198+
the programmatic |api| key.
199+
200+
* - | ``roles``
201+
- array of objects
202+
- :opsmgr:`Roles </reference/user-roles>` assigned to the
203+
programmatic |api| key.
204+
205+
* - | ``roles``
206+
| ``.roleName``
207+
- string
208+
- Name of the assigned role. |mms| grants the programmatic
209+
|api| key the :authrole:`Global Owner` role (``GLOBAL_OWNER``).
210+
150211
.. _om-owner-create-examples:
151212

152213
Examples
@@ -219,29 +280,41 @@ Output
219280
~~~~~~
220281

221282
The :ref:`om-owner-create-example1` and :ref:`om-owner-create-example2`
222-
commands print the following fileds in the specified format to the terminal. To
283+
commands print the following fields in the specified format to the terminal. To
223284
learn more about these fields, see :ref:`om-owner-create-output`.
224285

225286
.. code-block:: json
226287
:copyable: false
227288

228289
{
229-
"apiKey": "34a93114-ec2b-4125-992e-1dd87c4148e4",
230-
"user": {
231-
"username": "[email protected]",
232-
"firstName": "Jane",
233-
"lastName": "Doe",
234-
"emailAddress": "[email protected]",
235-
"id": "5e39bd5c31cd7c0078867c03",
236-
"links": [
237-
{
238-
"rel": "self",
239-
"href": "http://om-svc.mongodb.svc.cluster.local:8080/api/public/v1.0/users/5e39bd5c31cd7c0078867c03"
240-
},
241-
{
242-
"rel": "http://mms.mongodb.com/whitelist",
243-
"href": "http://om-svc.mongodb.svc.cluster.local:8080/api/public/v1.0/users/5e39bd5c31cd7c0078867c03/whitelist"
244-
}
245-
]
246-
}
290+
"apiKey": "34a93174-ec7b-4725-972e-1dd77c4178e4",
291+
"programmaticApiKey": {
292+
"desc": "Automatically generated Global API key",
293+
"id": "{API-KEY}",
294+
"links": [{
295+
"href": "http://om-svc.mongodb.svc.cluster.local:8080/api/public/v1.0/orgs/null/apiKeys/{API-KEY}",
296+
"rel": "self"
297+
}],
298+
"privateKey": "private key string",
299+
"publicKey": "public key string",
300+
"roles": [{
301+
"roleName": "GLOBAL_OWNER"
302+
}]
303+
},
304+
"user": {
305+
"username": "[email protected]",
306+
"firstName": "Jane",
307+
"lastName": "Doe",
308+
"emailAddress": "[email protected]",
309+
"id": "5e39bd5c31cd7c0078867c03",
310+
"links": [{
311+
"rel": "self",
312+
"href": "http://om-svc.mongodb.svc.cluster.local:8080/api/public/v1.0/users/5e39bd5c31cd7c0078867c03"
313+
},
314+
{
315+
"rel": "http://mms.mongodb.com/whitelist",
316+
"href": "http://om-svc.mongodb.svc.cluster.local:8080/api/public/v1.0/users/5e39bd5c31cd7c0078867c03/whitelist"
317+
}
318+
]
319+
}
247320
}

0 commit comments

Comments
 (0)