Skip to Content
OpenPerf

Code mappings

Create a code mapping

POST
/api/v1/code-mappings

Maps a project's stack-trace path prefix to a source-control repository and directory.

Authorization

cookie
cookiebetter-auth.session_token<token>

Dashboard session cookie

Request Body

application/json
  1. body
projectId*string
Length1 <= length <= 64
repositoryId*string
Length1 <= length <= 64
stackRoot*string
Lengthlength <= 512
sourceRoot*string
Lengthlength <= 512

Response Body

application/json
  1. response
id*string
projectId*string
repository*
stackRoot*string
sourceRoot*string
createdAt*string
Formatdate-time
Example Request
curl -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"
}