Skip to main content

System Utility - Take Heap Snapshot

Endpoint

/i/profiler/take-heap-snapshot

Overview

Streams a heap snapshot file as download.

Authentication

Pass api_key or auth_token as a query parameter, or send countly-token as a header. See Authentication.

Permissions

Requires Global Admin access.

Request Parameters

ParameterTypeRequiredDescription
api_keyStringConditionalRequired if auth_token is not provided.
auth_tokenStringConditionalRequired if api_key is not provided.

Examples

/i/profiler/take-heap-snapshot?api_key=YOUR_API_KEY

Response

Success Response

Binary stream download with headers:

  • Content-Type: plain/text; charset=utf-8
  • Content-Disposition: attachment; filename=heap.heapsnapshot

Response Fields

FieldTypeDescription
(stream body)Text streamHeap snapshot content for the running process.
Content-TypeHeaderplain/text; charset=utf-8
Content-DispositionHeaderattachment; filename=heap.heapsnapshot

Error Responses

{
"result": "...error text..."
}

Behavior

  • Writes response headers and streams heap snapshot content.
Implementation details

Database Collections

This endpoint does not read or write database collections.