Skip to content

Commit

Permalink
Merge branch '7.x' into ua/fix_terms_used_in_systemindices_migration_api
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored Oct 13, 2021
2 parents 6905991 + dd0e05e commit 0c84b19
Show file tree
Hide file tree
Showing 328 changed files with 5,706 additions and 26,808 deletions.
7 changes: 6 additions & 1 deletion .buildkite/scripts/common/env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,12 @@ export ELASTIC_APM_ENVIRONMENT=ci
export ELASTIC_APM_TRANSACTION_SAMPLE_RATE=0.1

if is_pr; then
export ELASTIC_APM_ACTIVE=false
if [[ "${GITHUB_PR_LABELS:-}" == *"ci:collect-apm"* ]]; then
export ELASTIC_APM_ACTIVE=true
else
export ELASTIC_APM_ACTIVE=false
fi

export CHECKS_REPORTER_ACTIVE=true

# These can be removed once we're not supporting Jenkins and Buildkite at the same time
Expand Down
11 changes: 6 additions & 5 deletions .buildkite/scripts/lifecycle/pre_command.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,17 @@ set -euo pipefail

source .buildkite/scripts/common/util.sh

node .buildkite/scripts/lifecycle/print_agent_links.js || true

echo '--- Job Environment Setup'
BUILDKITE_TOKEN="$(retry 5 5 vault read -field=buildkite_token_all_jobs secret/kibana-issues/dev/buildkite-ci)"
export BUILDKITE_TOKEN

echo '--- Install buildkite dependencies'
cd '.buildkite'
retry 5 15 yarn install
cd -

BUILDKITE_TOKEN="$(retry 5 5 vault read -field=buildkite_token_all_jobs secret/kibana-issues/dev/buildkite-ci)"
export BUILDKITE_TOKEN
node .buildkite/scripts/lifecycle/print_agent_links.js || true

echo '--- Job Environment Setup'

# Set up a custom ES Snapshot Manifest if one has been specified for this build
{
Expand Down
4 changes: 2 additions & 2 deletions api_docs/charts.json
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@
", xAccessor: string | number | ",
"AccessorFn",
") => ({ x: selectedRange }: ",
"XYBrushArea",
"XYBrushEvent",
") => ",
{
"pluginId": "charts",
Expand Down Expand Up @@ -4266,4 +4266,4 @@
}
]
}
}
}
9 changes: 9 additions & 0 deletions docs/api/short-urls.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[[short-urls-api]]
== Short URLs APIs

Manage {kib} short URLs.

include::short-urls/create-short-url.asciidoc[]
include::short-urls/get-short-url.asciidoc[]
include::short-urls/delete-short-url.asciidoc[]
include::short-urls/resolve-short-url.asciidoc[]
86 changes: 86 additions & 0 deletions docs/api/short-urls/create-short-url.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
[[short-urls-api-create]]
=== Create short URL API
++++
<titleabbrev>Create short URL</titleabbrev>
++++

experimental[] Create a {kib} short URL. {kib} URLs may be long and cumbersome, short URLs are much
easier to remember and share.

Short URLs are created by specifying the locator ID and locator parameters. When a short URL is
resolved, the locator ID and locator parameters are used to redirect user to the right {kib} page.


[[short-urls-api-create-request]]
==== Request

`POST <kibana host>:<port>/api/short_url`


[[short-urls-api-create-request-body]]
==== Request body

`locatorId`::
(Required, string) ID of the locator.

`params`::
(Required, object) Object which contains all necessary parameters for the given locator to resolve
to a {kib} location.
+
WARNING: When you create a short URL, locator params are not validated, which allows you to pass
arbitrary and ill-formed data into the API that can break {kib}. Make sure
any data that you send to the API is properly formed.

`slug`::
(Optional, string) A custom short URL slug. Slug is the part of the short URL that identifies it.
You can provide a custom slug which consists of latin alphabet letters, numbers and `-._`
characters. The slug must be at least 3 characters long, but no longer than 255 characters.

`humanReadableSlug`::
(Optional, boolean) When the `slug` parameter is omitted, the API will generate a random
human-readable slug, if `humanReadableSlug` is set to `true`.


[[short-urls-api-create-response-codes]]
==== Response code

`200`::
Indicates a successful call.


[[short-urls-api-create-example]]
==== Example

[source,sh]
--------------------------------------------------
$ curl -X POST api/short_url -H 'kbn-xsrf: true' -H 'Content-Type: application/json' -d '
{
"locatorId": "LOCATOR_ID",
"params": {},
"humanReadableSlug": true
}'
--------------------------------------------------
// KIBANA

The API returns the following:

