내용으로 건너뛰기

멤버

Capgo 조직의 구성원은 조직에 접근할 수 있는 사용자입니다. 각 구성원은 조직 내에서 권한을 결정하는 특정 역할을 가지고 있습니다. 조직 구성원 관리는 팀 내 보안 및 협업을 유지하기 위해 중요합니다.

  • 읽기: 리소스를 볼 수 있지만 변경을 할 수 없습니다
  • 업로드: 새로운 번들을 업로드하고 리소스를 볼 수 있습니다
  • 쓰기: 리소스를 수정하고 번들을 업로드할 수 있습니다
  • 관리자: 조직 설정과 멤버를 관리할 수 있습니다
  • 슈퍼 관리자: 조직에 대한 전체적인 제어권을 가지고 있습니다

역할 초대

초대 역할
  • __CAPGO_KEEP_0__읽기 권한 초대 중
  • 업로드 권한 초대 중쓰기 권한 초대 중
  • 관리자 초대 중슈퍼 관리자 초대 중
  • Best PracticesInvite Roles
  • invite_readinvite_upload
  1. 역할 할당: 최소 권한 원칙을 따르면 역할 할당
  2. 정기적인 감사: 회원 접근을 정기적으로 검토하고 사용하지 않는 계정을 삭제
  3. 온보딩: 새로운 회원을 추가하는 데 대한 명확한 프로세스를 갖추세요. 역할 할당
  4. 오프보딩: 조직에서 떠난 회원의 접근 권한을 즉시 삭제

POST

POST

https://api.capgo.app/organization/members/

조직에 새로운 멤버를 추가하거나 기존 멤버의 역할을 업데이트합니다. 이메일은 이미 Capgo 계정이 있는 사용자에게만 초대할 수 있습니다. 이메일은 이미 Capgo 사용자와 일치해야 합니다.

요청 본문

요청 본문
interface MemberCreate {
orgId: string
email: string
role: "read" | "upload" | "write" | "admin" | "super_admin"
}

예시 요청

터미널 창
클립보드 복사
curl -X POST \
-H "authorization: your-api-key" \
-H "Content-Type: application/json" \
-d '{
"orgId": "org_123",
"email": "newmember@example.com",
"role": "write"
}' \
https://api.capgo.app/organization/members/

성공 응답

클립보드 복사
{
"status": "OK",
"data": {
"uid": "user_789",
"email": "newmember@example.com",
"role": "invite_write",
"image_url": null
}
}

Notes:

  • 새로운 멤버를 추가할 때, 그들은 초대 이메일을 받게 됩니다. 그들의 역할은 초대 받을 때까지 “invite_”로 시작하게 됩니다.
  • 사용자는 Capgo 계정을 이미 가지고 있어야 새로운 멤버를 초대할 수 있습니다. 계정이 없다면 Capgo 콘솔에서 계정을 먼저 생성해야 합니다. https://console.capgo.app/register/

https://api.capgo.app/organization/members/

조직의 모든 멤버를 조회합니다.

Query Parameters

Query Parameters 섹션
interface MemberQuery {
orgId: string
}
interface Member {
uid: string;
email: string;
image_url: string;
role: "invite_read" | "invite_upload" | "invite_write" | "invite_admin" | "invite_super_admin" | "read" | "upload" | "write" | "admin" | "super_admin";
}
터미널 창
curl -H "authorization: your-api-key" \
"https://api.capgo.app/organization/members/?orgId=org_123"
{
"data": [
{
"uid": "user_123",
"email": "john@example.com",
"image_url": "https://example.com/avatar.png",
"role": "admin"
},
{
"uid": "user_456",
"email": "jane@example.com",
"image_url": "https://example.com/avatar2.png",
"role": "write"
},
{
"uid": "user_789",
"email": "bob@example.com",
"image_url": null,
"role": "invite_read"
}
]
}

https://api.capgo.app/organization/members/

조직에서 멤버를 제거합니다. 즉시 접근 권한을 취소합니다.

요청 본문

요청 본문
interface MemberDelete {
orgId: string
email: string
}

예제 요청

예제 요청
터미널 창
curl -X DELETE \
-H "authorization: your-api-key" \
-H "Content-Type: application/json" \
-d '{
"orgId": "org_123",
"email": "user@example.com"
}' \
https://api.capgo.app/organization/members/

성공 응답

성공 응답
{
"status": "OK"
}

오류 처리

오류 처리

일반 오류 시나리오 및 응답:

// Member not found
{
"error": "Member not found",
"status": "KO"
}
// Invalid role
{
"error": "Invalid role specified",
"status": "KO"
}
// Permission denied
{
"error": "Insufficient permissions to manage members",
"status": "KO"
}
// Cannot remove last admin
{
"error": "Cannot remove the last admin from the organization",
"status": "KO"
}
// Invalid email
{
"error": "Invalid email format",
"status": "KO"
}
// Member already exists
{
"error": "Member already exists in organization",
"status": "KO"
}

일반적인 사용 사례

일반적인 사용 사례
  1. 팀 확장: 새로운 팀원 추가 및 적절한 역할 부여
  2. 접근 제어: 역할과 책임이 변할 때 멤버 권한 관리
  3. 보안 감사: 멤버 목록 및 역할을 정기적으로 검토
  4. 팀 구조 변경: 조직 구조 변경 시 역할 업데이트