Attachments
Attachments
Section titled “Attachments”Upload, download, and manage file attachments on Jira issues.
Prerequisites
Section titled “Prerequisites”- Authenticated profile (
atlcli auth login) - Jira permission: Browse Projects (view), Create Attachments (upload), Delete Attachments (delete)
List Attachments
Section titled “List Attachments”View attachments on an issue:
atlcli jira issue attachments PROJ-123Output:
ID FILENAME SIZE CREATED10001 screenshot.png 245 KB 2025-01-1410002 debug.log 12 KB 2025-01-1310003 requirements.pdf 1.2 MB 2025-01-10Use --json for JSON output.
Upload Attachment
Section titled “Upload Attachment”Attach a file to an issue:
atlcli jira issue attach PROJ-123 ./screenshot.pngUpload multiple files:
atlcli jira issue attach PROJ-123 ./file1.png ./file2.pdf ./logs.zipOptions:
| Flag | Description |
|---|---|
--comment | Add a comment with the attachment |
Examples
Section titled “Examples”# Upload with commentatlcli jira issue attach PROJ-123 ./error.log --comment "Error logs from production"
# Upload all screenshotsatlcli jira issue attach PROJ-123 ./screenshots/*.pngDownload Attachment
Section titled “Download Attachment”Download an attachment by ID or filename:
# By attachment IDatlcli jira issue attachment download 10001 -o ./downloads/
# By filename from issueatlcli jira issue attachment download PROJ-123 screenshot.png -o ./downloads/Options:
| Flag | Description |
|---|---|
-o, --output | Output directory or file path |
--overwrite | Overwrite existing files |
Download All Attachments
Section titled “Download All Attachments”# Download all attachments from an issueatlcli jira issue attachments PROJ-123 --json | \ jq -r '.attachments[].id' | \ xargs -I {} atlcli jira issue attachment download {} -o ./downloads/Delete Attachment
Section titled “Delete Attachment”Remove an attachment:
atlcli jira issue attachment delete 10001 --confirmOptions:
| Flag | Description |
|---|---|
--confirm | Skip confirmation prompt |
JSON Output
Section titled “JSON Output”atlcli jira issue attachments PROJ-123 --json{ "schemaVersion": "1", "issue": "PROJ-123", "attachments": [ { "id": "10001", "filename": "screenshot.png", "size": 250880, "mimeType": "image/png", "created": "2025-01-14T10:00:00Z", "author": { "displayName": "Alice", "email": "alice@company.com" }, "content": "https://company.atlassian.net/secure/attachment/10001/screenshot.png" } ], "total": 1}Supported File Types
Section titled “Supported File Types”Jira accepts most file types. Common attachments include:
- Images: PNG, JPG, GIF, SVG
- Documents: PDF, DOCX, XLSX, TXT
- Archives: ZIP, TAR.GZ
- Logs: LOG, TXT
- Code: Source files of any type
Use Cases
Section titled “Use Cases”Attach Build Artifacts
Section titled “Attach Build Artifacts”# Attach build log after CI failureatlcli jira issue attach PROJ-123 ./build.log --comment "Build failed - see attached log"Bulk Export Attachments
Section titled “Bulk Export Attachments”# Export all attachments from issues matching JQLfor key in $(atlcli jira search --jql "project = PROJ AND attachments is not EMPTY" --json | jq -r '.issues[].key'); do mkdir -p "./attachments/$key" atlcli jira issue attachments $key --json | \ jq -r '.attachments[].id' | \ xargs -I {} atlcli jira issue attachment download {} -o "./attachments/$key/"doneMigrate Attachments Between Issues
Section titled “Migrate Attachments Between Issues”# Download from source issueatlcli jira issue attachments PROJ-100 --json | \ jq -r '.attachments[].id' | \ xargs -I {} atlcli jira issue attachment download {} -o /tmp/migrate/
# Upload to target issueatlcli jira issue attach PROJ-200 /tmp/migrate/*Related Topics
Section titled “Related Topics”- Issues - Work with issues
- Import/Export - Bulk data operations
Jira and Confluence are trademarks of Atlassian Corporation Plc.
atlcli is not affiliated with, endorsed by, or sponsored by Atlassian.