Skip to main content
TroopyDocs
Open Troopy
Troopy

API reference / Tests and incidents

Upload a source map

Gives Troopy the source map of one built file of a release. Then the errors of that release show the app's own files, lines and functions, and two builds of one problem stay one incident. name: the built file as its errors name it, or its path, like /assets/index-3f2a9c1b.js. A name without a folder matches that file in any folder. A map is 25 MB at most, and a new map of the same file replaces the old one. Troopy keeps the maps of the latest 10 releases. From the CLI, pass --content @./dist/assets/index-3f2a9c1b.js.map.

post/api/v1/incident-apps/{id}/sourcemaps

Authorization

HeaderAuthorization: Bearer <API key>
Or the headerX-API-Key: <API key>
API keyMake one in Troopy under Settings > API keys. It acts as you, in its workspace.

Other ways to call it

CLItroopy incidents sourcemaps upload
MCP toolNone. Call it over REST or with the CLI.
Rate limit120 calls in 60 seconds, for each key
RetriesSend an Idempotency-Key header. A retry with the same key gets the first answer back, and the operation runs one time.

Path parameters

id*string

A 24-character id

Body

application/json
release*string

The release that the SDK of the app names

At least 1 characters · At most 200 characters

name*string

The built file, like /assets/index-3f2a9c1b.js or https://app.example.com/assets/index-3f2a9c1b.js

At least 1 characters · At most 500 characters

content*string

The source map, base64-encoded

At most 35000000 characters · base64

Response

201 · application/json
data*object
5 properties
release*string
path*string

The built file, without the site

debugId*string | null

The debug id that a bundler wrote into the map

size*integer
uploadedAt*string

ISO 8601 date and time

Errors

400 invalid_inputFix the field named in detail. Each operation's schema is in /api/v1/openapi.json.
401 unauthorizedSend an API key as `Authorization: Bearer tr_live_...`. Create one in Troopy under Settings.
403 forbiddenThe key lacks a scope this operation needs, or its owner lacks the role. detail says which; create a key with the scope, or ask an organization owner or admin.
404 not_foundCheck the path and any id in it. Every operation is listed in /api/v1/openapi.json.
409 conflictThis Idempotency-Key was used for a different request, or that request is still running. Use a new key for a new request.
429 rate_limitedWait the number of seconds in Retry-After, then retry.