[GH-ISSUE #157] Add Performance/Power metrics and diagnostics download CLI support #39

Closed
opened 2026-02-26 21:32:56 +03:00 by kerem · 0 comments
Owner

Originally created by @rudrankriyam on GitHub (Jan 25, 2026).
Original GitHub issue: https://github.com/rudrankriyam/App-Store-Connect-CLI/issues/157

Overview

Add CLI support for Performance/Power metrics and diagnostic logs using the App Store Connect API. This should enable listing metrics, retrieving details, and downloading diagnostic artifacts.

Scope (OpenAPI resources)

  • perfPowerMetrics
  • diagnosticSignatures
  • Related download URLs or relationships for metric/diagnostic artifacts (verify exact endpoints in spec)

Proposed CLI

Top-level group:

  • asc performance <subcommand> [flags]

Subcommands:

  • performance metrics list|get (perf/power metrics)
  • performance diagnostics list|get (diagnostic signatures)
  • performance download (download metric or diagnostic artifact)

Examples:

  • asc performance metrics list --app APP_ID
  • asc performance diagnostics list --app APP_ID
  • asc performance download --metric-id METRIC_ID --output ./metrics.json.gz
  • asc performance download --diagnostic-id DIAG_ID --output ./diagnostic.json.gz --decompress

Flag patterns

Common:

  • --app, --output, --pretty, --limit, --next, --paginate
  • --confirm for destructive operations (if any)

Resource-specific examples:

  • --metric-id, --diagnostic-id
  • --build, --version, --date-start, --date-end (if supported by API filters)
  • --output (file path) and --decompress for downloads

Output

  • JSON minified by default
  • --pretty for JSON
  • --output table/markdown for list commands
  • Downloads use secure file creation and optional gzip decompression

Acceptance criteria

  • Commands appear in asc performance --help
  • List/get works for perfPowerMetrics
  • List/get works for diagnosticSignatures
  • Download works for metric/diagnostic artifacts (endpoint verified)
  • Pagination and --next validation works
  • JSON-first output and table/markdown output for lists

Tests

  • Command flag validation tests (including date format and enum validation if filters exist)
  • HTTP client tests for list/get
  • Download tests using mocked presigned URLs (SSRF-safe validation)
  • Output tests for table/markdown

Implementation notes

  • Add cmd/performance*.go and internal/asc/client_performance*.go
  • Add output helpers in internal/asc/output_performance.go
  • Register command in cmd/root.go
  • Add resource type constants in internal/asc/client_types.go
  • Reuse secure download helpers (e.g., no-follow file ops and URL validation)
Originally created by @rudrankriyam on GitHub (Jan 25, 2026). Original GitHub issue: https://github.com/rudrankriyam/App-Store-Connect-CLI/issues/157 # Overview Add CLI support for Performance/Power metrics and diagnostic logs using the App Store Connect API. This should enable listing metrics, retrieving details, and downloading diagnostic artifacts. # Scope (OpenAPI resources) - `perfPowerMetrics` - `diagnosticSignatures` - Related download URLs or relationships for metric/diagnostic artifacts (verify exact endpoints in spec) # Proposed CLI Top-level group: - `asc performance <subcommand> [flags]` Subcommands: - `performance metrics list|get` (perf/power metrics) - `performance diagnostics list|get` (diagnostic signatures) - `performance download` (download metric or diagnostic artifact) Examples: - `asc performance metrics list --app APP_ID` - `asc performance diagnostics list --app APP_ID` - `asc performance download --metric-id METRIC_ID --output ./metrics.json.gz` - `asc performance download --diagnostic-id DIAG_ID --output ./diagnostic.json.gz --decompress` # Flag patterns Common: - `--app`, `--output`, `--pretty`, `--limit`, `--next`, `--paginate` - `--confirm` for destructive operations (if any) Resource-specific examples: - `--metric-id`, `--diagnostic-id` - `--build`, `--version`, `--date-start`, `--date-end` (if supported by API filters) - `--output` (file path) and `--decompress` for downloads # Output - JSON minified by default - `--pretty` for JSON - `--output table/markdown` for list commands - Downloads use secure file creation and optional gzip decompression # Acceptance criteria - [ ] Commands appear in `asc performance --help` - [ ] List/get works for perfPowerMetrics - [ ] List/get works for diagnosticSignatures - [ ] Download works for metric/diagnostic artifacts (endpoint verified) - [ ] Pagination and `--next` validation works - [ ] JSON-first output and table/markdown output for lists # Tests - Command flag validation tests (including date format and enum validation if filters exist) - HTTP client tests for list/get - Download tests using mocked presigned URLs (SSRF-safe validation) - Output tests for table/markdown # Implementation notes - Add `cmd/performance*.go` and `internal/asc/client_performance*.go` - Add output helpers in `internal/asc/output_performance.go` - Register command in `cmd/root.go` - Add resource type constants in `internal/asc/client_types.go` - Reuse secure download helpers (e.g., no-follow file ops and URL validation)
kerem closed this issue 2026-02-26 21:32:56 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/App-Store-Connect-CLI#39
No description provided.