조직 범위 고객 서비스 계정을 생성하고 해당 암호를 한 번 반환합니다. 역할은 필수이며 비어 있지 않은 이름 ORG_GROUP_CREATOR 또는 ORG_READ_ONLY를 최대 하나만 허용합니다. 레거시 에이전트 엔진 이름(ORG_ADMIN, ORG_MEMBER)은 계속 허용됩니다. role_assignments는 저장된 Agent Engine 역할 반영합니다. ORG_ADMIN이 필요합니다.
body
필수 사항
요청 만들기
-
최대 길이는
500입니다. -
선택적 IP/CIDR 허용 목록. 비어 있거나 생략되면 제한이 없음을 의미합니다. 최대 100 항목입니다.
요소가
100개 이하입니다. -
최대 길이는
100입니다. -
역할은 초기 역할 설정하다 입니다. 정확히 하나 역할 필요합니다. 조직 계정은 ORG_GROUP_CREATOR 또는 ORG_READ_ONLY를 허용합니다. 프로젝트 계정은 PROJECT_OWNER, PROJECT_READ_ONLY 또는 AGENT_DEVELOPER를 허용합니다. 레거시 에이전트 엔진 이름(ORG_ADMIN, ORG_MEMBER, PROJECT_MEMBER)은 계속 허용됩니다. role_assignments는 해당 이름이 확인되는 저장된 Agent Engine 역할 반영합니다.
최소
1개,1개 이하의 요소입니다. -
시간 단위의 시크릿 TTL (선택 사항). 생략하면 기본값은 2160(90일)입니다.
POST /api/v1/organizations/{id}/service-accounts
curl \
--request POST 'https://agentengine.mongodb.com/api/v1/organizations/{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
}