Skip to content

Commit

Permalink
adding details to rest API calls for role updates #7234 (#7254)
Browse files Browse the repository at this point in the history
* adding details to rest API calls for role updates #7234

Signed-off-by: AntonEliatra <[email protected]>

* Update _security/access-control/api.md

Signed-off-by: Naarcha-AWS <[email protected]>

---------

Signed-off-by: AntonEliatra <[email protected]>
Signed-off-by: Naarcha-AWS <[email protected]>
Co-authored-by: Naarcha-AWS <[email protected]>
(cherry picked from commit e20114b)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] and Naarcha-AWS committed Jun 3, 2024
1 parent 0ede1f8 commit 8817ed6
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions _security/access-control/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -815,18 +815,24 @@ Creates, updates, or deletes multiple roles in a single call.
PATCH _plugins/_security/api/roles
[
{
"op": "replace", "path": "/role1/index_permissions/0/fls", "value": ["test1", "test2"]
"op": "replace", "path": "/role1/index_permissions/0/fls", "value": ["myfield*", "~myfield1"]
},
{
"op": "remove", "path": "/role1/index_permissions/0/dls"
},
{
"op": "add", "path": "/role2/cluster_permissions", "value": ["manage_snapshots"]
"op": "add", "path": "/role2/cluster_permissions/-", "value": {
"index_patterns": ["test_index"],
"allowed_actions": ["indices:data/read/scroll/clear"]
}
}
]
```
{% include copy-curl.html %}

You can use `-` to insert a new permission to the end of the array of permissions.
{: .note}

#### Example response

```json
Expand Down

0 comments on commit 8817ed6

Please sign in to comment.