---
type: api
title: Disable legacy URL aliases
description: Disable one or more legacy URL aliases so that they no longer resolve to their target saved objects.
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/v9/operation/operation-post-spaces-disable-legacy-url-aliases
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/v9/operation/operation-post-spaces-disable-legacy-url-aliases
products:
  - Kibana
---

# Disable legacy URL aliases

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

## Paths

- `POST` `/api/spaces/_disable_legacy_url_aliases`

- [Api key auth](/elastic/docs-builder/docs/4371/api/doc/kibana/v9/authentication#apikeyauth)
- [Basic auth](/elastic/docs-builder/docs/4371/api/doc/kibana/v9/authentication#basicauth)

## Description

Disable one or more legacy URL aliases so that they no longer resolve to their target saved objects.

## Request Body

`application/json`

- `aliases` ([] object · max: 1000) — required
  - `sourceId` (string) — required
    The alias source object identifier. This is the legacy object identifier.
  - `targetSpace` (string) — required
    The space where the alias target object exists.
  - `targetType` (string) — required
    The type of alias target object.

## Response

Indicates a successful call.

## Code Examples

#### Console

```console
POST /api/spaces/_disable_legacy_url_aliases
{
  "aliases": [
    {
      "targetSpace": "bills-space",
      "targetType": "dashboard",
      "sourceId": 123
    }
  ]
}
```

#### curl

```curl
curl -X POST "https://{kibana_url}/api/spaces/_disable_legacy_url_aliases" \
  -H "kbn-xsrf: true" \
  -H "Content-Type: application/json" \
  -d '{
  "aliases": [
    {
      "targetSpace": "bills-space",
      "targetType": "dashboard",
      "sourceId": 123
    }
  ]
}'
```

