メインコンテンツへスキップ

メンバー

Organization membersは、Capgo organizationへのアクセス権を持つユーザーです。各メンバーには、組織内での権限を決定する特定のロールが割り当てられます。セキュリティの維持とチーム内の円滑なコラボレーションのために、メンバーを適切に管理することが重要です。

  • 読み取り: リソースの閲覧は可能ですが、変更はできません
  • アップロード: 新しいbundleをアップロードしてリソースを閲覧できます
  • 書き込み: リソースの変更およびbundleのアップロードが可能
  • admin: 組織設定およびメンバーの管理が可能
  • super_admin: 組織に対する全権限を保持
  • 招待の読み取り: 読み取り権限の招待待ち
  • アップロードの招待: アップロード権限の招待待ち
  • invite_write:書き込みアクセスの招待が保留中
  • 管理者を招待:管理者アクセスの招待が保留中
  • super_adminの招待:スーパー管理者アクセスの招待が保留中
  1. ロールの割り当て:ロールを割り当てる際は、最小権限の原則に従ってください
  2. 定期的な監査:メンバーのアクセス権を定期的にレビューし、未使用のアカウントを削除してください
  3. オンボーディング: 新規メンバーの追加とロール割り当てのプロセスを明確にする
  4. オフボーディング: 組織を離脱したメンバーのアクセス権を速やかに削除する

エンドポイント

「Endpoints」セクション

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
}
}

注意:

  • 新しいメンバーを追加すると、招待メールが届きます。招待を受け入れるまで、ロールには「invite_」プレフィックスが付与されます。
  • 招待するには、ユーザーがすでに Capgo アカウントを持っている必要があります。アカウントがない場合は、まず以下でアカウントを作成してください。 https://capgo.app/register/

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

組織の全メンバーを取得します。

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"
}

すべてのエラーは、以下で説明する標準エラー形式に従います API の概要.

よくあるエラーシナリオとそのレスポンス:

// The API key has no access to the organization
{
"error": "cannot_access_organization",
"message": "You can't access this organization",
"moreInfo": { "orgId": "046a36ac-e03c-4590-9257-bd6c9dba9ee8" }
}
// Unknown role on update
{
"error": "invalid_role",
"message": "Invalid role",
"moreInfo": { "role": "owner" }
}
// Changing the role of the user who owns the API key
{
"error": "cannot_change_own_role",
"message": "You cannot change your own role",
"moreInfo": {}
}
// Removing a user who is not a member (HTTP 404)
{
"error": "organization_member_not_found",
"message": "User is not a member of this organization",
"moreInfo": { "orgId": "046a36ac-e03c-4590-9257-bd6c9dba9ee8", "email": "user@example.com" }
}
// Removing the last super admin
{
"error": "CANNOT_REMOVE_LAST_SUPER_ADMIN",
"message": "Cannot remove the last super admin from the organization",
"moreInfo": { "orgId": "046a36ac-e03c-4590-9257-bd6c9dba9ee8" }
}
  1. チームの拡大:適切なロールを持つ新しいチームメンバーを追加する
  2. アクセス制御:責任の変化に応じてメンバーの権限を管理する
  3. セキュリティ監査:メンバーリストとロールを定期的にレビューする
  4. チーム再編成:組織変更時にロールを更新する

使用している場合 メンバー セキュリティとコンプライアンスを計画するには、これを以下と連携させてください 暗号化 暗号化の実装詳細について コンプライアンス コンプライアンスの実装詳細について Capgo セキュリティスキャナー Capgo Security Scanner のプロダクトワークフローについて Capgo のセキュリティ Capgo Security のプロダクトワークフロー向け、および Capgo トラストセンター Capgo Trust Center のプロダクトワークフロー向け。