Para agentes de IA: um índice de documentação está disponível em https://www.mongodb.com/pt-br/docs/llms.txt — as versões de markdown de todas as páginas estão disponíveis anexando .md a qualquer caminho de URL.

Instale uma chave de licença no Ops Manager.

Installs a signed license key file in an Ops Manager installation to add coverage after you generate a license key in the Key Portal. If Ops Manager accepts the license key, it recalculates the license key status and returns it, and records a License installed audit event.

To access this resource, your API key must have the Global Owner role. The Global Owner role is the highest role in Ops Manager. Only users with this role can view and manage license keys.

Send a PUT request with the license key file contents as the body.

URL base: https://{OPSMANAGER-HOST}:{PORT}/api/public/v1.0

PUT /admin/licenses

Este endpoint não usa parâmetros de caminho de solicitação HTTP.

Este endpoint aceita os seguintes parâmetros de consulta:

Nome
Tipo
necessidade
Descrição
Default

pretty

booleano

Opcional

Sinalizador que indica se o corpo da resposta está em um formato pretty-print.

false

envelope

booleano

Opcional

Sinalizador que indica se deve envolver a resposta em um envelope.

Alguns clientes de API não podem acessar os cabeçalhos de resposta HTTP ou o código de status. Para corrigir isso, defina envelope=true na query.

Para endpoints que retornam um resultado, o corpo da resposta inclui:

  • status: Código de resposta HTTP

  • content: Corpo de resposta esperado

false

Send the contents of the license key file as the request body. Set the Content-Type header to application/json. The endpoint doesn't use named body parameters.

Se o Ops Manager aceitar a chave de licença, a resposta conterá o status da chave de licença recalculado. A resposta contém os seguintes campos:

Campo
Tipo
Descrição

enforcement

objeto

Aggregated license key status of the Ops Manager installation. This field is null until Ops Manager calculates the status for the first time.

enforcement.effectiveState

string

License key state of the installation. Ops Manager returns one of LICENSED, GRACE, EXPIRED, or UNLICENSED. To learn how the states map to the Ops Manager interface, see Ops Manager License Keys Overview.

enforcement.cause

string

Identifies what produced the effectiveState value.

enforcement.enforced

booleano

Indicates whether the state is EXPIRED or UNLICENSED. Ops Manager doesn't restrict any operation in these states.

enforcement.transition

objeto

Next scheduled change to the license key state. This field is null when no change is scheduled.

enforcement.transition.evaluatorId

string

Avaliador que impulsiona a próxima mudança.

enforcement.transition.inStateUntil

string

Data e hora em que o estado atual termina.

enforcement.transition.nextState

string

Estado que sucede o estado atual.

enforcement.warnings

Array de objetos

Avisos em aberto. O Ops Manager exibe um aviso de renovação antes da data de término do seu pedido. Para saber mais, consulte a Visão geral das chaves de licença do Ops Manager.

enforcement.warnings[n].evaluatorId

string

Avaliador que emitiu o alerta.

enforcement.warnings[n].since

string

Data e hora em que o aviso foi exibido.

enforcement.warnings[n].subjects

Array de objetos

Subjects that the warning covers. Each object contains an id and a since date. This array is empty when the warning applies to the whole installation.

enforcement.verdicts

Array de objetos

Contribution of each evaluator to the effectiveState value.

enforcement.verdicts[n].evaluatorId

string

Avaliador que proferiu o veredicto.

enforcement.verdicts[n].state

string

Indique que o avaliador fez o cálculo.

enforcement.verdicts[n].breachAt

string

Date and time when the breach takes effect, such as the order end date. This date is in the future while the state is LICENSED.

enforcement.verdicts[n].warningStart

string

Date and time when the renewal warning window opens. This field is null unless the verdict state is LICENSED.

enforcement.verdicts[n].metadata

objeto

Details that are specific to the evaluator. This field is null for evaluators that provide none.

enforcement.verdicts[n].transition

objeto

Next change to the verdict state. The object contains inStateUntil and nextState fields. This field is null when no change is scheduled.

licenses

Array de objetos

Chaves de licença que são instaladas na instalação do Ops Manager.

licenses[n].artifactId

string

Identificador único da chave de licença. Use este valor para liberar a chave de licença. A interface do Ops Manager exibe este valor como o ID da chave de licença.

licenses[n].usable

booleano

Indica se o Ops Manager pode usar a chave de licença para cobertura.

licenses[n].generatedAt

string

Data e hora em que o MongoDB gerou a chave de licença.

licenses[n].installedAt

string

Data e hora em que a chave de licença foi instalada.

licenses[n].status

string

Status of the license key. Ops Manager returns one of ACTIVE, EXPIRED, RELEASED, or DENIED. A license key is ACTIVE when it is usable and its order end date is in the future. A license key is EXPIRED when it is usable but its order end date passed.

licenses[n].statusCause

string

Reason code for a DENIED license key. Ops Manager returns one of CLAIM_CONFLICT, CLAIM_REVOKED, or VERIFICATION_FAILED. Ops Manager sets this field only for a DENIED license key.

licenses[n].statusReason

string

Sentence that describes why the license key is DENIED. Ops Manager sets this field only for a DENIED license key.

licenses[n].termEnd

string

Date and time when the coverage of the license key ends. This field is null when the license key has no end date.

licenses[n].grants

Array de objetos

Grants that the license key contains. For a RELEASED or DENIED license key, Ops Manager returns the grants if the stored license key still passes verification. This array is empty when verification fails.

