Skip to content

Commit

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

* adding details to rest API calls for role updates opensearch-project#7234

Signed-off-by: AntonEliatra <anton.rubin@eliatra.com>

* Update _security/access-control/api.md

Signed-off-by: Naarcha-AWS <97990722+Naarcha-AWS@users.noreply.github.com>

---------

Signed-off-by: AntonEliatra <anton.rubin@eliatra.com>
Signed-off-by: Naarcha-AWS <97990722+Naarcha-AWS@users.noreply.github.com>
Co-authored-by: Naarcha-AWS <97990722+Naarcha-AWS@users.noreply.github.com>
  • Loading branch information
AntonEliatra and Naarcha-AWS authored Jun 3, 2024
1 parent 7c4fe91 commit e20114b
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 e20114b

Please sign in to comment.