download_logs
Download application logs from Optimizely DXP environments to local storage for offline analysis, with date filtering and background download support.
Instructions
📊 Download application logs from environment to local storage. BACKGROUND: returns immediately, download continues in background. Supports date filtering (dateFilter: "2025/10/14", "past-7-days") and log type (http, application, all). Use this when you need logs for offline analysis. For quick online analysis, use analyze_logs_streaming() instead (2x faster). Required: environment. Returns downloadId for monitoring with download_status().
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| environment | No | Production | |
| logType | No | ||
| containerName | No | Override default container name | |
| slot | No | Download deployment slot logs instead of production logs. Default: false (production logs only). Set to true to get logs from /SLOTS/SLOT/ path (deployment slot logs during warmup) | |
| dateFilter | No | Filter logs by date (e.g., "2025/08/24" or "2025/08") | |
| secondsBack | No | ⭐ EASIEST: Last N seconds. No date math needed! (e.g., 30) | |
| minutesBack | No | ⭐ EASIEST: Last N minutes. No date math needed! (e.g., 15) | |
| hoursBack | No | ⭐ EASIEST: Last N hours. No date math needed! (e.g., 6) | |
| daysBack | No | ⭐ EASIEST: Last N days. No date math needed! (e.g., 7 for last week) | |
| weeksBack | No | ⭐ EASIEST: Last N weeks. No date math needed! (e.g., 2) | |
| monthsBack | No | ⭐ EASIEST: Last N months. No date math needed! (e.g., 3) | |
| yearsBack | No | ⭐ EASIEST: Last N years. No date math needed! (e.g., 1) | |
| startDate | No | Start date (e.g., "2025/10/01"). Can use alone - endDate defaults to NOW. Format: "YYYY/MM/DD" or "YYYY-MM-DD" | |
| endDate | No | End date (e.g., "2025/10/08"). Can use alone - startDate defaults to 7 days before. Format: "YYYY/MM/DD" or "YYYY-MM-DD" | |
| startDateTime | No | ⚠️ ADVANCED: ISO 8601 start datetime. Can use alone - endDateTime defaults to NOW. For simpler filtering, use daysBack/hoursBack instead. (e.g., "2025-09-15T01:00:00-05:00") | |
| endDateTime | No | ⚠️ ADVANCED: ISO 8601 end datetime. Can use alone - startDateTime defaults to 7 days before. For simpler filtering, use daysBack/hoursBack instead. (e.g., "2025-09-15T01:30:00-05:00") | |
| downloadPath | No | Where to save log files | |
| previewOnly | No | Show download preview without actually downloading | |
| skipConfirmation | No | Skip confirmation preview (WARNING: downloads immediately without preview). Default: false - always show preview | |
| incremental | No | Use smart incremental download (skip unchanged files). Default: true | |
| forceFullDownload | No | Force full download even if files exist locally. Default: false | |
| monitor | No | DXP-3: Enable real-time progress monitoring during download. Shows progress updates every 10 seconds or 50 files. Default: false (opt-in) | |
| background | No | DXP-3: Start download in background and return immediately with downloadId. Use download_status({ downloadId, monitor: true }) to watch progress. Default: false (blocking download) | |
| projectName | No | ||
| projectId | No | ||
| apiKey | No | ||
| apiSecret | No |