metrics_details_export
Export license-event details for sale metrics (churn, conversion, renewal) as CSV or JSON, with filters for app, hosting, date range, and partner type.
Instructions
Export of license-event details for a sale metric. accept=csv (default) returns the 17-column CSV (addonName,addonKey,hosting,lastUpdated,eventDate,transactionId,licenseId,maintenanceStartDate,maintenanceEndDate,monthsValid,appEntitlementId,appEntitlementNumber,cloudId,inGracePeriod,multiInstanceEntitlementId,multiInstanceEntitlementNumber,appEdition); accept=json returns a JSON array. Same filters as metrics_details_by_metric EXCEPT no offset/limit (full dump). 10-minute timeout (override via EXPORT_TIMEOUT_MS). Large exports spill to a tmp file via the truncation envelope.
📖 Spec (GET /rest/3/reporting/developer-space/{developerId}/sales/metrics/{saleMetric}/details/export): https://developer.atlassian.com/platform/marketplace/rest/v4/api-group-reporting/#api-rest-3-reporting-developer-space-developerid-sales-metrics-salemetric-details-export-get
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | No | Free-text search across event identifiers (SEN / appEntitlementNumber, transactionId, customer email, etc). Verified to narrow correctly. | |
| addon | No | App key (e.g. `com.example.your-app`). Undocumented but works as an app filter. Prefer `productId`. | |
| order | No | Sort direction. **`asc` works; `desc` is unreliable on this endpoint** — Atlassian returns a non-monotonic ordering for `order=desc` (verified 2026-06-03). With no `sortBy`, `order` is ignored entirely. Prefer `sortBy=date&order=asc` and reverse client-side if you need descending. | |
| accept | No | Output format: `csv` (default for these exports — header-rowed CSV string) or `json` (array of records). Invalid → HTTP 400. | |
| sortBy | No | Sort field. Allowed per Atlassian: `addonName`, `date`, `hosting`, `transactionId`, `licenseId`. Anything else → HTTP 400. Only meaningful combined with `order=asc` (see `order`). | |
| endDate | No | ISO date YYYY-MM-DD (filters by eventDate). | |
| hosting | No | Filter events by hosting. Response objects use capitalized 'Cloud'/'Server'/'Data Center'. | |
| productId | No | Product UUID — narrows events to one app (documented + verified 2026-06-03; all returned rows match). | |
| startDate | No | ISO date YYYY-MM-DD (filters by eventDate). | |
| appEdition | No | Filter by app edition (free/standard/advanced). | |
| saleMetric | Yes | Which underlying metric's events to export. | |
| lastUpdated | No | ISO date YYYY-MM-DD — events whose lastUpdated is on/after this date. Verified to narrow correctly. | |
| partnerType | No | Filter by partner attribution channel: `direct`, `expert`, `reseller`. NOTE: Atlassian's error message also lists `upgrade` as allowable, but passing it returns HTTP 400 (Atlassian-side contradiction, verified 2026-06-03) — so it's excluded here. |