6 endpoints. Send your API key as Authorization: Bearer <key> on each request; see The API and AI assistants for keys, errors, idempotency and the conventions every endpoint shares.
GET /api/projects/{id}/source-maps
The project's source maps (release, file address and size only; a map is never sent back)
Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | integer | Yes | From 1 to 2147483647. |
Responses:
| Status | Meaning |
|---|---|
| 200 | The maps, newest first, each with id, release, file_url, size_bytes, uploaded_at and expires_at |
| 401 | Missing or invalid API key (Error) |
| 404 | Item (or its parent) does not exist (Error) |
POST /api/projects/{id}/source-maps
Upload the source map of one generated file in one release (admins)
Send the map file itself as the request body (any content type, up to 10 MB), with release and file_url (the address the generated file is served from, as it appears in stack traces; the query string is ignored, and ~/path matches any host) in the query string. A map for the same release and file replaces the old one. sourcesContent is dropped: the original source code is never kept. Up to 200 maps per project; each is deleted 90 days after upload, and with its release. Stack traces of events from that release are resolved when an issue is shown (resolved_stack and resolved_frames on its events). A build step can also post to POST /ingest/{key}/source-maps with the project's ingest key.
Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | integer | Yes | From 1 to 2147483647. |
release | query | string | Yes | Up to 200 characters. |
file_url | query | string | Yes | Up to 2000 characters. |
Request body (application/octet-stream, required)
Responses:
| Status | Meaning |
|---|---|
| 201 | The stored map: id, release, file_url, size_bytes, uploaded_at, expires_at |
| 400 | The request body is invalid or is not valid JSON (Error) |
| 401 | Missing or invalid API key (Error) |
| 403 | Only admins and owners can upload |
| 404 | Item (or its parent) does not exist (Error) |
| 409 | The project already holds 200 maps |
| 413 | The map is over 10 MB |
GET /api/projects/{id}/source-maps/settings
Whether the project takes source map uploads with its ingest key, or only with an API key
Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | integer | Yes | From 1 to 2147483647. |
Responses:
| Status | Meaning |
|---|---|
| 200 | project_id and api_key_only (false by default: the ingest key works too) |
| 401 | Missing or invalid API key (Error) |
| 404 | Item (or its parent) does not exist (Error) |
PUT /api/projects/{id}/source-maps/settings
Take source map uploads only with an API key (admins)
The ingest key is public (it ships in browser code), so anyone holding it could upload maps to the project. With api_key_only true, POST /ingest/{key}/source-maps answers 403 and only POST /api/projects/{id}/source-maps is accepted. Written to the project's activity.
Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | integer | Yes | From 1 to 2147483647. |
Request body (application/json, required).
| Field | Type | Required | Description |
|---|---|---|---|
api_key_only | boolean | Yes |
Responses:
| Status | Meaning |
|---|---|
| 200 | The new setting |
| 400 | The request body is invalid or is not valid JSON (Error) |
| 401 | Missing or invalid API key (Error) |
| 403 | Only admins and owners can change it |
| 404 | Item (or its parent) does not exist (Error) |
DELETE /api/projects/{id}/source-maps/{mapId}
Delete a source map (admins)
Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | integer | Yes | From 1 to 2147483647. |
mapId | path | integer | Yes |
Responses:
| Status | Meaning |
|---|---|
| 204 | Deleted |
| 401 | Missing or invalid API key (Error) |
| 403 | Only admins and owners can delete |
| 404 | Item (or its parent) does not exist (Error) |
POST /ingest/{key}/source-maps
Upload a source map with the project's ingest key (no API key)
The same as POST /api/projects/{id}/source-maps, for a build step that holds only the ingest key. Limited to 30 uploads a minute per project.
Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
key | path | string | Yes | The project's ingest_key. |
release | query | string | Yes | Up to 200 characters. |
file_url | query | string | Yes | Up to 2000 characters. |
Request body (application/octet-stream, required)
Responses:
| Status | Meaning |
|---|---|
| 201 | The stored map |
| 400 | The request body is invalid or is not valid JSON (Error) |
| 403 | The project takes source maps only with an API key |
| 404 | Unknown ingest key |
| 413 | The map is over 10 MB |
| 429 | Too many uploads. See the Retry-After header. |