장치
복사할 수 있는 설정 지시와 이 플러그인의 전체 마크다운 가이드를 포함한 설치 단계를 복사하세요.
장치(Devices)는 Capgo에 업데이터 메타데이터를 보고합니다. 이 API을 사용하여 그 메타데이터를 가져오거나 장치별 개인 채널 오버라이드 설정 및 제거를 하세요.
장치 메타데이터
장치 메타데이터 섹션각 레코드에는 장치 ID, 플랫폼, 업데이터 및 OS 버전, 네이티브 빌드, 설치된 번들, 프로덕션 및 에뮬레이터 상태, 커스텀 ID, 채널 오버라이드가 포함될 수 있습니다.
이미지 country_code is the latest valid two-letter ISO 3166-1 country code received from a Cloudflare-handled request for the device. It is not GPS or a location value supplied by your app. It can be null 국가 __CAPGO_KEEP_0__은 ISO 3166-1의 두 개의 문자 __CAPGO_KEEP_1__이 __CAPGO_KEEP_2__에서 __CAPGO_KEEP_3__으로 전달받은 __CAPGO_KEEP_4__입니다. GPS나 앱에서 제공하는 위치 값이 아닙니다. __CAPGO_KEEP_5__이 없으면 __CAPGO_KEEP_6__을 사용하세요.
__CAPGO_KEEP_7__이 없으면 단일 장치 조회를 사용하세요.
EndpointPOST
POSThttps://api.capgo.app/device/
장치에 대한 특정 오버라이드 설정 개인 장치에 대한 채널을 선택하기 위해, 채널에 해당 번들을 할당하세요. 직접 장치별 번들 오버라이드 지원은 없습니다. 오버라이드가 마지막 쓰기 후 90일이 지나지 않으면 만료됩니다. 다시 POST를 하시면 만료되지 않습니다.
요청 본문
복사interface DeviceChannelOverride { app_id: string; // reverse-domain app ID, for example com.example.app device_id: string; channel: string; // existing non-public channel name}예제 요청
터미널 창curl -X POST \ -H "authorization: your-api-key" \ -H "Content-Type: application/json" \ -d '{ "app_id": "com.example.app", "device_id": "device_456", "channel": "beta" }' \ https://api.capgo.app/device/공개 채널은 장치 오버라이드로 사용할 수 없습니다.
성공 응답
성공 응답 섹션{ "status": "ok"}GET
GET 섹션https://api.capgo.app/device/
장치 메타데이터를 가져옵니다. 결과는 커서 페이지네이션을 사용할 때 생략됩니다. device_id.
쿼리 매개변수
쿼리 매개변수 섹션app_id: 반드시 역 도메인 앱 ID와 같은com.example.app.device_id: 장치 ID가 포함되어 있으면 응답은 단일 장치가 아닌 페이지네이션된 목록이 됩니다.customIdMode: 옵션 boolean. __CAPGO_KEEP_0__을true만들기 위해custom_id.cursor: 이전 목록 응답에서 가져온 옵션 커서.limit: 페이지당 기기 수를 지정하는 옵션 숫자.
예제 요청
제목 ‘예제 요청’# Get the first pagecurl -H "authorization: your-api-key" \ "https://api.capgo.app/device/?app_id=com.example.app"
# Get one device, including its request-derived country when availablecurl -H "authorization: your-api-key" \ "https://api.capgo.app/device/?app_id=com.example.app&device_id=device_456"
# Get only devices with a custom IDcurl -H "authorization: your-api-key" \ "https://api.capgo.app/device/?app_id=com.example.app&customIdMode=true"
# Get the next pagecurl -H "authorization: your-api-key" \ "https://api.capgo.app/device/?app_id=com.example.app&cursor=2024-01-01T00:00:00Z%7Cdevice_456"응답 유형
제목 ‘응답 유형’interface DeviceListResponse { data: Device[]; nextCursor?: string; hasMore: boolean;}
interface Device { updated_at: string; device_id: string; custom_id: string; version?: number; version_name: string | null; channel?: string; app_id: string; platform: "ios" | "android" | "electron"; plugin_version: string; os_version: string; version_build: string; is_prod: boolean; is_emulator: boolean; key_id: string | null; install_source: string | null; country_code: string | null;}country_code Capgo이 저장한 유효한 Cloudflare-유도된 국가 code가 저장되어 있으면 기기별로 code가 채워집니다. 유효한 국가가 없는 요청은 마지막 유효한 값을 지우지 않습니다; 목록 응답은 null 이 필드에 대한 설명입니다.
예시 응답 (목록)
예시 응답 (목록) 섹션{ "data": [ { "device_id": "device_456", "custom_id": "test-device-1", "version": 1, "version_name": "1.0.0", "app_id": "com.example.app", "platform": "ios", "plugin_version": "5.0.0", "os_version": "17.0", "version_build": "1", "is_prod": true, "is_emulator": false, "key_id": null, "install_source": null, "country_code": null, "updated_at": "2024-01-01T00:00:00Z" } ], "nextCursor": "2024-01-01T00:00:00Z|device_456", "hasMore": true}예시 응답 (단일 기기)
예시 응답 (단일 기기) 섹션{ "device_id": "device_456", "custom_id": "test-device-1", "version": 1, "version_name": "1.0.0", "app_id": "com.example.app", "platform": "ios", "plugin_version": "5.0.0", "os_version": "17.0", "version_build": "1", "is_prod": true, "is_emulator": false, "key_id": "MIIB", "install_source": null, "country_code": "FR", "updated_at": "2024-01-01T00:00:00Z", "channel": "beta"}https://api.capgo.app/device/
기기 채널 오버라이드 제거는 기기의 일반 채널 선택을 다시 사용하도록 합니다. 이 엔드포인트는 기기의 메타데이터 기록을 삭제하지 않습니다.
요청 본문 또는 쿼리 매개변수
요청 본문 또는 쿼리 매개변수 섹션interface DeviceOverrideRemoval { app_id: string; device_id: string;}예시 요청
예시 요청 섹션curl -X DELETE \ -H "authorization: your-api-key" \ -H "Content-Type: application/json" \ -d '{ "app_id": "com.example.app", "device_id": "device_456" }' \ https://api.capgo.app/device/성공 응답
성공 응답 섹션{ "status": "ok"}오류
오류 섹션오류는 HTTP 오류 상태와 JSON 본문과 함께 사용합니다. error 그리고 message 오류 코드. 일반적인 오류 코드는 다음과 같습니다:
invalid_app_id언제app_id역방향 도메인 식별자가 아닌 경우.device_not_found미지의 장치 검색에 대해.channel_not_found요청된 채널이 존재하지 않을 때.public_channel_override장치에 대한 직접적인 채널 override 시도; 채널을 사용하세요.invalid_version_id또는cannot_access_appCapacitor live-update alternatives 비교 페이지에서 사용되는 HTML 텍스트 조각. 역할: 장기 마케팅 또는 법적 문단.cannot_access_channelwhen the API key lacks the required permission.
Capawesome 비교 페이지에서 사용되는 HTML 텍스트 조각. 역할: 장기 마케팅 또는 법적 문단.
컨설팅 서비스 페이지에서 사용되는 HTML 텍스트 조각. 역할: 섹션 서브 타이틀 또는 태그 라인.-
Appflow 비교 / 마이그레이션 마케팅 복사본에서 사용되는 UI 레이블 또는 네비게이션 아이템. 역할: 짧은 UI 레이블 또는 네비게이션 아이템.
{"app_id": "com.example.app","device_id": "device_456","channel": "beta"} -
기기 채널 선택을 일반으로 다시 설정
앱과 기기 ID를 포함한
DELETE엔드포인트를 사용하세요.
기기에서 계속
기기에서 계속하는 방법기기 채널 라우팅과 스테이지드 롤아웃을 계획하고 있는 경우 Channels Channels Channels Channels Channels Channels 채널 Channels 베타 테스트 솔루션 Channels 버전 대상 솔루션 Channels