비밀 이름의 유효성을 검사하고 작업 공간으로 범위가 지정된 업서트 요청을 ECP로 프록시합니다. 프로젝트 범위는 경로 ID 매개 변수에 의해 전달되며 조직은 해당 프로젝트에서 파생됩니다. 세션 JSON web token 또는 프로젝트 범위의 API 키를 허용합니다. 이로인해 CI/CD는 인터랙티브 로그인 없이 단기 사용 빌드 자격 증명을 제공할 수 있습니다. API 키는 경로에 지정된 프로젝트에 범위가 지정되어야 합니다. 호출자는 해당 프로젝트에 대한 배포서버 관리 권한이 필요합니다(PROJECT_OWNER, AGENT_DEVELOPER, 에이전트 엔진 네이티브 프로젝트의 경우 ORG_ADMIN, 또는 SYSTEM_ADMIN).
PUT /api/v1/projects/{id}/workspaces/{workspace_id}/secrets/{name}
curl \
--request PUT 'https://agentengine.mongodb.com/api/v1/projects/{id}/workspaces/{workspace_id}/secrets/{name}' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--data '{
"description": "string",
"value": "string",
"value_unchanged": true
}'
요청 예시
{
"description": "string",
"value": "string",
"value_unchanged": true
}
응답 예시(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"
}
응답 예시(200)
{}
응답 예시(200)
{}
응답 예시(400)
{
"code": "string",
"error": "string",
"success": true
}
응답 예시(400)
{
"code": "string",
"error": "string",
"success": true
}
응답 예시(403)
{
"code": "string",
"error": "string",
"success": true
}
응답 예시(403)
{
"code": "string",
"error": "string",
"success": true
}
응답 예시(404)
{
"code": "string",
"error": "string",
"success": true
}
응답 예시(404)
{
"code": "string",
"error": "string",
"success": true
}
응답 예시(413)
{
"code": "string",
"error": "string",
"success": true
}
응답 예시(413)
{
"code": "string",
"error": "string",
"success": true
}
응답 예시(429)
# Headers
Retry-After: string
# Payload
{
"code": "string",
"error": "string",
"success": true
}
응답 예시(429)
# Headers
Retry-After: string
# Payload
{
"code": "string",
"error": "string",
"success": true
}
응답 예시(502)
{
"code": "string",
"error": "string",
"success": true
}
응답 예시(502)
{
"code": "string",
"error": "string",
"success": true
}
응답 예시(503)
# Headers
Retry-After: string
# Payload
{
"code": "string",
"error": "string",
"success": true
}
응답 예시(503)
# Headers
Retry-After: string
# Payload
{
"code": "string",
"error": "string",
"success": true
}