create_analytics_report_request
Generate analytics reports for an app in App Store Connect to monitor performance metrics and historical data.
Instructions
Create a new analytics report request for an app
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| appId | Yes | The ID of the app to generate analytics reports for | |
| accessType | No | Access type for the analytics report (ONGOING for daily data, ONE_TIME_SNAPSHOT for historical data) | ONE_TIME_SNAPSHOT |
Implementation Reference
- src/handlers/analytics.ts:22-48 (handler)The handler function that creates a new analytics report request for the specified app by constructing the API request body and calling the AppStoreConnectClient.post method.
async createAnalyticsReportRequest(args: { appId: string; accessType?: AnalyticsAccessType; }): Promise<AnalyticsReportRequestResponse> { const { appId, accessType = "ONE_TIME_SNAPSHOT" } = args; validateRequired(args, ['appId']); const requestBody: AnalyticsReportRequest = { data: { type: "analyticsReportRequests", attributes: { accessType }, relationships: { app: { data: { id: appId, type: "apps" } } } } }; return this.client.post<AnalyticsReportRequestResponse>('/analyticsReportRequests', requestBody); } - src/types/analytics.ts:10-25 (schema)TypeScript interfaces defining the request body and response structure for the analytics report request API.
export interface AnalyticsReportRequest { data: { type: 'analyticsReportRequests'; attributes: { accessType: AnalyticsAccessType; }; relationships: { app: { data: { id: string; type: 'apps'; }; }; }; }; }