API 키 생성은 더 이상 지원되지 않습니다. 이 엔드포인트는 서비스 계정을 위해 더 이상 사용되지 않습니다. POST /api/v1/projects/{id}/service-accounts 또는 CLI의 service-account create 명령을 통해 서비스 계정을 생성합니다. 기존 키는 여전히 작동합니다. 목록 및 취소는 계속 사용할 수 있습니다.
POST /api/v1/projects/{id}/keys
curl \
--request POST 'https://agentengine.mongodb.com/api/v1/projects/{id}/keys' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--data '{
"description": "string",
"expires_in": 42
}'
요청 예시
{
"description": "string",
"expires_in": 42
}
응답 예시(406)
작업을 사용할 수 없습니다.
{
"detail": "This operation is not available in API version 2026-09-20-preview.",
"error": 406,
"errorCode": "OPERATION_NOT_IN_API_VERSION",
"parameters": [
"Accept"
],
"reason": "Not Acceptable"
}
{
"detail": "This operation supports text/event-stream, which the Accept header excludes. Remove unsupported media-type parameters or accept this type with a positive q value.",
"error": 406,
"errorCode": "UNACCEPTABLE_MEDIA_TYPE",
"parameters": [
"Accept"
],
"reason": "Not Acceptable"
}
{
"detail": "The requested API version is not supported. Supported versions: 2026-09-20-preview.",
"error": 406,
"errorCode": "UNSUPPORTED_API_VERSION",
"parameters": [
"Accept"
],
"reason": "Not Acceptable"
}
응답 예시(406)
{
"detail": "This operation is not available in API version 2026-09-20-preview.",
"error": 406,
"errorCode": "OPERATION_NOT_IN_API_VERSION",
"parameters": [
"Accept"
],
"reason": "Not Acceptable"
}
응답 예시(401)
{
"code": "string",
"error": "string",
"success": true
}
응답 예시(401)
{
"code": "string",
"error": "string",
"success": true
}
응답 예시(403)
{
"code": "string",
"error": "string",
"success": true
}
응답 예시(403)
{
"code": "string",
"error": "string",
"success": true
}
응답 예시(410)
{
"code": "string",
"error": "string",
"success": true
}
응답 예시(410)
{
"code": "string",
"error": "string",
"success": true
}