Releases a license key from an Ops Manager installation. Use this endpoint when the installation no longer needs the license key. Ops Manager recalculates the license key status and returns it. Ops Manager records a License released audit event.
Importante
After you release a license key, you can't use it again. If you release the only usable license key, your installation has no coverage. The state changes to GRACE, and then to UNLICENSED after 90 days. To generate a new license key, see Get and Install a License Key.
Funções obrigatórias
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.
Solicitar
Send a DELETE request with the license key ID in the path.
URL base: https://{OPSMANAGER-HOST}:{PORT}/api/public/v1.0
DELETE /admin/licenses/{artifactId}Parâmetros do caminho da solicitação
O caminho da solicitação contém o seguinte parâmetro:
Parâmetro | Tipo | necessidade | Descrição |
|---|---|---|---|
| string | Obrigatório | Unique identifier of the license key to release. Retrieve this value from the |
Solicitar parâmetros de query
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. |
|
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:
|
|
Parâmetros do corpo da solicitação
Este endpoint não usa parâmetros do corpo da solicitação HTTP.
Resposta
Se o Ops Manager liberar a chave de licença, a resposta conterá o status recalculado da chave de licença. A resposta contém os seguintes campos:
Campo | Tipo | Descrição |
|---|---|---|
| objeto | Aggregated license key status of the Ops Manager installation. This field is |
| string | License key state of the installation. Ops Manager returns one of |
| string | Identifies what produced the |
| booleano | Indicates whether the state is |
| objeto | Next scheduled change to the license key state. This field is |
| string | Avaliador que impulsiona a próxima mudança. |
| string | Data e hora em que o estado atual termina. |
| string | Estado que sucede o estado atual. |
| 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. |
| string | Avaliador que emitiu o alerta. |
| string | Data e hora em que o aviso foi exibido. |
| Array de objetos | Subjects that the warning covers. Each object contains an |
| Array de objetos | Contribution of each evaluator to the |
| string | Avaliador que proferiu o veredicto. |
| string | Indique que o avaliador fez o cálculo. |
| 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 |
| string | Date and time when the renewal warning window opens. This field is |
| objeto | Details that are specific to the evaluator. This field is |
| objeto | Next change to the verdict state. The object contains |
| Array de objetos | Chaves de licença que são instaladas na instalação do Ops Manager. |
| 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. |
| booleano | Indica se o Ops Manager pode usar a chave de licença para cobertura. |
| string | Data e hora em que o MongoDB gerou a chave de licença. |
| string | Data e hora em que a chave de licença foi instalada. |
| string | Status of the license key. Ops Manager returns one of |
| string | Reason code for a |
| string | Sentence that describes why the license key is |
| string | Date and time when the coverage of the license key ends. This field is |
| Array de objetos | Grants that the license key contains. For a |
| string | Type of the grant, such as |
| string | Identifier of the grant. This field is |
| string | Data e hora de início da concessão. |
| string | Data e hora de término da subvenção. |
| Array de objetos | Entitlements that the grant carries. Each object uses the fields described for |
| objeto | Entitlements that are active now, grouped by entitlement type. Each key is an entitlement type, such as |
| string | Tipo de direito. |
| string | Product name that the entitlement applies to. This field is |
| booleano | Indica se o benefício está em vigor. |
| objeto | Validity window of the entitlement. The object contains |
Errors
If you specify an artifactId that doesn't match an installed license key, the endpoint returns the HTTP status 404. The errorCode field of the response body contains ARTIFACT_NOT_FOUND, and the detail field contains No installed artifact with that id.
Exemplo de solicitação
Use curl to send a DELETE request to the /admin/licenses/{artifactId} endpoint:
curl --user "{PUBLIC-KEY}:{PRIVATE-KEY}" --digest \ --header "Accept: application/json" \ --include \ --request DELETE \ "https://<OpsManagerHost>:<Port>/api/public/v1.0/admin/licenses/{ARTIFACT-ID}?pretty=true"Exemplo de resposta
Os exemplos a seguir mostram os cabeçalhos e o corpo da resposta de uma solicitação bem-sucedida.
Cabeçalho de resposta
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-aliveHTTP/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}Corpo de resposta
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": {}}