---
title: 소스 맵 복원
description: 지정된 필터 기준과 일치하는 이전에 삭제된 소스 맵을 복원합니다. 실제 복원을 수행하지 않고 어떤 소스 맵이 복원될지 미리 볼 수 있는 dry-run 모드를 지원합니다.
breadcrumbs: 문서 > API > 소스 맵 복원
---

> For the complete documentation index, see [llms.txt](https://dnd37xeb23o8n.cloudfront.net/stefon.simmons/docs-astro-web-10435/llms.txt).

# 소스 맵 복원

## v2 (latest)

{% alert level="warning" %}
**Note**: This endpoint is in preview and is subject to change.
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help.md).
{% /alert %}

| Datadog site      | API endpoint                                                  |
| ----------------- | ------------------------------------------------------------- |
| app.datadoghq.com | PATCH https://api.datadoghq.com/api/v2/sourcemaps/restore     |
| us3.datadoghq.com | PATCH https://api.us3.datadoghq.com/api/v2/sourcemaps/restore |
| us5.datadoghq.com | PATCH https://api.us5.datadoghq.com/api/v2/sourcemaps/restore |
| app.datadoghq.eu  | PATCH https://api.datadoghq.eu/api/v2/sourcemaps/restore      |
| ap1.datadoghq.com | PATCH https://api.ap1.datadoghq.com/api/v2/sourcemaps/restore |
| ap2.datadoghq.com | PATCH https://api.ap2.datadoghq.com/api/v2/sourcemaps/restore |
| uk1.datadoghq.com | PATCH https://api.uk1.datadoghq.com/api/v2/sourcemaps/restore |
| app.ddog-gov.com  | PATCH https://api.ddog-gov.com/api/v2/sourcemaps/restore      |
| us2.ddog-gov.com  | PATCH https://api.us2.ddog-gov.com/api/v2/sourcemaps/restore  |

### Overview

지정된 필터 기준과 일치하는 이전에 삭제된 소스 맵을
복원합니다. 실제 복원을 수행하지 않고 어떤 소스 맵이 복원될지 미리 볼 수 있는
dry-run 모드를 지원합니다.

This endpoint requires the `rum_delete_data` permission.

### Arguments

#### Query Strings

| Field                  | Type    | Description                                                                                                                                                                                                                                   |
| ---------------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| mapkind [*required*]   | enum    | The type of source map. Valid values are `js`, `jvm`, `ios`, `react`, `flutter`, `elf`, `ndk`, `il2cpp`, `wasm`, `portable_pdb`. Allowed enum values: `js`, `jvm`, `ios`, `react`, `flutter`, `elf`, `ndk`, `il2cpp`, `wasm`, `portable_pdb`. |
| dry_run [*required*]   | boolean | When set to `true`, returns the source maps that would be restored without performing the actual restoration. When set to `false`, performs the restoration.                                                                                  |
| filter[service]        | array   | Filter by service names (multiple values allowed). Required for `js`, `jvm`, `react`, and `flutter` map kinds.                                                                                                                                |
| filter[version]        | array   | Filter by version values (multiple values allowed, maximum 10). Required for `js`, `jvm`, `react`, and `flutter` map kinds.                                                                                                                   |
| filter[variant]        | array   | Filter by variant values (multiple values allowed). Supported for `jvm`.                                                                                                                                                                      |
| filter[id]             | array   | Filter by source map ID values (multiple values allowed). Supported for all map kinds.                                                                                                                                                        |
| filter[build_id]       | array   | Filter by build ID values (multiple values allowed). Supported for `jvm`, `ndk`, `il2cpp`, `wasm`, and `portable_pdb`.                                                                                                                        |
| filter[uuid]           | array   | Filter by UUID values (multiple values allowed). Supported for `ios`.                                                                                                                                                                         |
| filter[platform]       | array   | Filter by platform values (multiple values allowed). Supported for `react`.                                                                                                                                                                   |
| filter[build_number]   | array   | Filter by build number values (multiple values allowed). Supported for `react`.                                                                                                                                                               |
| filter[bundle_name]    | array   | Filter by bundle name values (multiple values allowed). Supported for `react`.                                                                                                                                                                |
| filter[arch]           | array   | Filter by architecture values (multiple values allowed). Supported for `flutter`, `elf`, and `ndk`.                                                                                                                                           |
| filter[symbol_source]  | array   | Filter by symbol source values (multiple values allowed). Supported for `elf`.                                                                                                                                                                |
| filter[origin]         | array   | Filter by origin values (multiple values allowed). Supported for `elf`.                                                                                                                                                                       |
| filter[origin_version] | array   | Filter by origin version values (multiple values allowed). Supported for `elf`.                                                                                                                                                               |
| filter[filename]       | string  | Filter by filename (single value). Supported for `js`, `elf`, `ndk`, `wasm`, and `portable_pdb`.                                                                                                                                              |
| filter[debug_id]       | string  | Filter by debug ID (single value). Supported for `react`.                                                                                                                                                                                     |
| filter[gnu_build_id]   | string  | Filter by GNU build ID (single value). Supported for `elf`.                                                                                                                                                                                   |
| filter[go_build_id]    | string  | Filter by Go build ID (single value). Supported for `elf`.                                                                                                                                                                                    |
| filter[file_hash]      | string  | Filter by file hash (single value). Supported for `elf`.                                                                                                                                                                                      |

