프로젝트 범위의 고객 서비스 계정을 생성하고 해당 비밀을 한 번 반환합니다. 역할은 정확히 하나의 이름을 허용합니다. PROJECT_OWNER, PROJECT_READ_ONLY 또는 AGENT_DEVELOPER. PROJECT_MEMBER 여전히 허용됩니다. 역할 할당은 저장된 에이전트 엔진 역할을 반영합니다. 프로젝트 소유자가 필요합니다. 소유 조직의 조직 관리자도 허용됩니다.
body
필수 사항
요청 생성
-
최대 길이는
500입니다. -
선택 사항 IP/CIDR 허용 목록. 비워 두거나 생략되면 제한이 없습니다. 최대 100 항목.
요소가
100개 이하입니다. -
최대 길이는
100입니다. -
역할은 초기 역할 세트입니다. 하나의 역할만 필요합니다. 조직 계정은 ORG_GROUP_CREATOR 또는 ORG_READ_ONLY를 허용합니다. 프로젝트 계정은 프로젝트 소유자, 프로젝트 읽기 전용 또는 에이전트 개발자를 허용합니다. 레거시 에이전트 엔진 이름(ORG_ADMIN, ORG_MEMBER, PROJECT_MEMBER)은 여전히 허용됩니다. 역할 할당은 해당 이름이 해결되는 저장된 에이전트 엔진 역할을 반영합니다.
최소
1개,1개 이하의 요소입니다. -
선택 사항 비밀 TTL(시간). 생략하면 2160 (90 일)이 기본값입니다.
게시 /api/v1/프로젝트/{id}/서비스 계정
curl \
--request POST 'https://agentengine.mongodb.com/api/v1/projects/{id}/service-accounts' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--data '{
"description": "string",
"ip_access_list": [
"string"
],
"name": "string",
"roles": [
"string"
],
"secret_expires_after_hours": 42
}'
요청 예시
{
"description": "string",
"ip_access_list": [
"string"
],
"name": "string",
"roles": [
"string"
],
"secret_expires_after_hours": 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"
}
응답 예시(201)
{
"client_secret": "string",
"service_account": {
"active_secret": {
"created_at": "string",
"expires_at": "string",
"last_used_at": "string",
"masked_value": "string"
},
"client_id": "string",
"created_at": "string",
"description": "string",
"id": "string",
"ip_access_list": [
"string"
],
"is_active": true,
"is_system_managed": true,
"name": "string",
"org_id": "string",
"owner": "string",
"project_id": "string",
"role_assignments": [
{
"org_id": "string",
"project_id": "string",
"role": "string"
}
],
"type": "string",
"updated_at": "string"
}
}
응답 예시(201)
{
"client_secret": "string",
"service_account": {
"active_secret": {
"created_at": "string",
"expires_at": "string",
"last_used_at": "string",
"masked_value": "string"
},
"client_id": "string",
"created_at": "string",
"description": "string",
"id": "string",
"ip_access_list": [
"string"
],
"is_active": true,
"is_system_managed": true,
"name": "string",
"org_id": "string",
"owner": "string",
"project_id": "string",
"role_assignments": [
{
"org_id": "string",
"project_id": "string",
"role": "string"
}
],
"type": "string",
"updated_at": "string"
}
}
응답 예시(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
}
응답 예시(409)
{
"code": "string",
"error": "string",
"success": true
}
응답 예시(409)
{
"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
}
응답 예시(500)
{
"code": "string",
"error": "string",
"success": true
}
응답 예시(500)
{
"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
}