---
title: "Get a JavaScript source map"
method: GET
path: "/api/v2/sourcemaps"
tags: ["RUM"]
---

# Get a JavaScript source map

`GET /api/v2/sourcemaps`

## Request

- Base URL: `https://api.datadoghq.com`
- URL: `https://api.datadoghq.com/api/v2/sourcemaps`
- Auth: API key in header `DD-API-KEY` and API key in header `DD-APPLICATION-KEY`

Retrieves the content of a specific JavaScript source map file by its
filename, service name, and version.

## Query parameters

- `filename` string, required
- `service` string, required
- `version` string, required

## Response `200`

OK

- SourcemapFileResponse: Response containing a JavaScript source map file.
  - `data` SourcemapFileData, required: JavaScript source map file data object.
    - `attributes` SourcemapFileAttributes, required: Attributes of a JavaScript source map file.
      - `file` string, required: The name of the minified JavaScript file.
      - `mappings` string, required: The Base64 VLQ encoded string that maps positions in the minified file to positions in the original source files.
      - `minifiedLineLengths` integer[], required: List of character counts for each line in the minified file.
      - `names` unknown[], required: List of symbol names referenced in the mappings.
        - unknown
      - `sourceRoot` string, required: The root path prepended to source file paths.
      - `sources` string[], required: List of original source file paths.
      - `sourcesContent` string[], required: List of original source file contents corresponding to the paths in `sources`.
      - `version` integer, required: The version of the source map format (typically 3).
    - `id` string, required: The unique identifier of the source map file, typically the path to the file.
    - `type` 'sourcemap_files', required: The resource type for source map file objects.

## Other responses

- `400`: Bad Request
- `404`: Not Found
- `429`: Too many requests
- `500`: Internal Server Error

---

[API](https://skmtc.dev/datadog/apis/datadog-api-v2-collection.md) - [All operations](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/llms.txt) - [OpenAPI document](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/revisions/da68bf029e4c?raw)