### Response

{% tabs %}
{% tab label="200" %}
OK

{% tabs %}
{% tab label="Model" %}
Response containing a list of affected source maps.

| Parent field | Field                       | Type      | Description                                                                                                                           |
| ------------ | --------------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------- |
|              | data [*required*]           | [<oneOf>] | List of source map data objects.                                                                                                      |
| data         | Object 1                    | object    | JavaScript source map data object.                                                                                                    |
| Object 1     | attributes [*required*]     | object    | Attributes of a JavaScript source map.                                                                                                |
| attributes   | absolute_path               | string    | The absolute path to the minified JavaScript file.                                                                                    |
| attributes   | blob_storage_sourcemap_path | string    | The path to the source map in blob storage.                                                                                           |
| attributes   | build_id                    | string    | The build identifier.                                                                                                                 |
| attributes   | created_at [*required*]     | date-time | The timestamp when the source map was created.                                                                                        |
| attributes   | debug_id                    | string    | The debug identifier (UUID format) that uniquely identifies this JavaScript source map. Returned for source maps indexed by debug ID. |
| attributes   | domain                      | string    | The domain associated with the source map.                                                                                            |
| attributes   | file_name                   | string    | The file name of the minified JavaScript file.                                                                                        |
| attributes   | mapkind [*required*]        | enum      | The type of source map. Always `js` for JavaScript source maps. Allowed enum values: `js`.                                            |
| attributes   | service                     | string    | The service name associated with the source map.                                                                                      |
| attributes   | size [*required*]           | int64     | The size of the source map file in bytes.                                                                                             |
| attributes   | variant                     | string    | The source map variant.                                                                                                               |
| attributes   | version                     | string    | The version of the service associated with the source map.                                                                            |
| attributes   | version_code                | string    | The version code.                                                                                                                     |
| Object 1     | id [*required*]             | string    | The unique identifier of the source map.                                                                                              |
| Object 1     | type [*required*]           | enum      | The resource type for source map objects. Allowed enum values: `sourcemaps`.                                                          |
| data         | Object 2                    | object    | React Native source map data object.                                                                                                  |
| Object 2     | attributes [*required*]     | object    | Attributes of a React Native source map.                                                                                              |
| attributes   | build_number                | string    | The build number.                                                                                                                     |
| attributes   | bundle_name                 | string    | The bundle name.                                                                                                                      |
| attributes   | bundle_version              | string    | The bundle version.                                                                                                                   |
| attributes   | created_at [*required*]     | date-time | The timestamp when the source map was created.                                                                                        |
| attributes   | debug_id                    | string    | The debug identifier (UUID format).                                                                                                   |
| attributes   | mapkind [*required*]        | enum      | The type of source map. Always `react` for React Native source maps. Allowed enum values: `react`.                                    |
| attributes   | platform                    | string    | The platform the source map was built for (e.g., `ios`, `android`).                                                                   |
| attributes   | service                     | string    | The service name associated with the source map.                                                                                      |
| attributes   | size [*required*]           | int64     | The size of the source map file in bytes.                                                                                             |
| attributes   | version                     | string    | The version of the service associated with the source map.                                                                            |
| Object 2     | id [*required*]             | string    | The unique identifier of the source map.                                                                                              |
| Object 2     | type [*required*]           | enum      | The resource type for source map objects. Allowed enum values: `sourcemaps`.                                                          |
| data         | Object 3                    | object    | iOS dSYM source map data object.                                                                                                      |
| Object 3     | attributes [*required*]     | object    | Attributes of an iOS dSYM source map.                                                                                                 |
| attributes   | created_at [*required*]     | date-time | The timestamp when the source map was created.                                                                                        |
| attributes   | mapkind [*required*]        | enum      | The type of source map. Always `ios` for iOS dSYM source maps. Allowed enum values: `ios`.                                            |
| attributes   | size [*required*]           | int64     | The size of the dSYM file in bytes.                                                                                                   |
| attributes   | uuids                       | string    | The UUID(s) associated with the dSYM file.                                                                                            |
| Object 3     | id [*required*]             | string    | The unique identifier of the source map.                                                                                              |
| Object 3     | type [*required*]           | enum      | The resource type for source map objects. Allowed enum values: `sourcemaps`.                                                          |
| data         | Object 4                    | object    | JVM (ProGuard/R8) mapping file data object.                                                                                           |
| Object 4     | attributes [*required*]     | object    | Attributes of a JVM mapping file.                                                                                                     |
| attributes   | build_id                    | string    | The build identifier (UUID format).                                                                                                   |
| attributes   | created_at [*required*]     | date-time | The timestamp when the mapping file was created.                                                                                      |
| attributes   | mapkind [*required*]        | enum      | The type of source map. Always `jvm` for JVM source maps. Allowed enum values: `jvm`.                                                 |
| attributes   | service                     | string    | The service name associated with the mapping file.                                                                                    |
| attributes   | size [*required*]           | int64     | The size of the mapping file in bytes.                                                                                                |
| attributes   | variant                     | string    | The build variant (e.g., `release`, `debug`).                                                                                         |
| attributes   | version                     | string    | The version of the service associated with the mapping file.                                                                          |
| attributes   | version_code                | string    | The version code.                                                                                                                     |
| Object 4     | id [*required*]             | string    | The unique identifier of the source map.                                                                                              |
| Object 4     | type [*required*]           | enum      | The resource type for source map objects. Allowed enum values: `sourcemaps`.                                                          |
| data         | Object 5                    | object    | Flutter symbol file data object.                                                                                                      |
| Object 5     | attributes [*required*]     | object    | Attributes of a Flutter symbol file.                                                                                                  |
| attributes   | arch                        | string    | The target CPU architecture.                                                                                                          |
| attributes   | created_at [*required*]     | date-time | The timestamp when the symbol file was created.                                                                                       |
| attributes   | mapkind [*required*]        | enum      | The type of source map. Always `flutter` for Flutter source maps. Allowed enum values: `flutter`.                                     |
| attributes   | service                     | string    | The service name associated with the symbol file.                                                                                     |
| attributes   | size [*required*]           | int64     | The size of the symbol file in bytes.                                                                                                 |
| attributes   | variant                     | string    | The build variant.                                                                                                                    |
| attributes   | version                     | string    | The version of the service associated with the symbol file.                                                                           |
| Object 5     | id [*required*]             | string    | The unique identifier of the source map.                                                                                              |
| Object 5     | type [*required*]           | enum      | The resource type for source map objects. Allowed enum values: `sourcemaps`.                                                          |
| data         | Object 6                    | object    | ELF symbol file data object.                                                                                                          |
| Object 6     | attributes [*required*]     | object    | Attributes of an ELF symbol file.                                                                                                     |
| attributes   | arch                        | string    | The target CPU architecture.                                                                                                          |
| attributes   | created_at [*required*]     | date-time | The timestamp when the symbol file was created.                                                                                       |
| attributes   | file_hash                   | string    | The SHA256 hash of the ELF file.                                                                                                      |
| attributes   | file_name                   | string    | The ELF file name.                                                                                                                    |
| attributes   | gnu_build_id                | string    | The GNU build ID (UUID format).                                                                                                       |
| attributes   | go_build_id                 | string    | The Go build ID (UUID format).                                                                                                        |
| attributes   | mapkind [*required*]        | enum      | The type of source map. Always `elf` for ELF source maps. Allowed enum values: `elf`.                                                 |
| attributes   | origin                      | string    | The origin of the ELF file.                                                                                                           |
| attributes   | origin_version              | string    | The version of the origin package.                                                                                                    |
| attributes   | size [*required*]           | int64     | The size of the ELF file in bytes.                                                                                                    |
| attributes   | symbol_source               | string    | The source of the debug symbols.                                                                                                      |
| Object 6     | id [*required*]             | string    | The unique identifier of the source map.                                                                                              |
| Object 6     | type [*required*]           | enum      | The resource type for source map objects. Allowed enum values: `sourcemaps`.                                                          |
| data         | Object 7                    | object    | Android NDK symbol file data object.                                                                                                  |
| Object 7     | attributes [*required*]     | object    | Attributes of an Android NDK symbol file.                                                                                             |
| attributes   | arch                        | string    | The target CPU architecture.                                                                                                          |
| attributes   | build_id                    | string    | The build identifier (UUID format).                                                                                                   |
| attributes   | created_at [*required*]     | date-time | The timestamp when the symbol file was created.                                                                                       |
| attributes   | file_name                   | string    | The NDK library file name.                                                                                                            |
| attributes   | mapkind [*required*]        | enum      | The type of source map. Always `ndk` for Android NDK source maps. Allowed enum values: `ndk`.                                         |
| attributes   | size [*required*]           | int64     | The size of the symbol file in bytes.                                                                                                 |
| Object 7     | id [*required*]             | string    | The unique identifier of the source map.                                                                                              |
| Object 7     | type [*required*]           | enum      | The resource type for source map objects. Allowed enum values: `sourcemaps`.                                                          |
| data         | Object 8                    | object    | IL2CPP mapping file data object.                                                                                                      |
| Object 8     | attributes [*required*]     | object    | Attributes of an IL2CPP mapping file.                                                                                                 |
| attributes   | build_id                    | string    | The build identifier (UUID format).                                                                                                   |
| attributes   | created_at [*required*]     | date-time | The timestamp when the mapping file was created.                                                                                      |
| attributes   | mapkind [*required*]        | enum      | The type of source map. Always `il2cpp` for IL2CPP source maps. Allowed enum values: `il2cpp`.                                        |
| attributes   | size [*required*]           | int64     | The size of the mapping file in bytes.                                                                                                |
| Object 8     | id [*required*]             | string    | The unique identifier of the source map.                                                                                              |
| Object 8     | type [*required*]           | enum      | The resource type for source map objects. Allowed enum values: `sourcemaps`.                                                          |
| data         | Object 9                    | object    | WebAssembly symbol file data object.                                                                                                  |
| Object 9     | attributes [*required*]     | object    | Attributes of a WebAssembly symbol file.                                                                                              |
| attributes   | build_id                    | string    | The build identifier.                                                                                                                 |
| attributes   | created_at                  | date-time | The timestamp when the symbol file was created.                                                                                       |
| attributes   | file_name                   | string    | The file name of the symbol file.                                                                                                     |
| attributes   | mapkind [*required*]        | enum      | The type of source map. Always `wasm` for WebAssembly symbol files. Allowed enum values: `wasm`.                                      |
| attributes   | size                        | int64     | The size of the symbol file in bytes.                                                                                                 |
| Object 9     | id [*required*]             | string    | The unique identifier of the source map.                                                                                              |
| Object 9     | type [*required*]           | enum      | The resource type for source map objects. Allowed enum values: `sourcemaps`.                                                          |
| data         | Object 10                   | object    | Portable PDB file data object.                                                                                                        |
| Object 10    | attributes [*required*]     | object    | Attributes of a Portable PDB file.                                                                                                    |
| attributes   | build_id                    | string    | The build identifier.                                                                                                                 |
| attributes   | created_at                  | date-time | The timestamp when the symbol file was created.                                                                                       |
| attributes   | file_name                   | string    | The file name of the symbol file.                                                                                                     |
| attributes   | mapkind [*required*]        | enum      | The type of source map. Always `portable_pdb` for Portable PDB files. Allowed enum values: `portable_pdb`.                            |
| attributes   | size                        | int64     | The size of the symbol file in bytes.                                                                                                 |
| Object 10    | id [*required*]             | string    | The unique identifier of the source map.                                                                                              |
| Object 10    | type [*required*]           | enum      | The resource type for source map objects. Allowed enum values: `sourcemaps`.                                                          |
{% /tab %}

