Collections
Collections are predefined filters that let you group related resources together. Resources include things like containers, images, hosts, functions, and clusters.
Use collections to scope policy rules and segment data/views in the Console UI and the Prisma Cloud API.
Endpoints with a {id}
URL Parameter
Some /collections
endpoints take a URL parameter called {id}
.
The value for {id}
should be a collection name.
You can retrieve collection names from the GET /api/v1/collections
endpoint.
Each collection object in the response has a key called name
, which can be used for {id}
.
Note: Spaces are considered unsafe characters in a URL.
If your collection name has a space, encode the space with the value %20
before passing it as a URL parameter.
📄️ Get Collections
Retrieves a list of all collections.
📄️ Add a New Collection
Creates a new collection. Only the `name` field is required; the other fields are optional. The `name` field can contain the characters: 'A-Z', 'a-z', '0-9', '_', '-', and ':'. Optional fields for which you do not specify a value are set to the '*' wildcard.
📄️ Delete an Existing Collection
Deletes a collection.
📄️ Update an Existing Collection
Updates the parameters for a specific collection.
📄️ Get Policies for a Collection
Retrieves all policies that uses a specified collection.