[DOCS-5885] Document Ops Manager API call for first user (GLOBAL_OWNER) Created: 21/Jul/15  Updated: 24/Feb/16  Resolved: 16/Sep/15

Status: Closed
Project: Documentation
Component/s: Cloud Manager
Affects Version/s: None
Fix Version/s: None

Type: Tracking Priority: Major - P3
Reporter: Andrew Davidson Assignee: Bob Grabar
Resolution: Done Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Documented
Related
Participants:
Days since reply: 8 years, 30 weeks ago

 Comments   
Comment by Andrew Davidson [ 22/Jul/15 ]

There is a currently-undocumented API endpoint /api/public/v1.0/unauth/users that can be used only when no user has been registered on the Ops Manager instance yet, to register a user (the user will be granted the GLOBAL_OWNER permissions).

No group is created during the use of this API call, but the returned API key grants you the ability to create groups via the created GLOBAL_OWNER user.

Example:

curl -H "Content-Type: application/json" -i -X POST "http://<ops-mgr-url>:<port>/api/public/v1.0/unauth/users" --data '
> {
>   "username": "janedoe@mongodb.com",
>   "emailAddress": "janedoe@mongodb.com",
>   "password": "Passw0rd.",
>   "firstName": "Jane",
>   "lastName": "Doe"
> }'

Returned JSON:

{
  "user": {
    "username": "janedoe@mongodb.com",
    "roles": [
      {
        "roleName": "GLOBAL_OWNER"
      }
    ],
    "links": [
      {
        "rel": "self",
        "href": "http://<ops-mgr-url>:<port>/api/public/v1.0/users/55aeb119e4b0d104a86ce257"
      },
      {
        "rel": "...",
        "href": "http://<ops-mgr-url>:<port>/api/public/v1.0/users/55aeb119e4b0d104a86ce257/whitelist"
      }
    ],
    "lastName": "Doe",
    "id": "55aeb119e4b0d104a86ce257",
    "firstName": "Jane",
    "emailAddress": "janedoe@mongodb.com"
  },
  "apiKey": "577fba7f-f25f-4499-bc81-20784b201818"
}

Generated at Thu Feb 08 07:51:11 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.