技術と本について書くブログ

技術と本について書くblog。技術メモなど雑記を書いているblog。

App Stocre ConnectAPIで追加されたパフォーマンスについて #WWDC2020

まず叩き方の基本についてはこちら

新しく追加された4つのREST API

1 Application metrics and insights for recent app versions

GET https://api.appstoreconnect.apple.com/v1/apps/{アプリのid}/perfPowerMetrics

アプリケーションIDを使用して、アプリケーションの最新バージョンの集計されたメトリクスとインサイトを提供します。Xcodeで見れたやつがAPIで取れるように。

queryStringでフィルターも可能 perfPowerMetrics?filter[metricType]=LAUNCH

Doc: https://developer.apple.com/documentation/appstoreconnectapi/get_power_and_performance_metrics_for_an_app

2 Aggregate metrics for scpecific app versions

GET https://api.appstoreconnect.apple.com/v1/builds/{build id}/perfPowerMetrics

特定のアプリのバージョンのメトリクスをダウンロードすることができる。 取れるデータは主に ・Battery ・Launch ・Disc Writes など

このデータを取得するには、App Store Connect APIが提供する特定のアプリケーションバージョンのビルドIDを提供する必要があります。 -> どうやってとるん? build idの調べ方 List Builds https://developer.apple.com/documentation/appstoreconnectapi/list_builds

Doc: https://developer.apple.com/documentation/appstoreconnectapi/get_power_and_performance_metrics_for_a_build

3 Top diagnostic signatures per app version

アプリのバージョンごとの上位診断シグネチャ GET https://api.appstoreconnect.apple.com/v1/builds/{build id}/diagnosticSignatures

4 Diganostic logs per signature

GET https://api.appstoreconnect.apple.com/v1/diagnosticSignatures/{signature ID}/logs

根本原因分析のために診断シグネチャに対応するログをダウンロードすることができます。 signature idを使って詳細なことがわかる。 このURLは3のやつから取得する