POST /api/spaces/_disable_legacy_url_aliases

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

Headers

  • kbn-xsrf string Required

    A required header to protect against CSRF attacks

application/json

Body

  • aliases array[object] Required

    Not more than 1000 elements.

    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.

Responses

  • 204

    Indicates a successful call.

POST /api/spaces/_disable_legacy_url_aliases
curl \
 --request POST 'https://localhost:5601/api/spaces/_disable_legacy_url_aliases' \
 --header "Authorization: $API_KEY" \
 --header "Content-Type: application/json" \
 --header "kbn-xsrf: true" \
 --data '{"aliases":[{"targetSpace":"bills-space","targetType":"dashboard","sourceId":123}]}'
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": [
    {
      "targetSpace": "bills-space",
      "targetType": "dashboard",
      "sourceId": 123
    }
  ]
}