-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add docs. allwo to unset default pattern
- Loading branch information
Showing
14 changed files
with
176 additions
and
18 deletions.
There are no files selected for viewing
This file contains 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 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,55 @@ | ||
[[index-patterns-api-default-get]] | ||
=== Get default index pattern API | ||
++++ | ||
<titleabbrev>Get default index pattern</titleabbrev> | ||
++++ | ||
|
||
experimental[] Retrieve a default index pattern ID. Kibana UI uses default index pattern unless user picks a different one. | ||
|
||
[[index-patterns-api-default-get-request]] | ||
==== Request | ||
|
||
`GET <kibana host>:<port>/api/index_patterns/default` | ||
|
||
`GET <kibana host>:<port>/s/<space_id>/api/index_patterns/default` | ||
|
||
[[index-patterns-api-default-get-params]] | ||
==== Path parameters | ||
|
||
`space_id`:: | ||
(Optional, string) An identifier for the space. If `space_id` is not provided in the URL, the default space is used. | ||
|
||
[[index-patterns-api-default-get-codes]] | ||
==== Response code | ||
|
||
`200`:: | ||
Indicates a successful call. | ||
|
||
[[index-patterns-api-default-get-example]] | ||
==== Example | ||
|
||
Retrieve the default index pattern id: | ||
|
||
[source,sh] | ||
-------------------------------------------------- | ||
$ curl -X GET api/index_patterns/default | ||
-------------------------------------------------- | ||
// KIBANA | ||
|
||
The API returns an ID of a default index pattern: | ||
|
||
[source,sh] | ||
-------------------------------------------------- | ||
{ | ||
"index_pattern_id": "..." | ||
} | ||
-------------------------------------------------- | ||
|
||
In case there is no default index pattern, the API returns: | ||
|
||
[source,sh] | ||
-------------------------------------------------- | ||
{ | ||
"index_pattern_id": null | ||
} | ||
-------------------------------------------------- |
This file contains 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,84 @@ | ||
[[index-patterns-api-default-set]] | ||
=== Set default index pattern API | ||
++++ | ||
<titleabbrev>Set default index pattern</titleabbrev> | ||
++++ | ||
|
||
experimental[] Set a default index pattern ID. Kibana UI will use default index pattern unless user picks a different one. | ||
The API doesn't validate if given `index_pattern_id` is a valid id. | ||
|
||
[[index-patterns-api-default-set-request]] | ||
==== Request | ||
|
||
`POST <kibana host>:<port>/api/index_patterns/default` | ||
|
||
`POST <kibana host>:<port>/s/<space_id>/api/index_patterns/default` | ||
|
||
[[index-patterns-api-default-set-params]] | ||
==== Path parameters | ||
|
||
`space_id`:: | ||
(Optional, string) An identifier for the space. If `space_id` is not provided in the URL, the default space is used. | ||
|
||
[[index-patterns-api-default-set-body]] | ||
==== Request body | ||
|
||
`index_pattern_id`:: (Required, `string` or `null`) Sets a default index pattern id. Use `null` to unset a default index pattern. | ||
|
||
`force`:: (Optional, boolean) Updates existing default index pattern id. The default is `false`. | ||
|
||
|
||
[[index-patterns-api-default-set-codes]] | ||
==== Response code | ||
|
||
`200`:: | ||
Indicates a successful call. | ||
|
||
[[index-patterns-api-default-set-example]] | ||
==== Example | ||
|
||
Set the default index pattern id if none is set: | ||
|
||
[source,sh] | ||
-------------------------------------------------- | ||
$ curl -X POST api/index_patterns/default | ||
{ | ||
"index_pattern_id": "..." | ||
} | ||
-------------------------------------------------- | ||
// KIBANA | ||
|
||
|
||
Upsert the default index pattern: | ||
|
||
[source,sh] | ||
-------------------------------------------------- | ||
$ curl -X POST api/index_patterns/default | ||
{ | ||
"index_pattern_id": "...", | ||
"force": true | ||
} | ||
-------------------------------------------------- | ||
// KIBANA | ||
|
||
Unset the default index pattern: | ||
|
||
[source,sh] | ||
-------------------------------------------------- | ||
$ curl -X POST api/index_patterns/default | ||
{ | ||
"index_pattern_id": null, | ||
"force": true | ||
} | ||
-------------------------------------------------- | ||
// KIBANA | ||
|
||
The API returns: | ||
|
||
[source,sh] | ||
-------------------------------------------------- | ||
{ | ||
"acknowledged": true | ||
} | ||
-------------------------------------------------- | ||
|
This file contains 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 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 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 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 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 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 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 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 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 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 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