Disable legacy URL aliases

POST /api/spaces/_disable_legacy_url_aliases

Headers

  • The version of the API to use

    Value is 2023-10-31. Default value is 2023-10-31.

  • kbn-xsrf string Required

    A required header to protect against CSRF attacks

application/json; Elastic-Api-Version=2023-10-31

Body

  • aliases array[object] Required
    Hide aliases attributes Show aliases attributes object
    • 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.

POST /api/spaces/_disable_legacy_url_aliases
curl \
 -X POST https://localhost:5601/api/spaces/_disable_legacy_url_aliases \
 -H "Content-Type: application/json; Elastic-Api-Version=2023-10-31" \
 -H "elastic-api-version: 2023-10-31" \
 -H "kbn-xsrf: true"
Request example
This request leaves the alias intact but the legacy URL for this alias (http://localhost:5601/s/bills-space/app/dashboards#/view/123) will no longer function. The dashboard still exists and you can access it with the new URL.
{
  "aliases": [
    {
      "sourceId": 123,
      "targetType": "dashboard",
      "targetSpace": "bills-space"
    }
  ]
}