[7.x] Feature Controls - Spaces API Docs (#34575) (#35224)

Backports the following commits to 7.x:
 - Feature Controls - Spaces API Docs  (#34575)
This commit is contained in:
Larry Gregory 2019-04-17 10:08:59 -04:00 committed by GitHub
parent 404c2c2fb8
commit 737a9be7a3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 248 additions and 4 deletions

View file

@ -28,6 +28,7 @@ NOTE: You cannot access these APIs via the Console in Kibana.
[float]
== APIs
* <<features-api>>
* <<spaces-api>>
* <<role-management-api>>
* <<saved-objects-api>>
@ -37,6 +38,7 @@ NOTE: You cannot access these APIs via the Console in Kibana.
* <<upgrade-assistant-api>>
--
include::api/features.asciidoc[]
include::api/spaces-management.asciidoc[]
include::api/role-management.asciidoc[]
include::api/saved-objects.asciidoc[]

View file

@ -0,0 +1,13 @@
[role="xpack"]
[[features-api]]
== Features API
experimental[This API is *experimental* and may be changed or removed completely in a future release.]
The features API allows you to view information about available features in {kib}. Features are used by spaces and security to refine and secure access to {kib}.
NOTE: You cannot access these endpoints via the Console in {kib}.
* <<features-api-get>>
include::features/get.asciidoc[]

View file

@ -0,0 +1,219 @@
[[features-api-get]]
=== Get Features
experimental[This API is *experimental* and may be changed or removed completely in a future release.]
Retrieves all {kib} features.
Note: You cannot access this endpoint via the Console in {kib}.
==== Get all {kib} features
===== Request
To retrieve all features, issue a GET request to the
/api/features/v1 endpoint.
[source,js]
--------------------------------------------------
GET /api/features/v1
--------------------------------------------------
// KIBANA
===== Response
A successful call returns a response code of `200` and a response body containing a JSON
representation of the features.
[source,js]
--------------------------------------------------
{
"id": "discover",
"name": "Discover",
"icon": "discoverApp",
"navLinkId": "kibana:discover",
"app": [
"kibana"
],
"catalogue": [
"discover"
],
"privileges": {
"all": {
"savedObject": {
"all": [
"search",
"url"
],
"read": [
"config",
"index-pattern"
]
},
"ui": [
"show",
"createShortUrl",
"save"
]
},
"read": {
"savedObject": {
"all": [],
"read": [
"config",
"index-pattern",
"search",
"url"
]
},
"ui": [
"show"
]
}
}
},
{
"id": "visualize",
"name": "Visualize",
"icon": "visualizeApp",
"navLinkId": "kibana:visualize",
"app": [
"kibana"
],
"catalogue": [
"visualize"
],
"privileges": {
"all": {
"savedObject": {
"all": [
"visualization",
"url"
],
"read": [
"config",
"index-pattern",
"search"
]
},
"ui": [
"show",
"createShortUrl",
"delete",
"save"
]
},
"read": {
"savedObject": {
"all": [],
"read": [
"config",
"index-pattern",
"search",
"visualization"
]
},
"ui": [
"show"
]
}
}
},
{
"id": "dashboard",
"name": "Dashboard",
"icon": "dashboardApp",
"navLinkId": "kibana:dashboard",
"app": [
"kibana"
],
"catalogue": [
"dashboard"
],
"privileges": {
"all": {
"savedObject": {
"all": [
"dashboard",
"url"
],
"read": [
"config",
"index-pattern",
"search",
"visualization",
"timelion-sheet",
"canvas-workpad"
]
},
"ui": [
"createNew",
"show",
"showWriteControls"
]
},
"read": {
"savedObject": {
"all": [],
"read": [
"config",
"index-pattern",
"search",
"visualization",
"timelion-sheet",
"canvas-workpad",
"dashboard"
]
},
"ui": [
"show"
]
}
}
},
{
"id": "dev_tools",
"name": "Dev Tools",
"icon": "devToolsApp",
"navLinkId": "kibana:dev_tools",
"app": [
"kibana"
],
"catalogue": [
"console",
"searchprofiler",
"grokdebugger"
],
"privileges": {
"all": {
"api": [
"console"
],
"savedObject": {
"all": [],
"read": [
"config"
]
},
"ui": [
"show"
]
},
"read": {
"api": [
"console"
],
"savedObject": {
"all": [],
"read": [
"config"
]
},
"ui": [
"show"
]
}
},
"privilegesTooltip": "User should also be granted the appropriate Elasticsearch cluster and index privileges"
},
--------------------------------------------------

View file

@ -32,6 +32,7 @@ representation of the spaces.
"id": "default",
"name": "Default",
"description" : "This is the Default Space",
"disabledFeatures": [],
"_reserved": true
},
{
@ -39,12 +40,14 @@ representation of the spaces.
"name": "Marketing",
"description" : "This is the Marketing Space",
"color": "#aabbcc",
"disabledFeatures": ["apm"],
"initials": "MK"
},
{
"id": "sales",
"name": "Sales",
"initials": "MK"
"initials": "MK",
"disabledFeatures": ["discover", "timelion"],
},
]
--------------------------------------------------
@ -74,6 +77,7 @@ representation of the space.
"name": "Marketing",
"description" : "This is the Marketing Space",
"color": "#aabbcc",
"initials": "MK"
"initials": "MK",
"disabledFeatures": []
}
--------------------------------------------------

View file

@ -27,6 +27,8 @@ The following parameters can be specified in the body of a POST request to creat
`description`:: (string) Optional description for the space.
`disabledFeatures`:: (string array) Optional list of features that are disabled for the space. Use the <<features-api-get, Features API>> to get a list of available features IDs.
`initials`:: (string) Optionally specify the initials shown in the Space Avatar for this space. By default, the initials will be automatically generated from the space name.
If specified, initials should be either 1 or 2 characters.
@ -42,7 +44,8 @@ POST /api/spaces/space
"name": "Marketing",
"description" : "This is the Marketing Space",
"color": "#aabbcc",
"initials": "MK"
"initials": "MK",
"disabledFeatures": ["timelion"]
}
--------------------------------------------------
// KIBANA

View file

@ -27,6 +27,8 @@ The following parameters can be specified in the body of a PUT request to update
`description`:: (string) Optional description for the space.
`disabledFeatures`:: (string array) Optional list of features that are disabled for the space. Use the <<features-api-get, Features API>> to get a list of available features IDs.
`initials`:: (string) Optionally specify the initials shown in the Space Avatar for this space. By default, the initials will be automatically generated from the space name.
If specified, initials should be either 1 or 2 characters.
@ -42,7 +44,8 @@ PUT /api/spaces/space/marketing
"name": "Marketing",
"description" : "This is the Marketing Space",
"color": "#aabbcc",
"initials": "MK"
"initials": "MK",
"disabledFeatures": []
}
--------------------------------------------------
// KIBANA