Skip to content
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,20 @@ include::snip-finding-bearer-token.adoc[]
. In a terminal, run the curl command and review the response:
+
--
.`GET` or `DELETE` request
.`GET` or `DELETE` request not requiring JSON body data
Comment thread
themr0c marked this conversation as resolved.
Outdated
[source,subs="+attributes,+quotes"]
----
$ curl -v \
-H "Authorization: Bearer _<token>_" \
-X __<method>__ "{my-product-url}/__<endpoint>__" \
----

.`POST` or `PUT` request requiring JSON body data
. `DELETE`, `POST` or `PUT` request requiring JSON body data
Comment thread
themr0c marked this conversation as resolved.
Outdated
[source,subs="+attributes,+quotes"]
----
$ curl -v -H "Content-Type: application/json" \
-H "Authorization: Bearer _<token>_" \
-X POST "{my-product-url}/__<endpoint>__" \
-X __<method>__ "{my-product-url}/__<endpoint>__" \
-d __<body>__
----

Expand All @@ -49,7 +49,7 @@ __<endpoint>__::
Enter the xref:ref-rbac-rest-api-endpoints_{context}[API endpoint] to which you want to send a request, such as `/api/permission/policies`.

__<body>__::
Enter the JSON body with data that your xref:ref-rbac-rest-api-endpoints_{context}[API endpoint] might need with the HTTP `POST` or `PUT` request.
Enter the JSON body with data that your xref:ref-rbac-rest-api-endpoints_{context}[API endpoint] requires with the HTTP `POST`, or `PUT` request, and might require with the HTTP `DELETE` request.

.Example request to create a role
[source,subs="+attributes,+quotes"]
Expand Down
19 changes: 19 additions & 0 deletions modules/authorization/ref-rbac-rest-api-endpoints.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,25 @@ Deletes all permission policies added to the specified entity.
|Required
|===

.Example request body (JSON)
[source,json]
----
[
{
"entityReference": "role:default/test",
"permission": "catalog-entity",
"policy": "delete",
"effect": "allow"
},
{
"entityReference": "role:default/test",
"permission": "catalog-entity",
"policy": "update",
"effect": "allow"
}
]
----

.Example response
[source]
----
Expand Down
Loading