시크릿 이름의 유효성을 검사하고 작업 공간으로 범위가 지정된 ECP에 업서트 요청 프록시합니다. 프로젝트 범위는 경로 ID 경로 매개 변수에 의해 전달되며 조직은 해당 프로젝트 에서 파생됩니다. 세션 JWT 또는 프로젝트 범위 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
}