-
Notifications
You must be signed in to change notification settings - Fork 8.5k
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
Merged
jportner
merged 9 commits into
elastic:master
from
jportner:issue-110145-add-legacy-url-alias-conflict-docs
Aug 30, 2021
Merged
Add docs for legacy URL aliases #110279
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
68787b6
Add docs for legacy URL aliases
jportner a52d5f6
Fix Disable legacy URL aliases API docs
jportner 09d46ff
Include disable_legacy_url_aliases doc
jportner 7f8a392
Merge branch 'master' into issue-110145-add-legacy-url-alias-conflict…
jportner c1fea86
PR review feedback
jportner a2b9969
Merge branch 'master' into issue-110145-add-legacy-url-alias-conflict…
jportner 3586f3c
More PR review feedback
jportner c88f041
Reformat line breaks
jportner 2600785
More edits
jportner File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 59 additions & 0 deletions
59
docs/api/spaces-management/disable_legacy_url_aliases.asciidoc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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]] | ||
| ==== {api-request-title} | ||
|
|
||
| `POST <kibana host>:<port>/api/spaces/_disable_legacy_url_aliases` | ||
|
|
||
| [role="child_attributes"] | ||
| [[spaces-api-disable-legacy-url-aliases-request-body]] | ||
| ==== {api-request-body-title} | ||
|
|
||
| `aliases`:: | ||
| (Required, object array) The aliases to disable. | ||
| + | ||
| .Properties of `aliases` | ||
| [%collapsible%open] | ||
| ===== | ||
| `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]] | ||
| ==== {api-response-codes-title} | ||
|
|
||
| `204`:: | ||
| Indicates a successful call. | ||
|
|
||
| [[spaces-api-disable-legacy-url-aliases-example]] | ||
| ==== {api-examples-title} | ||
|
|
||
| [source,sh] | ||
| -------------------------------------------------- | ||
| $ curl -X POST api/spaces/_disable_legacy_url_aliases | ||
| { | ||
| "aliases": [ | ||
| { | ||
| "targetSpace": "bills-space", | ||
| "targetType": "dashboard", | ||
| "sourceId": "123" | ||
| } | ||
| ] | ||
| } | ||
| -------------------------------------------------- | ||
| // KIBANA | ||
|
|
||
| This example 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. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 were converted in {kib} 8.0, 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*. | ||
|
|
||
| {kib} creates a special entity called a **legacy URL alias** for each saved object that requires a new ID. This legacy URL alias allows | ||
| {kib} to preserve any deep link URLs that exist for these objects. | ||
|
|
||
| [[legacy-url-aliases-example]] | ||
| === Example | ||
|
|
||
| Consider the following scenario: | ||
|
|
||
| You have {kib} 7.16, and you create a new dashboard.The ID of this dashboard is "123". You create a new space called "Bill's space" and | ||
| <<managing-saved-objects-copy-to-space,copy>> your dashboard to the other space. Now you have two different dashboards that can be accessed | ||
| at the following URLs: | ||
|
|
||
| * *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 bookmark them in your web browser. After some time, you decide to upgrade to {kib} 8.0. When | ||
| these two dashboards go through the conversion process, the one in "Bill's space" will have its ID changed to "456". The URL to access that | ||
| dashboard is different -- not to worry though, there is a legacy URL alias for that dashboard. | ||
|
|
||
| If you use your bookmark to access that dashboard using its old URL, {kib} detects that you are using a legacy URL, and finds the new object | ||
| ID. If you navigate to `http://localhost:5601/s/bills-space/app/dashboards#/view/123`, you'll see a message indicating that the dashboard | ||
| has a new URL, and you're automatically 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 rare situations where this can lead to an error. For example, you | ||
| might have a dashboard and one of the visualizations fails to load, directing you to this page. If you encounter an error 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 data -- you just | ||
| won't be able to use the old URL to access that saved object. | ||
|
|
||
| To disable a legacy URL alias, you need three pieces of information: the `targetSpace`, the `targetType`, and the `sourceId`. Then use the | ||
| <<spaces-api-disable-legacy-url-aliases,`_disable_legacy_url_aliases`>> API to disable the problematic legacy URL alias. |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about formatting with a box as in this doc .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The 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
:::instead of::? It doesn't make a difference in my IDE previewer, but I'll make the change and see if it changes how it's rendered in the docs website.There was a problem hiding this comment.
Choose a reason for hiding this comment
The 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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried one more thing and it's fixed now 😄
Needed to add
[role="child_attributes"]before the section.