Retrieves the Key Manager ID of an Ops Manager installation. The Key Manager ID identifies the installation, including every instance in a high-availability setup. The Key Portal uses it to issue a license key for your installation. Ops Manager returns it in the holderId field and rejects a license key that MongoDB issued for a different Key Manager ID.
所需角色
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 GET request to retrieve the Key Manager ID.
基本 URL: https://{OPSMANAGER-HOST}:{PORT}/api/public/v1.0
GET /admin/artifacts/identity请求路径参数
此端点不使用 HTTP 请求路径参数。
请求查询参数
此端点接受以下查询参数:
名称 | 类型 | 必要性 | 说明 | 默认 |
|---|---|---|---|---|
pretty | 布尔 | Optional | 指示响应正文是否采用 pretty-print 格式的标志。 |
|
envelope | 布尔 | Optional | 指示是否将响应包装在信封中的标志。 某些 API 客户端无法访问 HTTP 响应标头或状态代码。要解决这个问题,可在查询中设置 envelope=true。 对于返回一个结果的端点,响应体包括:
|
|
请求正文参数
此端点不使用 HTTP 请求正文参数。
响应
响应包含以下字段:
字段 | 类型 | 说明 |
|---|---|---|
| 字符串 | Ops Manager 安装的关键管理器 ID。 |
请求示例
Use curl to send a GET request to the /admin/artifacts/identity endpoint:
curl --user "{PUBLIC-KEY}:{PRIVATE-KEY}" --digest \ --header "Accept: application/json" \ --include \ --request GET \ "https://<OpsManagerHost>:<Port>/api/public/v1.0/admin/artifacts/identity?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}响应体
以下示例显示了响应正文:
{ "holderId": "{KEY-MANAGER-ID}"}