From 8817ed6fdf39839ddf1910132b83cf5c1994d62b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 3 Jun 2024 15:08:04 +0000 Subject: [PATCH] adding details to rest API calls for role updates #7234 (#7254) * adding details to rest API calls for role updates #7234 Signed-off-by: AntonEliatra * Update _security/access-control/api.md Signed-off-by: Naarcha-AWS <97990722+Naarcha-AWS@users.noreply.github.com> --------- Signed-off-by: AntonEliatra Signed-off-by: Naarcha-AWS <97990722+Naarcha-AWS@users.noreply.github.com> Co-authored-by: Naarcha-AWS <97990722+Naarcha-AWS@users.noreply.github.com> (cherry picked from commit e20114bd499c93c7cf9429921ff0600a024be8eb) Signed-off-by: github-actions[bot] --- _security/access-control/api.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/_security/access-control/api.md b/_security/access-control/api.md index bea080a078..9473c16c20 100644 --- a/_security/access-control/api.md +++ b/_security/access-control/api.md @@ -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