Apps
Apps are the foundational entities in Capgo. Each Application represents a unique Capacitor Application that you can manage and Mise à jour through the platform. The Apps API allows you to Créer, retrieve, Mise à jour, and Supprimer Application configurations.
Understanding Apps
Section titled “Understanding Apps”An Application in Capgo represents your Capacitor Application and includes:
- Application ID: Unique identifier for your Application
- Name: Human-readable name of your Application
- Icons: Visual identifiers for your Application in the Tableau de bord
- Configuration: Paramètres that control how Mises à jour are delivered
- Ownership: Organisation and Utilisateur access Information
- Utilisation Statistiques: Metrics À propos installs and Mises à jour
Best Practices
Section titled “Best Practices”- Naming Convention: Use clear, identifiable names for your apps
- Sécurité: Protect your Clés API and access credentials
- Organisation: Group related apps under the same Organisation
- Monitoring: Regularly Vérifier Application Statistiques and performance
- Backup: Maintain Configuration backups for critical apps
Endpoints
Section titled “Endpoints”https://api.capgo.app/app/
Retrieve Information À propos your apps.
Query Paramètres
Section titled “Query Paramètres”page: Optional. Page number for paginationlimit: Optional. Number of results per page (default: 50)org_id: Optional. Filter apps by organization ID. If not provided, returns apps from all organizations the user has access to
For getting a specific Application:
- Use the app ID in the URL path:
https://api.capgo.app/app/:app_id
Response Type
Section titled “Response Type”interface App { app_id: string created_at: string | null default_upload_channel: string icon_url: string id: string | null last_version: string | null name: string | null owner_org: string retention: number transfer_history: Json[] | null updated_at: string | null user_id: string | null}Exemple Request
Section titled “Exemple Request”# 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"Exemple Response
Section titled “Exemple Response”{ "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/
Créer a Nouveau Application.
Request Body
Section titled “Request Body”interface CreateApp { app_id: string name: string icon?: string owner_org: string}Exemple Request
Section titled “Exemple Request”# 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/Succès Response
Section titled “Succès Response”{ "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
Mise à jour an existing Application. The Application ID is specified in the URL path.
Request Body
Section titled “Request Body”interface UpdateApp { name?: string icon?: string retention?: number}Exemple Request
Section titled “Exemple 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.appSuccès Response
Section titled “Succès 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"}Supprimer
Section titled “Supprimer”https://api.capgo.app/app/:app_id
Supprimer an Application and all associated resources. The Application ID is specified in the URL path. Use with extreme Attention as this action cannot be undone.
Exemple Request
Section titled “Exemple Request”curl -X DELETE \ -H "authorization: your-api-key" \ https://api.capgo.app/app/com.demo.appSuccès Response
Section titled “Succès Response”{ "status": "ok"}Erreur Handling
Section titled “Erreur Handling”Common Erreur scenarios and their responses:
// 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"}Common Use Cases
Section titled “Common Use Cases”- Créer Nouveau Application
// Set up a new app{ "name": "Production App", "owner_org": "046a36ac-e03c-4590-9257-bd6c9dba9ee8"}- Mise à jour Application Configuration
// Change app name and icon{ "name": "Rebranded App Name", "icon": "https://example.com/new-icon.png"}- Set Retention Policy
// Configure automatic bundle cleanup{ "retention": 30 // Keep bundles for 30 days}- Get Apps by Organisation
# List all apps in a specific organizationcurl -H "authorization: your-api-key" \ "https://api.capgo.app/app/?org_id=046a36ac-e03c-4590-9257-bd6c9dba9ee8"Resource Management
Section titled “Resource Management”- Storage Optimization: Monitor storage Utilisation and set appropriate retention policies
- Organisation: Group related apps under a single Organisation
- Access Control: Manage which team Membres can modify Application Paramètres
- Backup Strategy: Retour up critical Application configurations and Paramètres