コンテンツにジャンプ

組織

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

GET

https://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 organizations
curl -H "x-api-key: YOUR_API_KEY" https://api.capgo.app/organization/
# Get specific organization
curl -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

POST

https://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
}
ターミナル画面
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/
{
"id": "org_456"
}

キーがAPIを持っていない場合、APIは org.createAPI が返します。

{
"error": "permission_denied"
}

コピー

PUT

https://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"
}
}

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

既存の組織を削除します。対象の組織に対して削除権限が必要であり、通常はロールを通じて提供されます。このアクションは不可逆であり、関連するすべてのアプリ、バンドル(バージョン)、リソースを削除します。 org_super_admin ロール

The org.create クエリ パラメータ

「クエリ パラメータ」セクション

削除する組織の ID
  • orgId例のリクエスト

「例のリクエスト」セクション

ターミナル ウィンドウ
DELETE
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"
}
  1. 命名: 組織の明確で説明的な名前を使用する
  2. ロール: チームメンバーに適切なロールを割り当てる
  3. メール: マーケティングサイトのCapgoの登録ページや、Live Updateの製品ページで見られるUIラベルです。
  4. Logoロゴ

: 可靠なCDNでロゴをホストし、HTTPS URLを使用します。

組織から続ける

: 組織から続ける Organizations 計画ダッシュボードとAPIの運用を計画し、接続する ダッシュボードとAPIの運用を計画するには組織を使用します。 API の実装詳細について 概要 __CAPGO_KEEP_0__ の実装詳細について API キー API キーの実装詳細について デバイス デバイスの実装詳細のために Bundles バンドル