{% tab label="Example" %}
```json
{
  "data": [
    {
      "attributes": {
        "absolute_path": "/js/bundle.min.js",
        "blob_storage_sourcemap_path": "org123/1.0.0/bundle.min.js.map",
        "build_id": "abc123",
        "created_at": "2024-01-01T00:00:00Z",
        "debug_id": "00000000-0000-4000-8000-000000000001",
        "domain": "example.com",
        "file_name": "bundle.min.js",
        "mapkind": "js",
        "service": "my-web-service",
        "size": 1024,
        "variant": "release",
        "version": "1.0.0",
        "version_code": "100"
      },
      "id": "5",
      "type": "sourcemaps"
    }
  ]
}
```
{% /tab %}
{% /tabs %}
{% /tab %}

{% tab label="400" %}
Bad Request

{% tabs %}
{% tab label="Model" %}
API error response.

| Parent field | Field               | Type     | Description                                                                     |
| ------------ | ------------------- | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail              | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                | object   | Non-standard meta-information about the error                                   |
| errors       | source              | object   | References to the source of the error.                                          |
| source       | header              | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter           | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer             | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status              | string   | Status code of the response.                                                    |
| errors       | title               | string   | Short human-readable summary of the error.                                      |
{% /tab %}

{% tab label="Example" %}
```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```
{% /tab %}
{% /tabs %}
{% /tab %}

