[GH-ISSUE #776] Support downloading App Review rejection screenshots/attachments #208

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

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

Problem

Rejected/unresolved submissions can include reviewer-provided screenshot attachments. We need CLI support to:

  1. enumerate attachment metadata
  2. download artifacts reliably

Evidence From Live Session

On unresolved submission details, UI displayed:

  • Screenshot-0224-164337.png + Download

Corresponding API responses included resolutionCenterMessageAttachments with a signed downloadUrl.

Endpoint Contract (Observed)

Primary data sources:

  • GET /iris/v1/resolutionCenterThreads/{threadId}/resolutionCenterMessages?include=fromActor,rejections,resolutionCenterMessageAttachments&limit[rejections]=2000&limit[resolutionCenterMessageAttachments]=1000
  • GET /iris/v1/reviewRejections?filter[resolutionCenterMessage.resolutionCenterThread]={threadId}&include=... ,rejectionAttachments&limit=2000&limit[rejectionAttachments]=1000

Observed included type:

  • resolutionCenterMessageAttachments

Observed attributes:

  • fileName
  • fileSize
  • assetDeliveryState
  • downloadUrl (signed, time-bound)
  • sourceFileChecksum
  • uploadOperations
  • assetToken

Scope

Add read + download commands for rejection/review message attachments.

Proposed Command UX

  • asc web review attachments list --thread <thread-id>
  • asc web review attachments list --submission <review-submission-id>
  • asc web review attachments download --thread <thread-id> --out <dir>
  • asc web review attachments download --submission <id> --out <dir>

Optional useful flags:

  • --pattern <glob> filter filenames
  • --overwrite allow replacing existing files
  • --include-url include signed URL in output (off by default)

Output Expectations

List output fields:

  • attachmentId
  • sourceType (resolutionCenterMessageAttachments / rejectionAttachments)
  • fileName
  • fileSize
  • downloadable (bool)
  • linkage (threadId, messageId, reviewRejectionId where derivable)

Download behavior:

  • save as <out>/<fileName> (with de-dup suffixing by default)
  • preserve binary content exactly
  • return downloaded file paths in JSON mode

Security / Privacy

  • downloadUrl contains signed query params; treat as sensitive.
  • Do not print signed URLs unless explicitly requested.
  • Do not persist signed URLs in logs by default.

Expiry / Reliability Considerations

  • Signed URLs may expire quickly.
  • If download returns 403/410, command should:
    • refetch attachments endpoint
    • retry with refreshed URL once
    • fail with actionable message if still invalid

Error Handling

  • 401/403 session/auth errors -> web auth guidance
  • no attachments -> success with empty list
  • filesystem write errors -> explicit path + OS error
  • partial download failures in batch mode -> summarize per-file results + non-zero exit

Test Plan (RED -> GREEN)

  1. cmdtest list attachments with fixture containing attachment objects.
  2. cmdtest list empty attachments.
  3. unit test URL redaction/default output behavior.
  4. unit/cmdtest download single file success.
  5. unit/cmdtest duplicate filenames (suffix logic).
  6. unit/cmdtest expired URL path (refresh + retry once).
  7. unit/cmdtest file write failure (permission/path).
  8. integration-style test with httptest server for binary stream download.

Definition of Done

  • list + download commands implemented and documented.
  • signed URL leakage avoided by default output/logging.
  • retries/expiry behavior implemented with tests.
  • JSON/table/markdown output consistency validated.
Originally created by @rudrankriyam on GitHub (Feb 25, 2026). Original GitHub issue: https://github.com/rudrankriyam/App-Store-Connect-CLI/issues/776 ## Problem Rejected/unresolved submissions can include reviewer-provided screenshot attachments. We need CLI support to: 1) enumerate attachment metadata 2) download artifacts reliably ## Evidence From Live Session On unresolved submission details, UI displayed: - `Screenshot-0224-164337.png` + `Download` Corresponding API responses included `resolutionCenterMessageAttachments` with a signed `downloadUrl`. ## Endpoint Contract (Observed) Primary data sources: - `GET /iris/v1/resolutionCenterThreads/{threadId}/resolutionCenterMessages?include=fromActor,rejections,resolutionCenterMessageAttachments&limit[rejections]=2000&limit[resolutionCenterMessageAttachments]=1000` - `GET /iris/v1/reviewRejections?filter[resolutionCenterMessage.resolutionCenterThread]={threadId}&include=... ,rejectionAttachments&limit=2000&limit[rejectionAttachments]=1000` Observed included type: - `resolutionCenterMessageAttachments` Observed attributes: - `fileName` - `fileSize` - `assetDeliveryState` - `downloadUrl` (signed, time-bound) - `sourceFileChecksum` - `uploadOperations` - `assetToken` ## Scope Add read + download commands for rejection/review message attachments. ## Proposed Command UX - `asc web review attachments list --thread <thread-id>` - `asc web review attachments list --submission <review-submission-id>` - `asc web review attachments download --thread <thread-id> --out <dir>` - `asc web review attachments download --submission <id> --out <dir>` Optional useful flags: - `--pattern <glob>` filter filenames - `--overwrite` allow replacing existing files - `--include-url` include signed URL in output (off by default) ## Output Expectations List output fields: - `attachmentId` - `sourceType` (`resolutionCenterMessageAttachments` / `rejectionAttachments`) - `fileName` - `fileSize` - `downloadable` (bool) - linkage (`threadId`, `messageId`, `reviewRejectionId` where derivable) Download behavior: - save as `<out>/<fileName>` (with de-dup suffixing by default) - preserve binary content exactly - return downloaded file paths in JSON mode ## Security / Privacy - `downloadUrl` contains signed query params; treat as sensitive. - Do not print signed URLs unless explicitly requested. - Do not persist signed URLs in logs by default. ## Expiry / Reliability Considerations - Signed URLs may expire quickly. - If download returns 403/410, command should: - refetch attachments endpoint - retry with refreshed URL once - fail with actionable message if still invalid ## Error Handling - 401/403 session/auth errors -> web auth guidance - no attachments -> success with empty list - filesystem write errors -> explicit path + OS error - partial download failures in batch mode -> summarize per-file results + non-zero exit ## Test Plan (RED -> GREEN) 1) cmdtest list attachments with fixture containing attachment objects. 2) cmdtest list empty attachments. 3) unit test URL redaction/default output behavior. 4) unit/cmdtest download single file success. 5) unit/cmdtest duplicate filenames (suffix logic). 6) unit/cmdtest expired URL path (refresh + retry once). 7) unit/cmdtest file write failure (permission/path). 8) integration-style test with httptest server for binary stream download. ## Definition of Done - list + download commands implemented and documented. - signed URL leakage avoided by default output/logging. - retries/expiry behavior implemented with tests. - JSON/table/markdown output consistency validated.
kerem closed this issue 2026-02-26 21:34:01 +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#208
No description provided.