---
type: api
title: Get source maps
description: **Spaces method and path for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/kibana/v8/operation/operation-getsourcemaps
resource: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/kibana/v8/operation/operation-getsourcemaps
products:
  - Kibana
---

# Get source maps

- Server: `https://{kibana_url}`

## Paths

- `GET` `/api/apm/sourcemaps`
- `GET` `/s/{space_id}/api/apm/sourcemaps`

## Description

Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.

Returns an array of Fleet artifacts, including source map uploads.

## Authentication

- Api key: `Authorization: <value>`
  These APIs use key-based authentication. You must create an API key and use the encoded value in the request header. For example: `Authorization: ApiKey base64AccessApiKey`
- Basic: `Authorization: Basic <credentials>`

## Query string parameters

- `page` (number) — optional
  Page number
- `perPage` (number) — optional
  Number of records per page

## Header parameters

- `elastic-api-version` (enum · default: 2023-10-31) — required
  The version of the API to use
  Values: `2023-10-31`

## Responses

#### `200`

Successful response

`application/json`

- `artifacts` (object[])
  Artifacts
  - `body` (object)
    - `bundleFilepath` (string)
    - `serviceName` (string)
    - `serviceVersion` (string)
    - `sourceMap` (object)
      - `file` (string)
      - `mappings` (string)
      - `sourceRoot` (string)
      - `sources` (string[])
      - `sourcesContent` (string[])
      - `version` (number)
  - `compressionAlgorithm` (string)
    Compression Algorithm
  - `created` (string)
    Created date
  - `decodedSha256` (string)
    Decoded SHA-256
  - `decodedSize` (number)
    Decoded size
  - `encodedSha256` (string)
    Encoded SHA-256
  - `encodedSize` (number)
    Encoded size
  - `encryptionAlgorithm` (string)
    Encryption Algorithm
  - `id` (string)
    Identifier
  - `identifier` (string)
    Identifier
  - `packageName` (string)
    Package name
  - `relative_url` (string)
    Relative URL
  - `type` (string)
    Type
#### `400`

Bad Request response

`application/json`

- `error` (string)
  Error type
- `message` (string)
  Error message
- `statusCode` (number)
  Error status code
#### `401`

Unauthorized response

`application/json`

- `error` (string)
  Error type
- `message` (string)
  Error message
- `statusCode` (number)
  Error status code
#### `500`

Internal Server Error response

`application/json`

- `error` (string)
  Error type
- `message` (string)
  Error message
- `statusCode` (number)
  Error status code
#### `501`

Not Implemented response

`application/json`

- `error` (string)
  Error type
- `message` (string)
  Error message
- `statusCode` (number)
  Error status code
## Code examples

#### Console

```console
GET kbn:/api/apm/sourcemaps
```

#### curl

```curl
curl -X GET "${KIBANA_URL}/api/apm/sourcemaps" \
  -H "elastic-api-version: 2023-10-31" \
  -H "Authorization: ApiKey ${API_KEY}"
```

