アプリ
インストール手順とこのプラグインの全マークダウンガイドを含むセットアップ用質問をコピーする
Apps are the foundational entities in Capgo. Each app represents a unique Capacitor application that you can manage and update through the platform. The Apps API allows you to create, retrieve, update, and delete app configurations.
__CAPGO_KEEP_2__アプリの機能により、アプリの構成を生成、取得、更新、削除できます。
アプリの理解An app in Capgo represents your Capacitor application and includes:
- __CAPGO_KEEP_0__のアプリは、__CAPGO_KEEP_1__アプリケーションを表し、以下を含みます。アプリID: アプリケーションの固有識別子
- Name: __CAPGO_KEEP_0__
- アイコン: __CAPGO_KEEP_1__
- 設定: __CAPGO_KEEP_2__
- 所有権: __CAPGO_KEEP_3__
- 使用状況統計: __CAPGO_KEEP_4__
ベストプラクティス
: __CAPGO_KEEP_5__- 命名規則: アプリに明確で識別可能な名前を使用する
- セキュリティ: API キーとアクセス資格を保護する
- 組織: 関連するアプリを同じ組織にグループ化する
- 監視: アプリの統計とパフォーマンスを定期的に確認する
- バックアップ: 重要なアプリの構成バックアップを維持する
エンドポイント
セクション「エンドポイント」GET
セクション「GET」https://api.capgo.app/app/
アプリの情報を取得します。
クエリ パラメータ
セクション「クエリ パラメータ」page: オプション。ページ番号 (ページネーション用)limit: オプション。1 ページあたりの結果数 (デフォルト: 50)org_id: オプション。組織 ID でアプリをフィルタリングします。指定しない場合は、ユーザーがアクセスできるすべての組織のアプリを返します。
特定のアプリを取得する場合:
- URL パスにアプリ ID を使用します。
https://api.capgo.app/app/:app_id
レスポンス タイプ
セクション「レスポンス タイプ」注意: last_version アプリの最後にアップロードされたバンドル(バージョン)を指します。
interface App { app_id: string created_at: string | null default_upload_channel: string icon_url: string id: string | null last_version: string | null // last bundle (version) name name: string | null owner_org: string retention: number transfer_history: Json[] | null updated_at: string | null user_id: string | null}例:リクエスト
「例:リクエスト」のセクション# Get all appscurl -H "authorization: your-api-key" \ "https://api.capgo.app/app/"
# Get apps from a specific organizationcurl -H "authorization: your-api-key" \ "https://api.capgo.app/app/?org_id=046a36ac-e03c-4590-9257-bd6c9dba9ee8"
# Get specific appcurl -H "authorization: your-api-key" \ "https://api.capgo.app/app/com.demo.app"例:レスポンス
「例:レスポンス」のセクション{ "data": [ { "app_id": "com.demo.app", "created_at": "2024-01-01T00:00:00Z", "default_upload_channel": "dev", "icon_url": "https://example.com/icon.png", "id": "550e8400-e29b-41d4-a716-446655440000", "last_version": "1.0.0", "name": "Demo App", "owner_org": "046a36ac-e03c-4590-9257-bd6c9dba9ee8", "retention": 2592000, "transfer_history": null, "updated_at": "2024-01-01T00:00:00Z", "user_id": "6aa76066-55ef-4238-ade6-0b32334a4097" } ]}POST
「POST」のセクションhttps://api.capgo.app/app/
新しいアプリを作成します。
リクエストボディ
「リクエストボディ」セクションinterface CreateApp { app_id: string name: string icon?: string owner_org: string}リクエストの例
「リクエストの例」セクション# Create new appcurl -X POST \ -H "authorization: your-api-key" \ -H "Content-Type: application/json" \ -d '{ "name": "My New App", "app_id": "com.demo.myapp", // this id is unique in Capgo This cannot be reused by any account. "icon": "https://example.com/icon.png", "owner_org": "046a36ac-e03c-4590-9257-bd6c9dba9ee8" }' \ https://api.capgo.app/app/成功レスポンス
「成功レスポンス」セクション{ "app_id": "My New App", "created_at": "2024-01-01T00:00:00Z", "default_upload_channel": "dev", "icon_url": "https://example.com/icon.png", "id": "550e8400-e29b-41d4-a716-446655440000", "name": "My New App", "owner_org": "046a36ac-e03c-4590-9257-bd6c9dba9ee8", "retention": 2592000, "updated_at": "2024-01-01T00:00:00Z"}https://api.capgo.app/app/:app_id
既存アプリを更新します。アプリIDはURLパスで指定されます。
Request Body
Section titled “Request Body”interface UpdateApp { name?: string icon?: string retention?: number}Example Request
Section titled “Example Request”curl -X PUT \ -H "authorization: your-api-key" \ -H "Content-Type: application/json" \ -d '{ "name": "Updated App Name", "icon": "https://example.com/updated-icon.png", "retention": 45 }' \ https://api.capgo.app/app/com.demo.appSuccess Response
Section titled “Success Response”{ "app_id": "com.demo.app", "created_at": "2024-01-01T00:00:00Z", "default_upload_channel": "dev", "icon_url": "https://example.com/updated-icon.png", "id": "550e8400-e29b-41d4-a716-446655440000", "name": "Updated App Name", "owner_org": "046a36ac-e03c-4590-9257-bd6c9dba9ee8", "retention": 45, "updated_at": "2024-01-01T00:00:00Z"}削除
セクション:削除https://api.capgo.app/app/:app_id
アプリとすべての関連リソースを削除します。アプリIDはURLパスで指定されます。このアクションは元に戻すことができないため、極めて注意してください。
例のリクエスト
セクション:例のリクエストcurl -X DELETE \ -H "authorization: your-api-key" \ https://api.capgo.app/app/com.demo.app成功応答
セクション:成功応答{ "status": "ok"}エラー処理
セクション:エラー処理一般的なエラーシナリオとその対応:
// App not found{ "error": "App not found", "status": "KO"}
// Duplicate custom ID{ "error": "Custom ID already in use", "status": "KO"}
// Invalid parameters{ "error": "Invalid app configuration", "status": "KO"}
// Permission denied{ "error": "Insufficient permissions to manage app", "status": "KO"}
// Organization access denied{ "status": "You do not have access to this organization"}一般的な使用例
「一般的な使用例」のセクション- 新しいアプリを作成
// Set up a new app{ "name": "Production App", "owner_org": "046a36ac-e03c-4590-9257-bd6c9dba9ee8"}- アプリの構成を更新
// Change app name and icon{ "name": "Rebranded App Name", "icon": "https://example.com/new-icon.png"}- 保持ポリシーを設定
// Configure automatic bundle cleanup{ "retention": 30 // Keep bundles for 30 days}- 組織によってアプリを取得
# List all apps in a specific organizationcurl -H "authorization: your-api-key" \ "https://api.capgo.app/app/?org_id=046a36ac-e03c-4590-9257-bd6c9dba9ee8"リソース管理
「リソース管理」のセクション- ストレージ最適化: ストレージ使用量を監視し、適切な保持ポリシーを設定
- 組織: 関連アプリを単一の組織下にグループ化
- アクセス制御: チームメンバーがアプリ設定を変更できるように管理
- バックアップ戦略: 重要なアプリ構成と設定をバックアップ
__CAPGO_KEEP_0__
「アプリから続ける」セクション__CAPGO_KEEP_0__を使用している場合 __CAPGO_KEEP_0__ APIと接続して、APIの概要を確認してください。 APIの概要 APIの概要の実装詳細については、ここを参照してください。 「導入」 「導入」の実装詳細については、ここを参照してください。 APIのキー APIのキーに関する実装詳細については、ここを参照してください。 「デバイス」 「デバイス」に関する実装詳細については、ここを参照してください。 バンドル バンドルの実装詳細について