Skip to content

Apps

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_0__のアプリの管理

「__CAPGO_KEEP_0__のアプリの理解」

Capgoのアプリは、Capacitorアプリケーションを表し、以下を含みます。

  • アプリID: アプリケーションに一意の識別子
  • 名前: ユーザーが読みやすいアプリケーションの名前
  • アイコン: ダッシュボードでアプリの視覚的識別子
  • アプリの設定: __CAPGO_KEEP_0__の更新を配信する方法を制御する設定
  • 所有権: 組織とユーザーへのアクセス情報
  • 使用状況統計: インストールと更新に関するメトリクス
  1. ネーミングコンバンション: アプリの名前を明確で識別可能なものにします
  2. セキュリティ: APIキーとアクセス資格を保護する
  3. 組織:
  4. : :
  5. : :

:

:

:

:

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 apps
curl -H "authorization: your-api-key" \
"https://api.capgo.app/app/"
# Get apps from a specific organization
curl -H "authorization: your-api-key" \
"https://api.capgo.app/app/?org_id=046a36ac-e03c-4590-9257-bd6c9dba9ee8"
# Get specific app
curl -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"
}
]
}

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

新しいアプリを作成します。

interface CreateApp {
app_id: string
name: string
icon?: string
owner_org: string
}
ターミナルウィンドウ
# Create new app
curl -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パスに指定されています。

interface UpdateApp {
name?: string
icon?: string
retention?: number
}
ターミナル画面
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.app
{
"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"
}

DELETE

削除

https://api.capgo.app/app/:app_id

URLパスに指定されたアプリIDを指定して、アプリと関連するすべてのリソースを削除します。極めて注意してください。このアクションは取り消すことができません。

ターミナルウィンドウ
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"
}
  1. 新しいアプリを作成
// Set up a new app
{
"name": "Production App",
"owner_org": "046a36ac-e03c-4590-9257-bd6c9dba9ee8"
}
  1. アプリ設定を更新
// Change app name and icon
{
"name": "Rebranded App Name",
"icon": "https://example.com/new-icon.png"
}
  1. 保持ポリシーを設定
// Configure automatic bundle cleanup
{
"retention": 30 // Keep bundles for 30 days
}
  1. 組織ごとのアプリを取得
ターミナル画面
# List all apps in a specific organization
curl -H "authorization: your-api-key" \
"https://api.capgo.app/app/?org_id=046a36ac-e03c-4590-9257-bd6c9dba9ee8"
  1. ストレージ最適化ストレージ使用状況を監視し、適切な保持ポリシーを設定
  2. Organization: グループ化されたアプリを 1 つの組織下に管理
  3. Access Control: アプリ設定を変更できるチームメンバーを管理
  4. Backup Strategy: アプリの重要な設定と構成をバックアップ

Keep going from Apps

アプリから続ける

If you are using アプリ をダッシュボードと API の作業を計画する場合、API に接続してください API Overview 実装詳細については API の概要を参照してください。 概要 実装詳細については概要を参照してください。 API キー 実装詳細については API キーを参照してください。 デバイス 実装詳細についてはデバイスを参照してください。 バンドル 実装詳細についてはバンドルを参照してください。