Retrieve a Flamegraph for an Organization
Retrieve an aggregated flamegraph for the organization, built from the requested data source (transactions, profiles, functions, or spans).
Pass expand=metrics to include aggregated function metrics in the response.
Requires profiling to be enabled for the organization.
Path Parameters
organization_id_or_slug(string)REQUIREDThe ID or slug of the organization the resource belongs to.
Query Parameters:
project(array(integer))The IDs of projects to filter by.
-1means all available projects. For example, the following are valid parameters:/?project=1234&project=56789/?project=-1
environment(array(string))The name of environments to filter by.
statsPeriod(string)The period of time for the query, will override the start & end parameters, a number followed by one of:
dfor dayshfor hoursmfor minutessfor secondswfor weeks
For example,
24h, to mean query data starting from 24 hours ago to now.start(string)The start of the period of time for the query, expected in ISO-8601 format. For example,
2001-12-14T12:34:56.7890.end(string)The end of the period of time for the query, expected in ISO-8601 format. For example,
2001-12-14T12:34:56.7890.dataSource(string)- choices:
- functions
- profiles
- spans
- transactions
Source dataset to build the flamegraph from. Defaults to
functionswhenfingerprintis set andtransactionsotherwise. fingerprint(integer)A UInt32 function fingerprint. Only valid when
dataSource=functions.query(string)Sentry search syntax to filter the candidate profiles.
expand(array(string))- choices:
- metrics
Optional expansions. Pass
metricsto include flamegraph metric aggregates in the response.
Scopes
<auth_token> requires one of the following scopes:org:adminorg:readorg:write
curl https://sentry.io/api/0/organizations/{organization_id_or_slug}/profiling/flamegraph/ \ -H 'Authorization: Bearer <auth_token>'
Copied{ "activeProfileIndex": 0, "metadata": { "deviceClassification": "", "deviceLocale": "", "deviceManufacturer": "", "deviceModel": "", "deviceOSName": "", "deviceOSVersion": "", "durationNS": 0, "organizationID": 0, "platform": "python", "profileID": "", "projectID": 0, "received": "2026-04-15T18:22:31Z", "sampled": false, "timestamp": "2026-04-15T18:22:31Z", "traceID": "", "transactionID": "", "transactionName": "GET /api/0/projects/{org}/{proj}/files/dsyms/", "version": "" }, "platform": "python", "transactionName": "GET /api/0/projects/{org}/{proj}/files/dsyms/", "projectID": 1, "shared": { "frames": [ { "name": "handle_request", "file": "app/web.py", "is_application": true, "line": 88, "fingerprint": 1111111111 }, { "name": "do_work", "file": "app/worker.py", "is_application": true, "line": 42, "fingerprint": 2222222222 }, { "name": "loads", "file": "json/__init__.py", "is_application": false, "line": 299, "fingerprint": 3333333333 } ], "frame_infos": [ { "count": 40, "weight": 40, "sumDuration": 4000000000, "sumSelfTime": 0, "p75Duration": 110000000, "p95Duration": 180000000, "p99Duration": 240000000 }, { "count": 40, "weight": 40, "sumDuration": 4000000000, "sumSelfTime": 1000000000, "p75Duration": 95000000, "p95Duration": 150000000, "p99Duration": 210000000 }, { "count": 30, "weight": 30, "sumDuration": 3000000000, "sumSelfTime": 3000000000, "p75Duration": 81000000, "p95Duration": 120000000, "p99Duration": 160000000 } ], "profiles": [ { "project_id": 1, "profile_id": "a1b2c3d4e5f60718293a4b5c6d7e8f90", "start": 1780084617.323, "end": 1780084617.8065438 } ] }, "profiles": [ { "endValue": 40, "isMainThread": true, "name": "MainThread", "samples": [ [ 0, 1, 2 ], [ 0, 1 ] ], "sample_counts": [ 30, 10 ], "samples_examples": [ [ 0 ], [ 0 ] ], "sample_durations_ns": [ 3000000000, 1000000000 ], "startValue": 0, "threadID": 1, "type": "sampled", "unit": "count", "weights": [ 30, 10 ] } ], "metrics": null }