AperioFlow Start free

Docs API reference

API: source maps

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:

NameInTypeRequiredDescription
idpathintegerYesFrom 1 to 2147483647.

Responses:

StatusMeaning
200The maps, newest first, each with id, release, file_url, size_bytes, uploaded_at and expires_at
401Missing or invalid API key (Error)
404Item (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:

NameInTypeRequiredDescription
idpathintegerYesFrom 1 to 2147483647.
releasequerystringYesUp to 200 characters.
file_urlquerystringYesUp to 2000 characters.

Request body (application/octet-stream, required)

Responses:

StatusMeaning
201The stored map: id, release, file_url, size_bytes, uploaded_at, expires_at
400The request body is invalid or is not valid JSON (Error)
401Missing or invalid API key (Error)
403Only admins and owners can upload
404Item (or its parent) does not exist (Error)
409The project already holds 200 maps
413The 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:

NameInTypeRequiredDescription
idpathintegerYesFrom 1 to 2147483647.

Responses:

StatusMeaning
200project_id and api_key_only (false by default: the ingest key works too)
401Missing or invalid API key (Error)
404Item (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:

NameInTypeRequiredDescription
idpathintegerYesFrom 1 to 2147483647.

Request body (application/json, required).

FieldTypeRequiredDescription
api_key_onlybooleanYes

Responses:

StatusMeaning
200The new setting
400The request body is invalid or is not valid JSON (Error)
401Missing or invalid API key (Error)
403Only admins and owners can change it
404Item (or its parent) does not exist (Error)

DELETE /api/projects/{id}/source-maps/{mapId}

Delete a source map (admins)

Parameters:

NameInTypeRequiredDescription
idpathintegerYesFrom 1 to 2147483647.
mapIdpathintegerYes

Responses:

StatusMeaning
204Deleted
401Missing or invalid API key (Error)
403Only admins and owners can delete
404Item (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:

NameInTypeRequiredDescription
keypathstringYesThe project's ingest_key.
releasequerystringYesUp to 200 characters.
file_urlquerystringYesUp to 2000 characters.

Request body (application/octet-stream, required)

Responses:

StatusMeaning
201The stored map
400The request body is invalid or is not valid JSON (Error)
403The project takes source maps only with an API key
404Unknown ingest key
413The map is over 10 MB
429Too many uploads. See the Retry-After header.

Start free All the docs Video guides

Built for the people who write the code and answer the phone when it breaks.

Run from the UK. Hosted in the UK and Europe.

UK time --:--

Already in?Open the app Start free today
View our policies