|
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"
|
}
|
|