Get Policies for a Collection
GET/api/v34.00/collections/:id/usages
x-prisma-cloud-target-env: {"permission":"collections"}
Retrieves all policies that uses a specified collection.
To invoke this endpoint in the Console UI:
- Navigate to Manage > Collections and Tags > Collections.
- Click the dotted icon under the Actions column to open up the menu options. Note: The default collections do not have a dotted icon in the Actions column. Use the Manage cog icon to open the update window.
- Click the Manage button.
- The Usages table displays the collection's usages.
cURL Request
Refer to the following example cURL command that retrieves all policies with name my-collection
:
$ curl -k \
-u <USER> \
-H 'Content-Type: application/json' \
-X GET \
'https://<CONSOLE>/api/v<VERSION>/collections/my-collection/usages'
Request
Path Parameters
id stringrequired
Responses
- 200
- default
- application/json
- Schema
- Example (auto)
Schema
- Array [
- ]
namestring
Name of the consumer (e.g., container runtime, username, etc.).
typecollection.UsageType (string)
UsageType represents a collection usage type
Possible values: [policy,settings,user,group,registryScan
]
[
{
"name": "string",
"type": [
"policy",
"settings",
"user",
"group",
"registryScan"
]
}
]
- curl
- python
- go
- nodejs
- csharp
- php
- CURL
curl -L 'https://pan.dev/api/v34.00/collections/:id/usages' \
-H 'Accept: application/json'