对于 AI 代理:可在 https://www.mongodb.com/zh-cn/docs/llms.txt 获取文档索引—通过在任何 URL 路径后添加 .md 可获取所有页面的 Markdown 版本。

切换遥测状态

为Ops Manager安装启用或禁用遥测集合。

此终结点需要具有 Global Owner 角色的API密钥。

基本 URL: https://{OPSMANAGER-HOST}:{PORT}/api/private/v1.0/telemetry

PATCH /collection/status

此端点不使用 HTTP 请求路径参数。

此终结点不使用HTTP请求查询参数。

名称
类型
必要性
说明

enabled

布尔

必需

设置为 true 以启用遥测,或设置为 false 以禁用遥测。

此端点返回一个空的JSON对象。

curl --user "{publicApiKey}:{privateApiKey}" --digest \ --header "Accept: application/json" \ --header "Content-Type: application/json" \ --include \ --request PATCH "https://<OpsManagerHost>:<Port>/api/private/v1.0/telemetry/collection/status"
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 400 Bad RequestContent-Type: application/json;charset=ISO-8859-1Date: {dateInUnixFormat}X-MongoDB-Service-Version: gitHash={gitHash};versionString={ApplicationVersion}Content-Length: {requestLengthInBytes}
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}
{}