Create the first Ops Manager user. You can call this endpoint without having an Clave API.
Importante
Excepciones
This endpoint cannot be used if Ops Manager uses LDAP for authentication.
This endpoint can create the first user only if Ops Manager runs in
Invitation Only Mode.
Ops Manager grants the first Ops Manager programmatic API key created through this endpoint the GLOBAL_OWNER role. The returned JSON document includes the first programmatic API key, which you can use to make further API calls.
This endpoint doesn't create projects or organizations. With the new programmatic API key that it created, you can call the Create a Project endpoint. That endpoint can create a project and organization in one API call. You can't login to Ops Manager until after you have created a project.
Puede utilizar este punto final para crear usuarios adicionales con las siguientes advertencias:
Ops Manager doesn't grant the GLOBAL_OWNER role for those subsequent users unless you add the role to the API request.
Ops Manager doesn't create a programmatic API key for subsequent users.
URL base: https://{OPSMANAGER-HOST}:{PORT}/api/public/v1.0
Resource
POST /unauth/users
Parámetros de la ruta de solicitud
Este punto final no utiliza parámetros de ruta de solicitud HTTP.
Parámetros de consulta de solicitud
Nombre | Tipo | Descripción |
|---|---|---|
lista de acceso | string | Dirección IP que desea agregar a la lista de acceso para el primer usuario de Ops Manager. Puede agregar más de un parámetro |
Parámetros del cuerpo de la solicitud
Nombre | Tipo | Necesidad | Descripción | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| string | Requerido | Nombre de usuario del primer usuario de Ops Manager. Validado según el valor de la
Consulta El | ||||||||
| string | Requerido | Password of the first Ops Manager user. This field is not included in the HTTP response body. Ops Manager sends this in the HTTP request only when creating the first Ops Manager user. | ||||||||
| string | Opcional | Dirección de correo electrónico del primer usuario de Ops Manager. | ||||||||
| string | Requerido | Nombre del primer usuario de Ops Manager. | ||||||||
| string | Requerido | Apellido del primer usuario de Ops Manager. |
Respuesta
Nombre | Tipo | Descripción |
|---|---|---|
| Objeto | Details of the first programmatic API key created in Ops Manager. |
programmaticApiKey.desc | string | Description of the first programmatic API key. |
programmaticApiKey.id | string | Unique identifier of the first programmatic API key. |
programmaticApiKey.links | matriz de objetos | One or more links to sub-resources and/or related resources. All |
programmaticApiKey.privateKey | string | Thirty-one alphanumeric characters and dashes that serve as the password of the first programmatic API key. |
programmaticApiKey.publicKey | string | Six alphanumeric characters that serve as the username of the first programmatic API key. |
programmaticApiKey.roles | matriz de objetos | Roles assigned to the first programmatic API key. |
programmaticApiKey.roles.roleName | string | Name of the assigned role. Ops Manager grants the first programmatic API key the |
| Objeto | Detalles del primer usuario de Ops Manager. |
user.emailAddress | string | Dirección de correo electrónico del primer usuario de Ops Manager. |
user.firstName | string | Nombre del primer usuario de Ops Manager. |
user.id | string | Identificador único del primer usuario de Ops Manager. |
user.lastName | string | Apellido del primer usuario de Ops Manager. |
user.links | matriz de objetos | Uno o más enlaces a subrecursos o recursos relacionados. Todas las |
user.mobileNumber | string | Número de móvil del primer usuario de Ops Manager. |
user.roles | matriz de objetos | Roles asignados al primer usuario de Ops Manager. |
user.roles.roleName | string | Nombre del rol asignado. Ops Manager otorga al primer usuario de Ops Manager el |
user.teamIds | matriz de cadenas | Lista de identificadores únicos para los equipos a los que pertenece el primer usuario de Ops Manager. |
user.username | string | Nombre de usuario del primer usuario de Ops Manager. |
Ejemplo de solicitud
curl --digest \ --header "Accept: application/json" \ --header "Content-Type: application/json" \ --include \ --request POST "https://<OpsManagerHost>:<Port>/api/public/v1.0/unauth/users?pretty=true&accessList=1.2.3.4&accessList=2.3.4.5" \ --data ' { "username": "jane.doe@example.com", "password": "Passw0rd.", "firstName": "Jane", "lastName": "Doe" }'
Ejemplo de respuesta
Encabezado de respuesta
401 Unauthorized Content-Type: application/json;charset=ISO-8859-1 Date: {dateInUnixFormat} WWW-Authenticate: Digest realm="MMS Public API", domain="", nonce="{nonce}", algorithm=MD5, op="auth", stale=false Content-Length: {requestLengthInBytes} Connection: keep-alive
201 Created Vary: Accept-Encoding Content-Type: application/json Strict-Transport-Security: max-age=300 Date: {dateInUnixFormat} Connection: keep-alive Content-Length: {requestLengthInBytes} X-MongoDB-Service-Version: gitHash={gitHash}; versionString={ApplicationVersion}
Cuerpo de respuesta
{ "programmaticApiKey": { "desc": "Automatically generated Global API key", "id": "{API-KEY}", "links": [{ "href": "http://<OpsManagerHost>:<Port>/api/public/v1.0/orgs/null/apiKeys/{API-KEY}", "rel": "self" }], "privateKey": "private key string", "publicKey": "public key string", "roles": [{ "roleName": "GLOBAL_OWNER" }] }, "user": { "emailAddress": "jane.doe@example.com", "firstName": "Jane", "id": "{USER-ID}", "lastName": "Doe", "links": [ { "href" : "https://<OpsManagerHost>:<Port>/api/public/v1.0/users/{USER-ID}", "rel" : "self" } ], "roles": [ { "roleName": "GLOBAL_OWNER" } ], "username": "jane.doe@example.com" } }