创建新的 API 密钥 已弃用

发布 /groups/{groupId}/apps/{appId}/api_keys

创建新的 API 密钥

路径参数

application/json

body 必需

要创建的 API 密钥。

  • 名称 字符串 必需

响应

  • 201 application/json

    已成功创建 API 密钥。

    隐藏响应属性 显示响应属性 对象
    • _id 字符串
    • key 字符串
    • 名称 字符串
    • 残疾人 字符串
POST /groups/{groupId}/apps/{appId}/api_keys
curl \
 --request POST 'https://services.cloud.mongodb.com/api/admin/v3.0/groups/{groupId}/apps/{appId}/api_keys' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"name":"string"}'
请求示例
{
  "name": "string"
}
响应示例 (201)
{
  "_id": "string",
  "key": "string",
  "name": "string",
  "disabled": "string"
}