licenses[n].grants[n].grantType

string

Type of the grant, such as contract.

licenses[n].grants[n].grantId

string

Identifier of the grant. This field is null when the issuer doesn't set it.

licenses[n].grants[n].startDate

string

Data e hora de início da concessão.

licenses[n].grants[n].endDate

string

Data e hora de término da subvenção.

licenses[n].grants[n].entitlements

Array de objetos

Entitlements that the grant carries. Each object uses the fields described for activeEntitlements.

activeEntitlements

objeto

Entitlements that are active now, grouped by entitlement type. Each key is an entitlement type, such as exemption::telemetry. Each value is an array of entitlement objects.

activeEntitlements.<type>[n].type

string

Tipo de direito.

activeEntitlements.<type>[n].productName

string

Product name that the entitlement applies to. This field is null when the entitlement has no product name.

activeEntitlements.<type>[n].active

booleano

Indica se o benefício está em vigor.

activeEntitlements.<type>[n].window

objeto

Validity window of the entitlement. The object contains start and end date fields. This field is null when the window has no bounds.

If Ops Manager rejects the license key, the response has the HTTP status from the following table. The errorCode field of the response body contains the error code, and the detail field contains the message.

The messages use the word artifact to refer to a license key.

Código de erro
HTTP Status
mensagem

ARTIFACT_MALFORMED

400

Este arquivo não pôde ser lido. Ele pode estar corrompido ou ter sido modificado após a assinatura. Entre em contato com a equipe da sua conta MongoDB para obter uma substituição.

ARTIFACT_SIGNATURE_INVALID

400

Este arquivo não pôde ser verificado; ele pode ter sido modificado após a assinatura. Entre em contato com a equipe da sua conta MongoDB para obter uma cópia de substituição.

ARTIFACT_UNTRUSTED

400

Este arquivo foi assinado para uma versão diferente do Ops Manager ou com uma chave não confiável. Entre em contato com a equipe da sua conta MongoDB para obter um arquivo compatível.

ARTIFACT_CERTIFICATE_INVALID

400

O certificado de assinatura deste arquivo não é válido para este Ops Manager. Entre em contato com a equipe da sua conta MongoDB para obter um certificado de substituição.

ARTIFACT_HOLDER_NOT_ALLOWED

403

Este artefato está vinculado a instâncias específicas do Ops Manager e não pode ser instalado nesta. Entre em contato com a equipe da sua conta MongoDB.

ARTIFACT_OUTDATED

409

Este artefato não é mais recente do que um já instalado neste Ops Manager. Instale o artefato mais recente fornecido pela sua equipe de conta do MongoDB.

Use curl to send a PUT request to the /admin/licenses endpoint:

curl --user "{PUBLIC-KEY}:{PRIVATE-KEY}" --digest \ --header "Accept: application/json" \ --header "Content-Type: application/json" \ --include \ --request PUT \ "https://<OpsManagerHost>:<Port>/api/public/v1.0/admin/licenses?pretty=true" \ --data @{LICENSE-KEY-FILE}

Os exemplos a seguir mostram os cabeçalhos e o corpo da resposta de uma solicitação bem-sucedida.

Os cabeçalhos a seguir mostram uma resposta não autorizada e uma resposta bem-sucedida:

HTTP/1.1 401 UnauthorizedContent-Type: application/json;charset=ISO-8859-1Date: {dateInUnixFormat}WWW-Authenticate: Digest realm="MMS Public API", domain="", nonce="{nonce}", algorithm=MD5, op="auth", stale=falseContent-Length: {requestLengthInBytes}Connection: keep-alive
HTTP/1.1 200 OKVary: Accept-EncodingContent-Type: application/jsonStrict-Transport-Security: max-age=300Date: {dateInUnixFormat}Connection: keep-aliveContent-Length: {requestLengthInBytes}X-MongoDB-Service-Version: gitHash={gitHash}; versionString={ApplicationVersion}

O exemplo a seguir mostra o corpo da resposta:

{ "enforcement": { "effectiveState": "LICENSED", "cause": "term:LICENSED", "enforced": false, "transition": { "evaluatorId": "term", "inStateUntil": "2027-06-30T00:00:00Z", "nextState": "GRACE" }, "warnings": [], "verdicts": [ { "evaluatorId": "term", "state": "LICENSED", "breachAt": "2027-06-30T00:00:00Z", "warningStart": "2027-02-28T00:00:00Z", "metadata": null, "transition": { "inStateUntil": "2027-06-30T00:00:00Z", "nextState": "GRACE" } } ] }, "licenses": [ { "artifactId": "{ARTIFACT-ID}", "usable": true, "generatedAt": "2026-10-01T12:00:00Z", "installedAt": "2026-11-04T15:30:00Z", "status": "ACTIVE", "statusCause": null, "statusReason": null, "termEnd": "2027-06-30T00:00:00Z", "grants": [ { "grantType": "contract", "grantId": "{GRANT-ID}", "startDate": "2026-07-01T00:00:00Z", "endDate": "2027-06-30T00:00:00Z", "entitlements": [] } ] } ], "activeEntitlements": {}}

O exemplo a seguir mostra o corpo da resposta quando o Ops Manager rejeita a chave de licença:

{ "error": 409, "reason": "Conflict", "detail": "This artifact is not newer than one already installed on this Ops Manager. Install the latest artifact issued by your MongoDB account team.", "errorCode": "ARTIFACT_OUTDATED", "parameters": []}