---
title: 소스 맵 업로드
description: 오류 난독화 해제를 위해 소스 맵, 심볼 파일 및 매핑 파일을 Datadog에 업로드합니다. 이 엔드포인트를 사용하면 RUM Error Tracking을 위한 다양한 유형의 디버그 심볼을 업로드할 수 있습니다. 이를 통해 Datadog은 축소되거나 난독화된 코드 대신 읽기…
breadcrumbs: 문서 > API > 소스 맵 업로드
---

> For the complete documentation index, see [llms.txt](https://dnd37xeb23o8n.cloudfront.net/jen.gilbert/astro-base/llms.txt).

# 소스 맵 업로드

## v2 (latest)

{% alert level="warning" %}
This endpoint is in Preview and may introduce breaking changes.
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help.md).
{% /alert %}

| Datadog site      | API endpoint                                                  |
| ----------------- | ------------------------------------------------------------- |
| app.datadoghq.com | POST https://sourcemap-intake.datadoghq.com/api/v2/srcmap     |
| us3.datadoghq.com | POST https://sourcemap-intake.us3.datadoghq.com/api/v2/srcmap |
| us5.datadoghq.com | POST https://sourcemap-intake.us5.datadoghq.com/api/v2/srcmap |
| app.datadoghq.eu  | POST https://sourcemap-intake.datadoghq.eu/api/v2/srcmap      |
| ap1.datadoghq.com | POST https://sourcemap-intake.ap1.datadoghq.com/api/v2/srcmap |
| ap2.datadoghq.com | POST https://sourcemap-intake.ap2.datadoghq.com/api/v2/srcmap |
| app.ddog-gov.com  | POST https://sourcemap-intake.ddog-gov.com/api/v2/srcmap      |
| uk1.datadoghq.com | POST Not supported in the UK1 region                          |
| us2.ddog-gov.com  | POST Not supported in the US2-FED region                      |

### Overview

오류 난독화 해제를 위해 소스 맵, 심볼 파일 및 매핑 파일을 Datadog에 업로드합니다.
이 엔드포인트를 사용하면 RUM Error Tracking을 위한 다양한 유형의 디버그 심볼을 업로드할 수 있습니다.
이를 통해 Datadog은 축소되거나 난독화된 코드 대신 읽기 쉬운 스택 트레이스를 표시할 수 있습니다.

**요청 형식:**

각 요청은 다음 두 부분으로 구성된 `multipart/form-data` 업로드입니다.

1. `event` — 업로드 메타데이터(유형, 서비스, 버전 등)가 포함된 JSON 인코딩 문자열
1. 하나 이상의 바이너리 파일 필드(예: `source_map`, `symbols_archive`)

**지원되는 업로드 유형**(`event.type`을 통해 설정):

- `js_sourcemap`: 브라우저 애플리케이션용 JavaScript 소스 맵
- `react_native_sourcemap`: 모바일 애플리케이션용 React Native 소스 맵
- `jvm_mapping_file`: Android 크래시 난독화 해제를 위한 ProGuard/R8 매핑 파일
- `ios_symbols`: iOS 크래시 심볼화를 위한 dSYM 파일
- `flutter_symbol_file`: Flutter 심볼 파일
- `ndk_symbol_file`: 네이티브 크래시를 위한 Android NDK 심볼 파일
- `il2cpp_mapping_file`: Unity용 IL2CPP 매핑 파일
- `elf_symbol_file`: Linux/Unix용 ELF 심볼 파일
- `pe_symbol_file`: Windows용 PE/PDB 심볼 파일
- `repository`: 소스 코드 연결을 위한 리포지토리 메타데이터

**제한:**

- 최대 파일 크기: 500MB

