-
Notifications
You must be signed in to change notification settings - Fork 8.6k
Add docs for legacy URL aliases #110279
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add docs for legacy URL aliases #110279
Changes from 3 commits
68787b6
a52d5f6
09d46ff
7f8a392
c1fea86
a2b9969
3586f3c
c88f041
2600785
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| [[spaces-api-disable-legacy-url-aliases]] | ||
| === Disable legacy URL aliases API | ||
| ++++ | ||
| <titleabbrev>Disable legacy URL aliases</titleabbrev> | ||
| ++++ | ||
|
|
||
| experimental[] Disable a <<legacy-url-aliases,legacy URL alias>> in {kib}. | ||
|
|
||
| [[spaces-api-disable-legacy-url-aliases-request]] | ||
| ==== Request | ||
|
|
||
| `POST <kibana host>:<port>/api/spaces/_disable_legacy_url_aliases` | ||
|
|
||
| [[spaces-api-disable-legacy-url-aliases-request-body]] | ||
| ==== Request body | ||
|
|
||
| `aliases`:: | ||
| (Required, object array) The aliases to disable. | ||
| + | ||
| .Properties of `aliases` | ||
| [%collapsible%open] | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How about formatting with a box as in this doc .
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure what is making that one show in boxes but this one isn't. Perhaps the sub-properties end in
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wouldn't spend too much time on this. The formatting also works find as it is.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I tried one more thing and it's fixed now 😄 |
||
| ===== | ||
| `targetSpace`:: | ||
| (Required, string) The space where the alias target object exists. | ||
|
|
||
| `targetType`:: | ||
| (Required, string) The type of the alias target object. | ||
|
|
||
| `sourceId`:: | ||
| (Required, string) The ID of the alias source object. This is the "legacy" object ID. | ||
| ===== | ||
|
|
||
| [[spaces-api-disable-legacy-url-aliases-response-codes]] | ||
| ==== Response codes | ||
|
|
||
| `204`:: | ||
| Indicates a successful call. | ||
|
|
||
| [[spaces-api-disable-legacy-url-aliases-example]] | ||
| ==== Example | ||
|
|
||
| [source,sh] | ||
| -------------------------------------------------- | ||
| $ curl -X POST api/spaces/_disable_legacy_url_aliases | ||
| { | ||
| "aliases": [ | ||
| { | ||
| "targetSpace": "bills-space", | ||
| "targetType": "dashboard", | ||
| "sourceId": "123" | ||
| } | ||
| ] | ||
| } | ||
| -------------------------------------------------- | ||
| // KIBANA | ||
|
|
||
| This will leave the alias intact, but the legacy URL for this alias will no longer function. In this example, you had a legacy URL for | ||
|
jportner marked this conversation as resolved.
Outdated
|
||
| `http://localhost:5601/s/bills-space/app/dashboards#/view/123`. That URL would no longer work after making this API call, but the dashboard | ||
| itself still exists and can be accessed by its new URL. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| [[legacy-url-aliases]] | ||
| == Legacy URL Aliases | ||
|
|
||
| This page describes legacy URL aliases: what they are, where they come from, and how to disable them. | ||
|
|
||
| [[legacy-url-aliases-overview]] | ||
| === Overview | ||
|
|
||
| Many saved object types are being converted in the 8.0 release of {kib} so they can eventually be shared across <<xpack-spaces,spaces>>. | ||
| Before 8.0, you could have two objects with the same type and same ID in two different spaces. Part of this conversion is to make sure all | ||
| object IDs of a given type are *globally unique across all spaces*. | ||
|
jportner marked this conversation as resolved.
Outdated
|
||
|
|
||
| When a saved object is converted, if its ID is changed, {kib} creates a special entity called a _legacy URL alias_. This allows us to | ||
| preserve any deep link URLs that may exist for that object. | ||
|
jportner marked this conversation as resolved.
Outdated
|
||
|
|
||
| [[legacy-url-aliases-example]] | ||
| === Example | ||
|
|
||
| For example, consider the following scenario: | ||
|
jportner marked this conversation as resolved.
Outdated
|
||
|
|
||
| You have {kib} 7.16 installed and you created a new dashboard. This dashboard's ID is "123". Then, you create a new space called "Bill's space", and copy your dashboard to the other space. Now you have two different dashboards that can be accessed at the following URLs: | ||
|
jportner marked this conversation as resolved.
Outdated
|
||
|
|
||
| * *Default space*: `http://localhost:5601/app/dashboards#/view/123` | ||
| * *Bill's space*: `http://localhost:5601/s/bills-space/app/dashboards#/view/123` | ||
|
|
||
| You use these two dashboards frequently, so you use your web browser to add bookmarks for them. After some time, you decide upgrade to {kib} | ||
|
jportner marked this conversation as resolved.
Outdated
|
||
| 8.0. When these two dashboards go through the conversion process, the one in "Bill's space" will have its ID changed to "456". Now, the URL | ||
|
jportner marked this conversation as resolved.
Outdated
|
||
| to access that dashboard is different -- not to worry though, there is a legacy URL alias for that dashboard! | ||
|
jportner marked this conversation as resolved.
Outdated
|
||
|
|
||
| If you use your bookmark to access that dashboard using its old URL, {kib} detects that you are using a legacy URL and it finds the new | ||
|
jportner marked this conversation as resolved.
Outdated
|
||
| object ID. This means if you navigate to `http://localhost:5601/s/bills-space/app/dashboards#/view/123`, you'll see a helpful toast message | ||
|
jportner marked this conversation as resolved.
Outdated
|
||
| indicating that the dashboard has a new URL, and you'll automatically get redirected to | ||
| `http://localhost:5601/s/bills-space/app/dashboards#/view/456`. | ||
|
|
||
| [[legacy-url-aliases-handling-errors]] | ||
| === Handling errors | ||
|
|
||
| Legacy URL aliases are intended to be fully transparent, but there are some very rare situations where this can lead to an error. For | ||
|
jportner marked this conversation as resolved.
Outdated
|
||
| example, you may have a dashboard and one of the visualizations may fail to load, directing you to this page. If you encounter an error | ||
|
jportner marked this conversation as resolved.
Outdated
|
||
| in this situation, you might want to disable the legacy URL alias completely. This leaves the saved object intact and you will not lose any | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This explains the symptom of the error, but not what caused the error. Do you think it would be helpful to give an example of that causes these types of errors, or would that be TMI?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm afraid that an example of the causes would be a bit too much. You can't get into that situation through "normal" usage of Kibana (simply by virtue of upgrading to 8.0, or by sharing objects, or by importing objects) -- we believe the only way to get into this situation is by using third-party integrations. I did toy with the idea of showing a screenshot of an error that you might see as an example, but that's not been implemented yet. Also interested to hear what the Docs team thinks about this.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think the text is good as it is, especially since the only way to get into the situation is by using third-party integrations. I don't feel a screenshot is necessary.
jportner marked this conversation as resolved.
Outdated
|
||
| data by disabling the alias -- you just won't be able to use the old URL to access that saved object anymore. | ||
|
jportner marked this conversation as resolved.
Outdated
|
||
|
|
||
| To disable a legacy URL alias, you'll need three pieces of information about it: the `targetSpace`, the `targetType`, and the `sourceId`. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It might be good to describe exactly what these terms are. They'll likely be foreign concepts to the users who end up on this page.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, I was a bit torn on that. I do explain them on the linked API page, I thought it may be best if we don't state the same thing on two different pages. I'm interested to see what the Docs team thinks.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @gchaps based on your comments below, it sounds like you think this is clear enough with your suggested changes?
jportner marked this conversation as resolved.
Outdated
|
||
| Once you have this information, you can use the <<spaces-api-disable-legacy-url-aliases,`_disable_legacy_url_aliases`>> API to disable the | ||
|
jportner marked this conversation as resolved.
Outdated
|
||
| problematic legacy URL alias. | ||
Uh oh!
There was an error while loading. Please reload this page.