[8.1] [docs] Fix wrong example and highlight Kibana API (#124347) (#147870)

# Backport

This will backport the following commits from `main` to `8.1`:
- [[docs] Fix wrong example and highlight Kibana API
(#124347)](https://github.com/elastic/kibana/pull/124347)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Toby
Sutor","email":"55087308+toby-sutor@users.noreply.github.com"},"sourceCommit":{"committedDate":"2022-12-20T15:42:15Z","message":"[docs]
Fix wrong example and highlight Kibana API (#124347)\n\nThe current
example contains invalid characters and does not work. Furthermore does
it incorrectly point towards the Elasticsearch API instead of the Kibana
API. Both is addressed in this change.\r\n\r\nCo-authored-by: Kibana
Machine
<42973632+kibanamachine@users.noreply.github.com>","sha":"53e42eb6339aace91c5111bdb910dec8f9dacf5e","branchLabelMapping":{"^v8.7.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Docs","v8.0.0","release_note:skip","docs","v7.14.0","auto-backport","v7.15.0","v7.16.0","v8.1.0","v7.17.0","v8.2.0"],"number":124347,"url":"https://github.com/elastic/kibana/pull/124347","mergeCommit":{"message":"[docs]
Fix wrong example and highlight Kibana API (#124347)\n\nThe current
example contains invalid characters and does not work. Furthermore does
it incorrectly point towards the Elasticsearch API instead of the Kibana
API. Both is addressed in this change.\r\n\r\nCo-authored-by: Kibana
Machine
<42973632+kibanamachine@users.noreply.github.com>","sha":"53e42eb6339aace91c5111bdb910dec8f9dacf5e"}},"sourceBranch":"main","suggestedTargetBranches":["8.0","7.14","7.15","7.16","8.1","7.17","8.2"],"targetPullRequestStates":[{"branch":"8.0","label":"v8.0.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"7.14","label":"v7.14.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"7.15","label":"v7.15.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"7.16","label":"v7.16.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.1","label":"v8.1.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"7.17","label":"v7.17.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.2","label":"v8.2.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Toby Sutor <55087308+toby-sutor@users.noreply.github.com>
This commit is contained in:
Kibana Machine 2022-12-20 10:59:47 -05:00 committed by GitHub
parent bb9d23d92b
commit ae4312c2ca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -111,41 +111,27 @@ Granting the privilege to generate reports also grants the user the privilege to
==== Grant access with the role API
With <<grant-user-access, {kib} application privileges>> enabled in Reporting, you can also use the {ref}/security-api-put-role.html[role API] to grant access to the {report-features}, using *All* privileges, or sub-feature privileges.
NOTE: If you have a Basic license, sub-feature privileges are unavailable. For details, check out the API command to grant *All* privileges in <<grant-user-access-basic>>.
Grant users custom Reporting roles, other roles that grant read access to the data in {es}, and at least read access in the applications where users can generate reports.
[source, json]
NOTE: this [API request](https://www.elastic.co/guide/en/kibana/current/role-management-api-put.html) needs to be executed against the Kibana API endpoint
[source, sh]
---------------------------------------------------------------
PUT localhost:5601/api/security/role/custom_reporting_user
POST <kibana host>:<port>/api/_security/role/custom_reporting_user
{
"elasticsearch": { "cluster": [], "indices": [], "run_as": [] },
"kibana": [
{
"base": [],
"feature": {
"dashboard": [
"minimal_read",
"generate_report", <1>
"download_csv_report" <2>
],
"discover": [
"minimal_read",
"generate_report" <3>
],
"canvas": [
"minimal_read",
"generate_report" <4>
],
"visualize": [
"minimal_read",
"generate_report" <5>
]
},
"spaces": [ "*" ]
}
],
"metadata": {} // optional
"elasticsearch": {
"cluster": [],
"indices": [],
"run_as": []
},
"kibana": [{
"spaces": ["*"],
"base": [],
"feature": {
"dashboard": ["generate_report", <1>
"download_csv_report"], <2>
"discover": ["generate_report"], <3>
"canvas": ["generate_report"], <4>
"visualize": ["generate_report"] <5>
}
}]
}
---------------------------------------------------------------
// CONSOLE