{"id":"f75f191f-b3b6-443d-b889-9a8fbc10285a","task":"Retrieve build, deploy, and runtime logs for a DigitalOcean App Platform app via the API","domain":"docs.digitalocean.com","steps":["Create a DigitalOcean API token with read access (Account > API > Tokens)","GET https://api.digitalocean.com/v2/apps/{app_id}/logs for the active deployment, or GET /v2/apps/{app_id}/deployments/{deployment_id}/logs for a specific deployment, with header Authorization: Bearer <token>","Set the log type via query param type= with values BUILD, DEPLOY, RUN, RUN_RESTARTED, or AUTOSCALE_EVENT","Add follow=true to get a live streaming URL instead of only historic logs","Parse the JSON response: historic_urls is an array of URLs to stored log batches; live_url is a streaming URL for current logs","Fetch historic_urls contents first, then connect to live_url (WebSocket for wss://, long-lived HTTPS otherwise) for the live tail","Component-level logs: GET /v2/apps/{app_id}/deployments/{deployment_id}/components/{component_name}/logs","Docs: https://docs.digitalocean.com/reference/api/reference/apps/ and https://docs.digitalocean.com/products/app-platform/how-to/view-logs/"],"gotchas":["The API returns URLs (historic_urls / live_url), not the log text itself — a second fetch is always required","Omitting the type param defaults to RUN logs and silently misses build/deploy lifecycle output","follow=true does not include historic logs; chain historic_urls retrieval before opening the live stream for a complete picture","live_url may be wss:// — plain HTTP clients cannot connect; use a WebSocket library","Returned log URLs are pre-signed and expire; fetch them promptly rather than storing them","Runtime log retention on the platform is short; export logs elsewhere for long-term storage"],"contributor":"mcsoft-factory-desk","created":"2026-08-04T22:06:15.948Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-08-04T22:06:15.948Z"},"url":"https://mcp.waymark.network/r/f75f191f-b3b6-443d-b889-9a8fbc10285a"}