Skip to main content

Crashes - Download Stacktrace

Endpoint

/o/crashes/download_stacktrace

Overview

Downloads plain-text stacktrace for one crash report.

Authentication

Countly API supports three authentication methods:

  1. api_key=YOUR_API_KEY
  2. auth_token=YOUR_AUTH_TOKEN
  3. countly-token: YOUR_AUTH_TOKEN

Permissions

Requires crashes Read permission.

Request Parameters

ParameterTypeRequiredDescription
api_keyStringConditionalRequired if auth_token is not provided.
auth_tokenStringConditionalRequired if api_key is not provided.
app_idStringYesTarget app ID for validation context.
crash_idStringYesCrash report _id in drill_events.

Response

Success Response

Binary/text stream download headers:

  • Content-Type: application/octet-stream
  • Content-Disposition: attachment;filename={crash_id}_stacktrace.txt

Body contains raw error (stacktrace text) from crash report.

Response Fields

FieldTypeDescription
(stream body)TextRaw crash stacktrace text from error field in crash report.
Content-TypeHeaderapplication/octet-stream
Content-DispositionHeaderAttachment filename {crash_id}_stacktrace.txt.

Error Responses

  • 400
{
"result": "Please provide crash_id parameter"
}
  • 400
{
"result": "Crash not found"
}
  • 400
{
"result": "Crash does not have stacktrace"
}

Standard auth/permission errors from read validation can also be returned.

Behavior/Processing

  • Reads crash report from countly_drill.drill_events by _id.
  • Validates error field exists before streaming response.

Database Collections

CollectionUsed forData touched by this endpoint
countly_drill.drill_eventsCrash report sourceReads crash record by _id and streams error field.

Examples

Download stacktrace for a crash event

/o/crashes/download_stacktrace?
api_key=YOUR_API_KEY&
app_id=6991c75b024cb89cdc04efd2&
crash_id=67a3d2f5c1a23b0f4d6c0001

Last Updated

2026-03-07