From ac8686b0d5ff1e6322d6d103d3c1409a5ac9c6cd Mon Sep 17 00:00:00 2001 From: AntonEliatra Date: Mon, 27 May 2024 13:36:32 +0100 Subject: [PATCH 1/2] adding details to rest API calls for role updates #7234 Signed-off-by: AntonEliatra --- _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..d282371ea1 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 new permission to the end of the array of permissions. +{: .note} + #### Example response ```json From a35726ad41e5de1342038be3f8f36338620bd774 Mon Sep 17 00:00:00 2001 From: Naarcha-AWS <97990722+Naarcha-AWS@users.noreply.github.com> Date: Thu, 30 May 2024 12:55:12 -0500 Subject: [PATCH 2/2] Update _security/access-control/api.md Signed-off-by: Naarcha-AWS <97990722+Naarcha-AWS@users.noreply.github.com> --- _security/access-control/api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_security/access-control/api.md b/_security/access-control/api.md index d282371ea1..9473c16c20 100644 --- a/_security/access-control/api.md +++ b/_security/access-control/api.md @@ -830,7 +830,7 @@ PATCH _plugins/_security/api/roles ``` {% include copy-curl.html %} -You can use `-` to insert new permission to the end of the array of permissions. +You can use `-` to insert a new permission to the end of the array of permissions. {: .note} #### Example response