{% tab label="404" %}
Not Found

{% tabs %}
{% tab label="Model" %}
API error response.

| Parent field | Field               | Type     | Description                                                                     |
| ------------ | ------------------- | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail              | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                | object   | Non-standard meta-information about the error                                   |
| errors       | source              | object   | References to the source of the error.                                          |
| source       | header              | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter           | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer             | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status              | string   | Status code of the response.                                                    |
| errors       | title               | string   | Short human-readable summary of the error.                                      |
{% /tab %}

{% tab label="Example" %}
```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```
{% /tab %}
{% /tabs %}
{% /tab %}

{% tab label="429" %}
Too many requests

{% tabs %}
{% tab label="Model" %}
API error response.

| Field               | Type     | Description       |
| ------------------- | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |
{% /tab %}

{% tab label="Example" %}
```json
{
  "errors": [
    "Bad Request"
  ]
}
```
{% /tab %}
{% /tabs %}
{% /tab %}

{% tab label="500" %}
Internal Server Error

{% tabs %}
{% tab label="Model" %}
API error response.

| Parent field | Field               | Type     | Description                                                                     |
| ------------ | ------------------- | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail              | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                | object   | Non-standard meta-information about the error                                   |
| errors       | source              | object   | References to the source of the error.                                          |
| source       | header              | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter           | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer             | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status              | string   | Status code of the response.                                                    |
| errors       | title               | string   | Short human-readable summary of the error.                                      |
{% /tab %}

{% tab label="Example" %}
```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```
{% /tab %}
{% /tabs %}
{% /tab %}
{% /tabs %}

### Code Example

{% tabs %}
{% tab label="Curl" %}
```bash
# Required query arguments
export mapkind="js"
export dry_run="true"

# Set your Datadog site and credentials
export DD_SITE="datadoghq.com" # Or us3.datadoghq.com, us5.datadoghq.com, datadoghq.eu, ap1.datadoghq.com, ap2.datadoghq.com, uk1.datadoghq.com, ddog-gov.com, us2.ddog-gov.com
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X PATCH "https://api.${DD_SITE}/api/v2/sourcemaps/restore?mapkind=${mapkind}&dry_run=${dry_run}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
```
{% /tab %}
{% /tabs %}
