Retrieve Size Analysis results for a given artifact
GET /api/0/organizations/{organization_id_or_slug}/preprodartifacts/{artifact_id}/size-analysis/
Retrieve size analysis results for a given artifact.
Returns size metrics including download size, install size, and optional insights.
When a base artifact exists (either from commit comparison or via the baseArtifactId parameter),
comparison data showing size differences is included.
The response state field indicates the analysis status:
PENDING: Analysis has not started yet.PROCESSING: Analysis is currently running.FAILED/NOT_RAN: Analysis did not complete;errorCodeanderrorMessageare included.COMPLETED: Analysis finished successfully with full size data.
Path Parameters
organization_id_or_slug(string)REQUIREDThe ID or slug of the organization the resource belongs to.
artifact_id(string)REQUIREDThe ID of the build artifact.
Query Parameters:
baseArtifactId(string)Optional ID of the base artifact to compare against. If not provided, uses the default base head artifact.
Scopes
You need to authenticate via bearer auth token.
<auth_token> requires one of the following scopes:org:adminorg:readorg:write
Copied
curl https://sentry.io/api/0/organizations/{organization_id_or_slug}/preprodartifacts/{artifact_id}/size-analysis/ \ -H 'Authorization: Bearer <auth_token>'
RESPONSESCHEMA
Copied{ "buildId": "12345", "appInfo": { "appId": "com.example.app", "name": "Example App", "version": "1.2.0", "buildNumber": 42, "artifactType": "AAB", "dateAdded": "2025-01-15T10:30:00+00:00", "dateBuilt": "2025-01-15T10:00:00+00:00" }, "gitInfo": { "headSha": "abc123def456", "baseSha": "789xyz000111", "provider": "github", "headRepoName": "org/repo", "baseRepoName": "org/repo", "headRef": "feature-branch", "baseRef": "main", "prNumber": 42 }, "errorCode": null, "errorMessage": null, "downloadSize": null, "installSize": null, "analysisDuration": null, "analysisVersion": null, "insights": null, "appComponents": null, "baseBuildId": null, "baseAppInfo": null, "comparisons": null, "state": "PENDING" }
Was this helpful?