Ops Manager는 라이선스 키 상태를 매시간 그리고 라이선스 키를 설치하거나 해제한 후에 계산합니다. 예를 들어 API 외부에서 검증 문제를 해결한 후와 같이 예약된 다음 계산을 기다리지 않고 필요에 따라 상태를 다시 계산하려면 이 엔드포인트를 사용하십시오.
필수 역할
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 POST request. The endpoint has no request body.
기본 URL: https://{OPSMANAGER-HOST}:{PORT}/api/public/v1.0
POST /admin/licenses/recompute요청 경로 매개변수
이 엔드포인트는 HTTP 요청 경로 매개변수를 사용하지 않습니다.
요청 쿼리 매개변수
이 엔드포인트는 다음 쿼리 매개변수를 허용합니다.
이름 | 유형 | 필요성 | 설명 | 기본값 |
|---|---|---|---|---|
pretty | 부울 | 옵션 | 응답 본문이 pretty-print 형식인지 여부를 나타내는 플래그입니다. |
|
envelope | 부울 | 옵션 | 응답을 엔벨로프에 래핑할지 여부를 나타내는 플래그입니다. 일부 API 클라이언트는 HTTP 응답 헤더 또는 상태 코드에 액세스할 수 없습니다. 이 문제를 해결하려면 쿼리에서 envelope=true를 설정합니다. 하나의 결과를 반환하는 엔드포인트의 경우 응답 본문에는 다음이 포함됩니다.
|
|
요청 본문 매개변수
이 엔드포인트는 HTTP 요청 본문 매개변수를 사용하지 않습니다.
응답
응답에는 재계산된 라이선스 키 상태가 포함되어 있습니다. 응답에는 다음 필드가 포함됩니다.
필드 | 유형 | 설명 |
|---|---|---|
| 객체 | Aggregated license key status of the Ops Manager installation. This field is |
| 문자열 | License key state of the installation. Ops Manager returns one of |
| 문자열 | Identifies what produced the |
| 부울 | Indicates whether the state is |
| 객체 | Next scheduled change to the license key state. This field is |
| 문자열 | 미래의 변화를 주도하는 평가자. |
| 문자열 | 현재 상태가 종료되는 날짜 및 시간. |
| 문자열 | 현 상태를 따르는 상태. |
| 객체 배열 | 갱신 경고가 열려 있습니다. Ops Manager는 주문 만료일 이전에 갱신 경고를 표시합니다. 자세한 내용은 Ops Manager 라이선스 키 개요를 참조하세요. |
| 문자열 | 경고를 제기한 평가자. |
| 문자열 | 경고 메시지가 발생한 날짜와 시간입니다. |
| 객체 배열 | Subjects that the warning covers. Each object contains an |
| 객체 배열 | Contribution of each evaluator to the |
| 문자열 | 판결을 내린 평가자. |
| 문자열 | 평가자가 계산했음을 명시하십시오. |
| 문자열 | Date and time when the breach takes effect, such as the order end date. This date is in the future while the state is |
| 문자열 | Date and time when the renewal warning window opens. This field is |
| 객체 | Details that are specific to the evaluator. This field is |
| 객체 | Next change to the verdict state. The object contains |
| 객체 배열 | Ops Manager 설치에 포함된 라이선스 키입니다. |
| 문자열 | 라이선스 키의 고유 식별자입니다. 이 값을 사용하여 라이선스 키를 해제할 수 있습니다. Ops Manager 인터페이스에서는 이 값이 라이선스 키 ID로 표시됩니다. |
| 부울 | Ops Manager가 해당 라이선스 키를 적용 범위에 사용할 수 있는지 여부를 나타냅니다. |
| 문자열 | MongoDB가 라이선스 키를 생성한 날짜 및 시간. |
| 문자열 | 라이선스 키가 설치된 날짜 및 시간입니다. |
| 문자열 | Status of the license key. Ops Manager returns one of |
| 문자열 | Reason code for a |
| 문자열 | Sentence that describes why the license key is |
| 문자열 | Date and time when the coverage of the license key ends. This field is |
| 객체 배열 | Grants that the license key contains. For a |
| 문자열 | Type of the grant, such as |
| 문자열 | Identifier of the grant. This field is |
| 문자열 | 보조금 지급이 시작되는 날짜 및 시간. |
| 문자열 | 보조금 지급이 종료되는 날짜와 시간. |
| 객체 배열 | Entitlements that the grant carries. Each object uses the fields described for |
| 객체 | Entitlements that are active now, grouped by entitlement type. Each key is an entitlement type, such as |
| 문자열 | 권한 유형. |
| 문자열 | Product name that the entitlement applies to. This field is |
| 부울 | 자격이 유효한지 여부를 나타냅니다. |
| 객체 | Validity window of the entitlement. The object contains |
요청 예시
Use curl to send a POST request to the /admin/licenses/recompute endpoint:
curl --user "{PUBLIC-KEY}:{PRIVATE-KEY}" --digest \ --header "Accept: application/json" \ --include \ --request POST \ "https://<OpsManagerHost>:<Port>/api/public/v1.0/admin/licenses/recompute?pretty=true"응답 예시
다음 예시는 요청이 성공적으로 처리되었을 때의 응답 헤더와 응답 본문을 보여줍니다.
응답 헤더
다음 헤더는 권한 없음 응답과 권한 성공 응답을 보여줍니다.
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}응답 본문
다음 예시는 응답 본문을 보여줍니다.
{ "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": {}}