**참고:** 대부분의 사용 사례에서는 [Datadog CLI(datadog-ci)]
(<https://github.com/DataDog/datadog-ci/tree/master/src/commands/sourcemaps>)를 사용하는 것이 좋은데,
소스 맵 업로드를 위한 간소화된 인터페이스를 제공하기 때문입니다.

### Request

#### Body Data (required)

{% tabs %}
{% tab label="Model" %}
| Parent field | Field                            | Type    | Description                                                                                     |
| ------------ | -------------------------------- | ------- | ----------------------------------------------------------------------------------------------- |
|              | Option 1                         | object  | 소스 맵, 심볼 파일 또는 매핑 파일을 업로드하기 위한 멀티파트 폼 데이터입니다.                                                   |
| Option 1     | event [*required*]               | object  | Metadata for a JavaScript source map upload, sent as a JSON-encoded `event` field.              |
| event        | cli_version                      | string  | Version of the CLI used for upload (max 50 characters).                                         |
| event        | git_commit_sha                   | string  | Git commit SHA (40 lowercase hex characters).                                                   |
| event        | git_repository_url               | string  | Git repository URL (max 2048 characters).                                                       |
| event        | minified_url [*required*]        | string  | URL of the minified JavaScript file (1-2048 characters).                                        |
| event        | overwrite                        | boolean | Whether to overwrite existing source map. Default: `false`.                                     |
| event        | project_path                     | string  | Path to the project root (max 500 characters).                                                  |
| event        | service [*required*]             | string  | Service name (1-200 characters).                                                                |
| event        | type [*required*]                | enum    | Must be `js_sourcemap`. Allowed enum values: `js_sourcemap`.                                    |
| event        | version [*required*]             | string  | Version of the service (1-200 characters).                                                      |
| Option 1     | minified_file [*required*]       | binary  | The minified JavaScript file.                                                                   |
| Option 1     | repository                       | binary  | Repository metadata file (optional).                                                            |
| Option 1     | source_map [*required*]          | binary  | The source map file.                                                                            |
|              | Option 2                         | object  | Multipart form data for uploading React Native source maps for mobile applications.             |
| Option 2     | event [*required*]               | object  | Metadata for a React Native source map upload, sent as a JSON-encoded `event` field.            |
| event        | build_number                     | string  | Build number (max 200 characters).                                                              |
| event        | bundle_name [*required*]         | string  | Name of the JavaScript bundle (1-200 characters).                                               |
| event        | bundle_version                   | string  | Bundle version (max 200 characters).                                                            |
| event        | cli_version                      | string  | Version of the CLI used for upload (max 50 characters).                                         |
| event        | debug_id                         | string  | Debug identifier for the source map file.                                                       |
| event        | platform [*required*]            | enum    | Target platform for mobile source maps. Allowed enum values: `android`, `ios`.                  |
| event        | project_path                     | string  | Path to the project root (max 500 characters).                                                  |
| event        | service [*required*]             | string  | Service name (1-200 characters).                                                                |
| event        | type [*required*]                | enum    | Must be `react_native_sourcemap`. Allowed enum values: `react_native_sourcemap`.                |
| event        | version [*required*]             | string  | Version of the service (1-200 characters).                                                      |
| Option 2     | minified_file                    | binary  | The minified JavaScript bundle (optional).                                                      |
| Option 2     | repository                       | binary  | Repository metadata file (optional).                                                            |
| Option 2     | source_map [*required*]          | binary  | The source map file.                                                                            |
|              | Option 3                         | object  | Multipart form data for uploading ProGuard or R8 mapping files for Android crash deobfuscation. |
| Option 3     | event [*required*]               | object  | Metadata for a ProGuard or R8 mapping file upload, sent as a JSON-encoded `event` field.        |
| event        | build_id                         | string  | Build identifier for the mapping file.                                                          |
| event        | overwrite                        | boolean | Whether to overwrite existing mapping file. Default: `false`.                                   |
| event        | service [*required*]             | string  | Service name (1-200 characters).                                                                |
| event        | type [*required*]                | enum    | Must be `jvm_mapping_file`. Allowed enum values: `jvm_mapping_file`.                            |
| event        | variant                          | string  | Build variant (max 200 characters).                                                             |
| event        | version [*required*]             | string  | Version of the service (1-200 characters).                                                      |
| Option 3     | jvm_mapping_file [*required*]    | binary  | The ProGuard/R8 mapping file.                                                                   |
| Option 3     | repository                       | binary  | Repository metadata file (optional).                                                            |
|              | Option 4                         | object  | Multipart form data for uploading dSYM files for iOS crash symbolication.                       |
| Option 4     | event [*required*]               | object  | Metadata for an iOS dSYM file upload, sent as a JSON-encoded `event` field.                     |
| event        | type [*required*]                | enum    | Must be `ios_symbols`. Allowed enum values: `ios_symbols`.                                      |
| event        | uuids [*required*]               | string  | Comma-separated list of dSYM UUIDs (min 1 character).                                           |
| Option 4     | symbols_archive [*required*]     | binary  | The dSYM archive file (.zip).                                                                   |
|              | Option 5                         | object  | Multipart form data for uploading Flutter symbol files for crash symbolication.                 |
| Option 5     | event [*required*]               | object  | Metadata for a Flutter symbol file upload, sent as a JSON-encoded `event` field.                |
| event        | arch [*required*]                | string  | CPU architecture (1-200 characters).                                                            |
| event        | cli_version                      | string  | Version of the CLI used for upload (max 50 characters).                                         |
| event        | platform [*required*]            | string  | Target platform (1-200 characters).                                                             |
| event        | service [*required*]             | string  | Service name (1-200 characters).                                                                |
| event        | type [*required*]                | enum    | Must be `flutter_symbol_file`. Allowed enum values: `flutter_symbol_file`.                      |
| event        | variant [*required*]             | string  | Build variant (1-200 characters).                                                               |
| event        | version [*required*]             | string  | Version of the service (1-200 characters).                                                      |
| Option 5     | flutter_symbol_file [*required*] | binary  | The Flutter symbol file.                                                                        |
|              | Option 6                         | object  | Multipart form data for uploading Android NDK symbol files for native crash symbolication.      |
| Option 6     | event [*required*]               | object  | Metadata for an Android NDK symbol file upload, sent as a JSON-encoded `event` field.           |
| event        | arch [*required*]                | string  | CPU architecture (1-200 characters).                                                            |
| event        | build_id [*required*]            | string  | Build ID (1-200 characters).                                                                    |
| event        | filename                         | string  | Original filename (max 500 characters).                                                         |
| event        | type [*required*]                | enum    | Must be `ndk_symbol_file`. Allowed enum values: `ndk_symbol_file`.                              |
| Option 6     | ndk_symbol_file [*required*]     | binary  | The NDK symbol file.                                                                            |
|              | Option 7                         | object  | Multipart form data for uploading IL2CPP mapping files for Unity crash symbolication.           |
| Option 7     | event [*required*]               | object  | Metadata for a Unity IL2CPP mapping file upload, sent as a JSON-encoded `event` field.          |
| event        | build_id [*required*]            | string  | Build ID (1-200 characters).                                                                    |
| event        | type [*required*]                | enum    | Must be `il2cpp_mapping_file`. Allowed enum values: `il2cpp_mapping_file`.                      |
| Option 7     | il2cpp_mapping_file [*required*] | binary  | The IL2CPP mapping file.                                                                        |
|              | Option 8                         | object  | Multipart form data for uploading ELF symbol files for Linux/Unix crash symbolication.          |
| Option 8     | elf_symbol_file [*required*]     | binary  | The ELF symbol file.                                                                            |
| Option 8     | event [*required*]               | object  | Metadata for an ELF symbol file upload, sent as a JSON-encoded `event` field.                   |
| event        | arch                             | string  | CPU architecture (max 200 characters).                                                          |
| event        | cli_version                      | string  | Version of the CLI used for upload (max 50 characters).                                         |
| event        | file_hash                        | string  | File hash (32 hex characters, or empty).                                                        |
| event        | filename                         | string  | Original filename (max 500 characters).                                                         |
| event        | gnu_build_id                     | string  | GNU Build ID (16+ hex characters, or empty).                                                    |
| event        | go_build_id                      | string  | Go Build ID (or redacted, or empty).                                                            |
| event        | origin                           | string  | Origin identifier (max 200 characters).                                                         |
| event        | origin_version                   | string  | Origin version (max 200 characters).                                                            |
| event        | overwrite                        | boolean | Whether to overwrite existing symbol file. Default: `false`.                                    |
| event        | symbol_source                    | string  | Symbol source (max 200 characters).                                                             |
| event        | type [*required*]                | enum    | Must be `elf_symbol_file`. Allowed enum values: `elf_symbol_file`.                              |
|              | Option 9                         | object  | Multipart form data for uploading PE/PDB symbol files for Windows crash symbolication.          |
| Option 9     | event [*required*]               | object  | Metadata for a PE/PDB symbol file upload, sent as a JSON-encoded `event` field.                 |
| event        | arch [*required*]                | string  | CPU architecture (1-200 characters).                                                            |
| event        | cli_version                      | string  | Version of the CLI used for upload (max 50 characters).                                         |
| event        | filename                         | string  | Original filename (max 500 characters).                                                         |
| event        | origin                           | string  | Origin identifier (max 200 characters).                                                         |
| event        | origin_version                   | string  | Origin version (max 200 characters).                                                            |
| event        | overwrite                        | boolean | Whether to overwrite existing symbol file. Default: `false`.                                    |
| event        | pdb_age [*required*]             | int64   | PDB age (>= 0).                                                                                 |
| event        | pdb_sig [*required*]             | string  | PDB signature GUID.                                                                             |
| event        | type [*required*]                | enum    | Must be `pe_symbol_file`. Allowed enum values: `pe_symbol_file`.                                |
| Option 9     | pe_symbol_file [*required*]      | binary  | The PDB symbol file.                                                                            |
|              | Option 10                        | object  | Multipart form data for uploading repository metadata for source code linking.                  |
| Option 10    | event [*required*]               | object  | Metadata for a repository upload, sent as a JSON-encoded `event` field.                         |
| event        | cli_version                      | string  | Version of the CLI used for upload (max 50 characters).                                         |
| event        | git_commit_sha [*required*]      | string  | Git commit SHA (40 lowercase hex characters).                                                   |
| event        | git_repository_url [*required*]  | string  | Git repository URL (max 2048 characters).                                                       |
| event        | type [*required*]                | enum    | Must be `repository`. Allowed enum values: `repository`.                                        |
| Option 10    | repository [*required*]          | binary  | Repository metadata file.                                                                       |
{% /tab %}

{% tab label="Example" %}
**JavaScript Source Map Upload**

```bash
-F 'event={"git_commit_sha":"a1b2c3d4e5f6789012345678901234567890abcd","git_repository_url":"https://github.com/myorg/my-web-app","minified_url":"https://example.com/static/js/main.min.js","service":"my-web-app","type":"js_sourcemap","version":"1.2.3"};type=application/json'
-F 'minified_file=@main.min.js'
-F 'source_map=@main.min.js.map'
```

**ELF Symbol File Upload**

```bash
-F 'elf_symbol_file=@libmyapp.so'
-F 'event={"arch":"x86_64","gnu_build_id":"abcdef1234567890abcdef1234567890","type":"elf_symbol_file"};type=application/json'
```

**Flutter Symbol File Upload**

```bash
-F 'event={"arch":"arm64","platform":"android","service":"my-flutter-app","type":"flutter_symbol_file","variant":"release","version":"1.0.0"};type=application/json'
-F 'flutter_symbol_file=@app.symbols'
```

**Unity IL2CPP Mapping File Upload**

```bash
-F 'event={"build_id":"unity-build-12345","type":"il2cpp_mapping_file"};type=application/json'
-F 'il2cpp_mapping_file=@il2cpp_data.dat'
```

**iOS dSYM Upload**

```bash
-F 'event={"type":"ios_symbols","uuids":"A1B2C3D4-E5F6-7890-ABCD-EF1234567890"};type=application/json'
-F 'symbols_archive=@MyApp.dSYM.zip'
```

**ProGuard/R8 Mapping File Upload**

```bash
-F 'event={"service":"my-android-app","type":"jvm_mapping_file","variant":"release","version":"3.1.0"};type=application/json'
-F 'jvm_mapping_file=@mapping.txt'
```

**Android NDK Symbol File Upload**

```bash
-F 'event={"arch":"arm64-v8a","build_id":"abc123def456","type":"ndk_symbol_file"};type=application/json'
-F 'ndk_symbol_file=@libnative.so'
```

**Windows PE/PDB Symbol File Upload**

```bash
-F 'event={"arch":"x64","pdb_age":1,"pdb_sig":"A1B2C3D4-E5F6-7890-ABCD-EF1234567890","type":"pe_symbol_file"};type=application/json'
-F 'pe_symbol_file=@myapp.pdb'
```

**React Native Source Map Upload**

```bash
-F 'event={"build_number":"100","bundle_name":"main.jsbundle","platform":"ios","service":"my-mobile-app","type":"react_native_sourcemap","version":"2.0.0"};type=application/json'
-F 'source_map=@main.jsbundle.map'
```

**Repository Metadata Upload**

```bash
-F 'event={"git_commit_sha":"a1b2c3d4e5f6789012345678901234567890abcd","git_repository_url":"https://github.com/myorg/my-web-app","type":"repository"};type=application/json'
-F 'repository=@repository.json'
```
{% /tab %}
{% /tabs %}

### Response

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

{% tabs %}
{% tab label="Model" %}
Response for source map upload.

| Parent field | Field | Type   | Description                                                    |
| ------------ | ----- | ------ | -------------------------------------------------------------- |
|              | data  | object | Data envelope for source map upload response.                  |
| data         | id    | string | Unique identifier for the uploaded source map.                 |
| data         | type  | enum   | Type of the response. Allowed enum values: `sourcemap_upload`. |
{% /tab %}

{% tab label="Example" %}
```json
{
  "data": {
    "id": "sourcemap-upload-id",
    "type": "sourcemap_upload"
  }
}
```
{% /tab %}
{% /tabs %}
{% /tab %}

{% tab label="202" %}
Accepted - the request has been accepted for processing.

{% tabs %}
{% tab label="Model" %}
Response for source map upload.

| Parent field | Field | Type   | Description                                                    |
| ------------ | ----- | ------ | -------------------------------------------------------------- |
|              | data  | object | Data envelope for source map upload response.                  |
| data         | id    | string | Unique identifier for the uploaded source map.                 |
| data         | type  | enum   | Type of the response. Allowed enum values: `sourcemap_upload`. |
{% /tab %}

{% tab label="Example" %}
```json
{
  "data": {
    "id": "sourcemap-upload-id",
    "type": "sourcemap_upload"
  }
}
```
{% /tab %}
{% /tabs %}
{% /tab %}

{% tab label="400" %}
Bad Request - Invalid request body or missing required fields.

{% tabs %}
{% tab label="Model" %}
Error response for source map upload.

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

{% tab label="Example" %}
```json
{
  "errors": [
    "Missing required field: service"
  ]
}
```
{% /tab %}
{% /tabs %}
{% /tab %}

{% tab label="401" %}
Unauthorized - Invalid or missing API key.

{% tabs %}
{% tab label="Model" %}
Error response for source map upload.

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

{% tab label="Example" %}
```json
{
  "errors": [
    "Missing required field: service"
  ]
}
```
{% /tab %}
{% /tabs %}
{% /tab %}

{% tab label="403" %}
Forbidden - Insufficient permissions.

{% tabs %}
{% tab label="Model" %}
Error response for source map upload.

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

{% tab label="Example" %}
```json
{
  "errors": [
    "Missing required field: service"
  ]
}
```
{% /tab %}
{% /tabs %}
{% /tab %}

{% tab label="404" %}
Not Found - The requested resource was not found.

{% tabs %}
{% tab label="Model" %}
Error response for source map upload.

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

{% tab label="Example" %}
```json
{
  "errors": [
    "Missing required field: service"
  ]
}
```
{% /tab %}
{% /tabs %}
{% /tab %}

{% tab label="408" %}
Request Timeout - The request took too long to complete.

{% tabs %}
{% tab label="Model" %}
Error response for source map upload.

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

{% tab label="Example" %}
```json
{
  "errors": [
    "Missing required field: service"
  ]
}
```
{% /tab %}
{% /tabs %}
{% /tab %}

{% tab label="413" %}
Payload Too Large - File size exceeds the 500 MB limit.

{% tabs %}
{% tab label="Model" %}
Error response for source map upload.

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

{% tab label="Example" %}
```json
{
  "errors": [
    "Missing required field: service"
  ]
}
```
{% /tab %}
{% /tabs %}
{% /tab %}

{% tab label="429" %}
Too Many Requests - Rate limit exceeded.

{% tabs %}
{% tab label="Model" %}
Error response for source map upload.

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

{% tab label="Example" %}
```json
{
  "errors": [
    "Missing required field: service"
  ]
}
```
{% /tab %}
{% /tabs %}
{% /tab %}

{% tab label="503" %}
Service Unavailable - The service is temporarily unavailable.

{% tabs %}
{% tab label="Model" %}
Error response for source map upload.

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

{% tab label="Example" %}
```json
{
  "errors": [
    "Missing required field: service"
  ]
}
```
{% /tab %}
{% /tabs %}
{% /tab %}
{% /tabs %}

### Code Example

{% tabs %}
{% tab label="Curl" %}
```bash
# 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, ddog-gov.com
export DD_API_KEY="<DD_API_KEY>"

curl -X POST "https://sourcemap-intake.${DD_SITE}/api/v2/srcmap" \
-H "Accept: application/json" \
-H "Content-Type: multipart/form-data" \
-H "DD-API-KEY: ${DD_API_KEY}"
```
{% /tab %}
{% /tabs %}
