Code mappings
Create a code mapping
POST
Maps a project's stack-trace path prefix to a source-control repository and directory.
cookiecookie
better-auth.session_token<token>Dashboard session cookie
application/json- body
projectId*stringLength
1 <= length <= 64repositoryId*stringLength
1 <= length <= 64stackRoot*stringLength
length <= 512sourceRoot*stringLength
length <= 512application/json- response
id*stringprojectId*stringrepository*stackRoot*stringsourceRoot*stringcreatedAt*stringFormat
date-timecurl -X POST 'https://api.example.com/api/v1/code-mappings' \
-H 'Content-Type: application/json' \
-d '{
"projectId": "string",
"repositoryId": "string",
"stackRoot": "string",
"sourceRoot": "string"
}'Example Response
{
"id": "string",
"projectId": "string",
"repository": {
"id": "string",
"integrationId": "string",
"provider": "github",
"name": "string",
"url": "http://example.com",
"defaultBranch": "string"
},
"stackRoot": "string",
"sourceRoot": "string",
"createdAt": "2019-08-24T14:15:22Z"
}