Docs Menu
Docs Home
/ /

Crear el primer usuario

Create the first Ops Manager user. You can call this endpoint without having an Clave API.

Importante

Excepciones

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

POST /unauth/users

Este punto final no utiliza parámetros de ruta de solicitud HTTP.

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 accessList y valor.

Nombre
Tipo
Necesidad
Descripción

username

string

Requerido

Nombre de usuario del primer usuario de Ops Manager. Validado según el valor de la mms.email.validation propiedad:

Valor
Descripción

false

(Predeterminado) No es necesario que el nombre de usuario sea una dirección de correoelectrónico.

loose

El nombre de usuario debe contener un símbolo @ seguido de un punto.

strict

El nombre de usuario debe cumplir con una estricta expresión regular de validación de dirección de correo electrónico.

Consulta mms.email.validation para obtener más detalles.

El username suele ser una dirección de correo electrónico. Si establece este valor como una dirección de correo electrónico, no necesita establecer el valor emailAddress explícitamente.

password

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.

emailAddress

string

Opcional

Dirección de correo electrónico del primer usuario de Ops Manager.

firstName

string

Requerido

Nombre del primer usuario de Ops Manager.

lastName

string

Requerido

Apellido del primer usuario de Ops Manager.

Nombre
Tipo
Descripción

programmaticApiKey

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 links arrays in responses include at least one link called self. The relationships between URLs are explained in the Especificación de enlaces web.

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 Global Owner role (GLOBAL_OWNER).

user

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 links matrices en las respuestas incluyen al menos un enlace self llamado. Las relaciones entre las URLse explican en la Especificación de Enlaces Web.

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 Global Owner rolGLOBAL_OWNER ().

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.

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"
}'
HTTP/1.1 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
HTTP/1.1 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}
{
"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"
}
}

Volver

Actualizar roles

En esta página