Skip to content

Commit 8ac7ddd

Browse files
authored
Update modules/authorization/proc-sending-request-to-the-rbac-rest-api-by-using-curl.adoc
1 parent 3697e7b commit 8ac7ddd

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

modules/authorization/proc-sending-request-to-the-rbac-rest-api-by-using-curl.adoc

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,27 @@ curl -v -H "Content-Type: application/json" \
7575
}]'
7676
----
7777

78+
.Example request to update a permission policy
79+
[source,subs="+attributes,+quotes"]
80+
----
81+
curl -v -H "Content-Type: application/json" \
82+
-H "Authorization: Bearer $token" \
83+
-X PUT "{my-product-url}/api/permission/policies/role/default/test" \
84+
-d '{
85+
"oldPolicy": [
86+
{
87+
"permission": "catalog-entity", "policy": "read", "effect": "allow"
88+
}
89+
],
90+
"newPolicy":
91+
[
92+
{
93+
"permission": "policy-entity", "policy": "read", "effect": "allow"
94+
}
95+
]
96+
}'
97+
----
98+
7899
.Example request to create a condition
79100
[source,subs="+attributes,+quotes"]
80101
----

0 commit comments

Comments
 (0)