[source,sh]
--------------------------------------------------
{
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", <1>
"slug": "adjective-adjective-noun", <2>
"locator": {
"id": "LOCATOR_ID",
"version": "x.x.x", <3>
"state": {} <4>
},
"accessCount": 0,
"accessDate": 1632680100000,
"createDate": 1632680100000
}
--------------------------------------------------

<1> A random ID is automatically generated.
<2> A random human-readable slug is automatically generated if the `humanReadableSlug` parameter is set to `true`. If set to `false` a random short string is generated.
<3> The version of {kib} when short URL was created is stored.
<4> Locator params provided as `params` property are stored.
39 changes: 39 additions & 0 deletions docs/api/short-urls/delete-short-url.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
[[short-urls-api-delete]]
=== Delete short URL API
++++
<titleabbrev>Delete short URL</titleabbrev>
++++

experimental[] Delete a {kib} short URL.


[[short-urls-api-delete-request]]
==== Request

`DELETE <kibana host>:<port>/api/short_url/<id>`


[[short-urls-api-delete-path-params]]
==== Path parameters

`id`::
(Required, string) The short URL ID that you want to remove.


[[short-urls-api-delete-response-codes]]
==== Response code

`200`::
Indicates a successful call.


[[short-urls-api-delete-example]]
==== Example

Delete a short URL `12345` ID:

[source,sh]
--------------------------------------------------
$ curl -X DELETE api/short_url/12345
--------------------------------------------------
// KIBANA
56 changes: 56 additions & 0 deletions docs/api/short-urls/get-short-url.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
[[short-urls-api-get]]
=== Get short URL API
++++
<titleabbrev>Get short URL</titleabbrev>
++++

experimental[] Retrieve a single {kib} short URL.

[[short-urls-api-get-request]]
==== Request

`GET <kibana host>:<port>/api/short_url/<id>`


[[short-urls-api-get-params]]
==== Path parameters

`id`::
(Required, string) The ID of the short URL.


[[short-urls-api-get-codes]]
==== Response code

`200`::
Indicates a successful call.


[[short-urls-api-get-example]]
==== Example

Retrieve the short URL with the `12345` ID:

[source,sh]
--------------------------------------------------
$ curl -X GET api/short_url/12345
--------------------------------------------------
// KIBANA

The API returns the following:

[source,sh]
--------------------------------------------------
{
"id": "12345",
"slug": "adjective-adjective-noun",
"locator": {
"id": "LOCATOR_ID",
"version": "x.x.x",
"state": {}
},
"accessCount": 0,
"accessDate": 1632680100000,
"createDate": 1632680100000
}
--------------------------------------------------
56 changes: 56 additions & 0 deletions docs/api/short-urls/resolve-short-url.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
[[short-urls-api-resolve]]
=== Resolve short URL API
++++
<titleabbrev>Resolve short URL</titleabbrev>
++++

experimental[] Resolve a single {kib} short URL by its slug.

[[short-urls-api-resolve-request]]
==== Request

`GET <kibana host>:<port>/api/short_url/_slug/<slug>`


[[short-urls-api-resolve-params]]
==== Path parameters

`slug`::
(Required, string) The slug of the short URL.


[[short-urls-api-resolve-codes]]
==== Response code

`200`::
Indicates a successful call.


[[short-urls-api-resolve-example]]
==== Example

Retrieve the short URL with the `hello-world` ID:

[source,sh]
--------------------------------------------------
$ curl -X GET api/short_url/_slug/hello-world
--------------------------------------------------
// KIBANA

The API returns the following:

[source,sh]
--------------------------------------------------
{
"id": "12345",
"slug": "hello-world",
"locator": {
"id": "LOCATOR_ID",
"version": "x.x.x",
"state": {}
},
"accessCount": 0,
"accessDate": 1632680100000,
"createDate": 1632680100000
}
--------------------------------------------------
62 changes: 0 additions & 62 deletions docs/api/url-shortening.asciidoc

This file was deleted.

2 changes: 1 addition & 1 deletion docs/developer/plugin-list.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ The plugin exposes the static DefaultEditorController class to consume.
|{kib-repo}blob/{branch}/x-pack/plugins/apm/readme.md[apm]
|Local setup documentation
|undefined
|{kib-repo}blob/{branch}/x-pack/plugins/banners/README.md[banners]
Expand Down
1 change: 1 addition & 0 deletions docs/management/advanced-options.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,7 @@ because requests can be spread across all shard copies. However, results might
be inconsistent because different shards might be in different refresh states.

[[search-includefrozen]]`search:includeFrozen`::
**This setting is deprecated and will not be supported as of 9.0.**
Includes {ref}/frozen-indices.html[frozen indices] in results. Searching through
frozen indices might increase the search time. This setting is off by default.
Users must opt-in to include frozen indices.
Expand Down
Loading

0 comments on commit 0c84b19

Please sign in to comment.