組織
このプラグインのインストール手順と完全なマークダウンガイドを含む設定プロンプトをコピーする
Organizations are the top-level entities in Capgo. They allow you to group apps, team members, and resources under a single umbrella. Each organization can have multiple members with different roles and permissions.
組織
組織- 組織を作成する
- 組織の設定を管理する
- 組織情報を更新する
- 組織の詳細を取得する
エンドポイント
エンドポイントGET
GEThttps://api.capgo.app/organization/
組織情報の取得 orgId パラメータが指定されている場合は、指定された組織を1件返します。指定されていない場合は、利用可能なすべての組織を返します。
クエリ パラメータ
クエリ パラメータorgId組織 ID (optional):
レスポンス形式
クレジットinterface Organization { id: string created_by: string created_at: string updated_at: string logo: string | null name: string management_email: string customer_id: string | null}コピー
例のリクエスト# Get all organizationscurl -H "x-api-key: YOUR_API_KEY" https://api.capgo.app/organization/
# Get specific organizationcurl -H "x-api-key: YOUR_API_KEY" https://api.capgo.app/organization/?orgId=org_123例外応答
例外応答{ "data": { "id": "org_123", "name": "My Company", "created_at": "2024-01-01T00:00:00Z", "updated_at": "2024-01-01T00:00:00Z", "logo": "https://example.com/logo.png", "management_email": "admin@example.com", "customer_id": "cus_123" }}POST
POSThttps://api.capgo.app/organization/
新しい組織を作成します。
キーがAPIである場合、キーにはグローバル org.create 許可と現在の組織スコープ org_admin または org_super_admin バインディングが必要です。このバインディングは必要です。
リクエストが成功した場合、Capgoは自動的に同じAPIキーを割り当てます。 org_super_admin __CAPGO_KEEP_0__の新しい組織に適用されます。
interface OrganizationCreate { name: string email?: string estimatedMau?: number website?: string}__CAPGO_KEEP_0__
Section titled “サンプルリクエスト”curl -X POST \ -H "x-api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "New Organization", "email": "admin@example.com", "website": "https://example.com" }' \ https://api.capgo.app/organization/サンプルレスポンス
Section titled “サンプルレスポンス”{ "id": "org_456"}キーがAPIを持っていない場合、APIは org.createAPI が返します。
{ "error": "permission_denied"}コピー
PUThttps://api.capgo.app/organization/
指定された組織に管理者権限がある場合にのみ、既存の組織を更新します。
リクエストボディ
リクエストボディinterface OrganizationUpdate { orgId: string logo?: string name?: string management_email?: string}パブリック API の組織
「例のリクエスト」curl -X PUT \ -H "x-api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "orgId": "org_123", "name": "New Company Name", "management_email": "newemail@example.com" }' \ https://api.capgo.app/organization/Capacitor API の組織
サンプル レスポンス{ "status": "Organization updated", "data": { "id": "org_123", "name": "New Company Name", "management_email": "newemail@example.com" }}DELETE
「DELETE」セクションhttps://api.capgo.app/organization/
既存の組織を削除します。対象の組織に対して削除権限が必要であり、通常はロールを通じて提供されます。このアクションは不可逆であり、関連するすべてのアプリ、バンドル(バージョン)、リソースを削除します。 org_super_admin ロール
The org.create クエリ パラメータ
「クエリ パラメータ」セクション
削除する組織の IDorgId例のリクエスト
「例のリクエスト」セクション
ターミナル ウィンドウcurl -X DELETE \ -H "x-api-key: YOUR_API_KEY" \ https://api.capgo.app/organization/?orgId=org_123例の応答
例の応答のセクション{ "status": "ok"}エラー処理
エラー処理のセクション一般的なエラーシナリオとその応答:
// Invalid API key{ "error": "Invalid API key", "status": "KO"}
// Missing required field{ "error": "Name is required", "status": "KO"}
// Insufficient permissions{ "error": "Admin role required", "status": "KO"}ベストプラクティス
ベストプラクティスのセクション- 命名: 組織の明確で説明的な名前を使用する
- ロール: チームメンバーに適切なロールを割り当てる
- メール: マーケティングサイトのCapgoの登録ページや、Live Updateの製品ページで見られるUIラベルです。
- Logoロゴ
: 可靠なCDNでロゴをホストし、HTTPS URLを使用します。
組織から続ける: 組織から続ける Organizations 計画ダッシュボードとAPIの運用を計画し、接続する ダッシュボードとAPIの運用を計画するには組織を使用します。 API の実装詳細について 概要 __CAPGO_KEEP_0__ の実装詳細について API キー API キーの実装詳細について デバイス デバイスの実装詳細のために Bundles バンドル