Skip to main content

Add a New Collection



x-prisma-cloud-target-env: {"permission":"collections","saas":true,"self-hosted":true}
x-public: true

Creates a new collection. You must specify a value for mandatory resources such as 'name', 'images', and 'labels' in the collection.

For 'name': Valid characters are 'A-Z', 'a-z', '0-9', '_', '-', and ':'. For 'image': If you don't have a specific value, you can initialize with a wildcard ''. For 'label': If you don't have a specific value, you can initialize with a wildcard ''.

Values for the mandatory resources are required for initialization. If you don't initialize mandatory resources and try to use the collection, you'll get an empty resource error.

To invoke this endpoint in the Console UI:

  1. Navigate to Manage > Collections and Tags > Collections.
  2. Add a collection using + Add collection.
  3. Click the Save button.

cURL Request

Refer to the following example cURL command that creates a new collection named my-collection, specifies a HEX color value of #AD3C21, and captures all container images named ubuntu:18.04:

$ curl 'https://<CONSOLE>:8083/api/v<VERSION>/collections' \
-k \
-u <USER> \
-H 'Content-Type: application/json' \
-d \

Note: No response is returned upon successful execution. You must verify the collection in the Console UI.



    accountIDs string[]

    List of account IDs.

    appIDs string[]

    List of application IDs.

    clusters string[]

    List of Kubernetes cluster names.

    codeRepos string[]

    List of code repositories.

    color common.Color

    Color is a hexadecimal representation of color code value

    containers string[]

    List of containers.

    description string

    Free-form text.

    functions string[]

    List of functions.

    hosts string[]

    List of hosts.

    images string[]

    List of images.

    labels string[]

    List of labels.

    modified date-time

    Datetime when the collection was last modified.

    name string

    Collection name. Must be unique.

    namespaces string[]

    List of Kubernetes namespaces.

    owner string

    User who created or last modified the collection.

    prisma boolean

    Indicates whether this collection originates from Prisma Cloud.

    system boolean

    Indicates whether this collection was created by the system (i.e., a non user) (true) or a real user (false).