__CAPGO_KEEP_0__ - __CAPGO_KEEP_1__ 앱의 실시간 업데이트

앱은 Capgo의 기본적인 엔터티입니다. 각 앱은 Capacitor 애플리케이션을 나타내며 플랫폼을 통해 관리하고 업데이트할 수 있습니다. 앱 API은 앱 구성 설정을 만들 수, 조회할 수, 업데이트할 수, 삭제할 수 있습니다.

앱은 Capgo에서 Capacitor 애플리케이션을 나타내며 다음을 포함합니다.

  • 앱 ID: 애플리케이션의 고유 식별자
  • 이름: 사용자가 읽을 수 있는 애플리케이션 이름
  • 아이콘: 대시보드 내에서 앱의 시각적 식별자
  • 설정: 업데이트가 전달되는 방법을 제어하는 설정
  • 소유권: 조직 및 사용자 접근 정보
  • 사용 통계: __CAPGO_KEEP_0__ 설치 및 업데이트에 대한 메트릭
  1. 이름 규칙: 앱에 명확하고 식별 가능한 이름을 사용하세요
  2. 보안: API 키 및 접근 자격 증명을 보호하세요
  3. 조직: 관련 앱을 동일한 조직 아래에 그룹화하세요
  4. 모니터링: 앱 통계 및 성능을 정기적으로 확인하세요
  5. 백업: __CAPGO_KEEP_0__

엔드포인트

엔드포인트

GET

GET

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

앱에 대한 정보를 조회합니다.

쿼리 매개변수

쿼리 매개변수
  • page: __CAPGO_KEEP_1__
  • limit: __CAPGO_KEEP_2__ (기본값: 50)
  • org_id: __CAPGO_KEEP_3__

특정 앱을 가져오기 위해

  • 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"
}

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. __CAPGO_KEEP_1__
__CAPGO_KEEP_2__
# 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"

__CAPGO_KEEP_3__

__CAPGO_KEEP_4__
  1. __CAPGO_KEEP_5____CAPGO_KEEP_6__
  2. __CAPGO_KEEP_7____CAPGO_KEEP_8__
  3. __CAPGO_KEEP_9____CAPGO_KEEP_10__
  4. 백업 전략: 앱의 중요한 구성 및 설정을 백업하세요

Capacitor를 사용 중이라면 Apps 앱을 계획하고 API 작업을 수행하기 위해 API 개요 API 개요에서 API 구현 세부 정보 소개 소개에서 __CAPGO_KEEP_0__ 구현 세부 정보 API 키 API 키 구현 세부 사항에 대해 기기 __CAPGO_KEEP_0__ 키 구현 세부 사항에 대해 기기, 그리고 패키지 __CAPGO_KEEP_0__ 키 구현 세부 사항에 대해 패키지에 대해