Palo Alto Networks Collections API

{'$ref': 'desc/collections/collections.md'}

OpenAPI Specification

palo-alto-networks-collections-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Palo Alto Networks Collections API
  version: '1.0'
  description: 'Operations tagged Collections across 5 of this provider''s published API definitions: palo-alto-compute-34-03-openapi-34-03-138-sh-openapi.json, palo-alto-compute-openapi-34-04-145-sh-openapi.json, palo-alto-cspm-collectionsmicroservice-openapi.json, palo-alto-cwpp-34-03-openapi-34-03-138-saas-openapi.json, palo-alto-cwpp-openapi-34-04-145-saas-openapi.json. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.prismacloud.io
- url: https://api2.prismacloud.io
- url: https://api3.prismacloud.io
- url: https://api4.prismacloud.io
- url: https://api.anz.prismacloud.io
- url: https://api.eu.prismacloud.io
- url: https://api2.eu.prismacloud.io
- url: https://api.gov.prismacloud.io
- url: https://api.prismacloud.cn
- url: https://api.ca.prismacloud.io
- url: https://api.sg.prismacloud.io
- url: https://api.uk.prismacloud.io
- url: https://api.ind.prismacloud.io
- url: https://api.jp.prismacloud.io
- url: https://api.fr.prismacloud.io
- url: PATH_TO_CONSOLE
tags:
- name: Collections
  description: Collections. 5 operations in this definition.
  x-description-source: desc/collections/collections.md
paths:
  /api/v34.03/collections:
    get:
      description: 'Get Collections. GET /api/v34.03/collections on the Collections API. Takes 3 query parameters. Documented responses: 200.'
      parameters:
      - description: 'ExcludePrisma indicates to exclude Prisma collections.

          '
        in: query
        name: excludePrisma
        schema:
          type: boolean
      - description: 'Prisma filters the collections originates from Prisma Cloud.

          '
        in: query
        name: prisma
        schema:
          type: boolean
      - description: 'System.

          '
        in: query
        name: system
        schema:
          type: boolean
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/-_collection.Collection'
          description: ''
        default:
          description: ''
      tags:
      - Collections
      x-prisma-cloud-target-env:
        permission: collections
      operationId: get-collections
      summary: Get Collections
      x-description-source: desc/collections/get.md
    post:
      description: 'Add a New Collection. POST /api/v34.03/collections on the Collections API. Takes an optional request body. Documented responses: 200.'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/collection.Collection'
      responses:
        '200':
          description: OK
        default:
          description: ''
      tags:
      - Collections
      x-prisma-cloud-target-env:
        permission: collections
      operationId: post-collections
      summary: Add a New Collection
      x-description-source: desc/collections/post.md
  /api/v34.03/collections/{id}:
    delete:
      description: 'Delete an Existing Collection. DELETE /api/v34.03/collections/{id} on the Collections API. Takes 1 path parameter. Documented responses: 200.'
      parameters:
      - in: path
        name: id
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
        default:
          description: ''
      tags:
      - Collections
      x-prisma-cloud-target-env:
        permission: collections
      operationId: delete-collections-id
      summary: Delete an Existing Collection
      x-description-source: desc/collections/name_delete.md
    put:
      description: 'Update an Existing Collection. PUT /api/v34.03/collections/{id} on the Collections API. Takes 1 path parameter, an optional request body. Documented responses: 200.'
      parameters:
      - in: path
        name: id
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/collection.Collection'
      responses:
        '200':
          description: OK
        default:
          description: ''
      tags:
      - Collections
      x-prisma-cloud-target-env:
        permission: collections
      operationId: put-collections-id
      summary: Update an Existing Collection
      x-description-source: desc/collections/name_put.md
  /api/v34.03/collections/{id}/usages:
    get:
      description: 'Get Policies for a Collection. GET /api/v34.03/collections/{id}/usages on the Collections API. Takes 1 path parameter. Documented responses: 200.'
      parameters:
      - in: path
        name: id
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/-_collection.Usage'
          description: ''
        default:
          description: ''
      tags:
      - Collections
      x-prisma-cloud-target-env:
        permission: collections
      operationId: get-collections-id-usages
      summary: Get Policies for a Collection
      x-description-source: desc/collections/name_usages_get.md
  /api/v34.04/collections:
    get:
      description: 'Get Collections. GET /api/v34.04/collections on the Collections API. Takes 3 query parameters. Documented responses: 200.'
      parameters:
      - description: 'ExcludePrisma indicates to exclude Prisma collections.

          '
        in: query
        name: excludePrisma
        schema:
          type: boolean
      - description: 'Prisma filters the collections originates from Prisma Cloud.

          '
        in: query
        name: prisma
        schema:
          type: boolean
      - description: 'System.

          '
        in: query
        name: system
        schema:
          type: boolean
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/-_collection.Collection'
          description: ''
        default:
          description: ''
      tags:
      - Collections
      x-prisma-cloud-target-env:
        permission: collections
      operationId: get-collections
      summary: Get Collections
      x-description-source: desc/collections/get.md
    post:
      description: 'Add a New Collection. POST /api/v34.04/collections on the Collections API. Takes an optional request body. Documented responses: 200.'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/collection.Collection'
      responses:
        '200':
          description: OK
        default:
          description: ''
      tags:
      - Collections
      x-prisma-cloud-target-env:
        permission: collections
      operationId: post-collections
      summary: Add a New Collection
      x-description-source: desc/collections/post.md
  /api/v34.04/collections/{id}:
    delete:
      description: 'Delete an Existing Collection. DELETE /api/v34.04/collections/{id} on the Collections API. Takes 1 path parameter. Documented responses: 200.'
      parameters:
      - in: path
        name: id
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
        default:
          description: ''
      tags:
      - Collections
      x-prisma-cloud-target-env:
        permission: collections
      operationId: delete-collections-id
      summary: Delete an Existing Collection
      x-description-source: desc/collections/name_delete.md
    put:
      description: 'Update an Existing Collection. PUT /api/v34.04/collections/{id} on the Collections API. Takes 1 path parameter, an optional request body. Documented responses: 200.'
      parameters:
      - in: path
        name: id
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/collection.Collection'
      responses:
        '200':
          description: OK
        default:
          description: ''
      tags:
      - Collections
      x-prisma-cloud-target-env:
        permission: collections
      operationId: put-collections-id
      summary: Update an Existing Collection
      x-description-source: desc/collections/name_put.md
  /api/v34.04/collections/{id}/usages:
    get:
      description: 'Get Policies for a Collection. GET /api/v34.04/collections/{id}/usages on the Collections API. Takes 1 path parameter. Documented responses: 200.'
      parameters:
      - in: path
        name: id
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/-_collection.Usage'
          description: ''
        default:
          description: ''
      tags:
      - Collections
      x-prisma-cloud-target-env:
        permission: collections
      operationId: get-collections-id-usages
      summary: Get Policies for a Collection
      x-description-source: desc/collections/name_usages_get.md
  /entitlement/api/v1/collection/{id}:
    get:
      tags:
      - Collections
      summary: Get Collection by ID
      description: "Returns all details of a Collection.\n:::info\nThis endpoint is available on the Prisma Cloud Darwin release only.\n:::\n\n#### Rate Limits ####\n* Request rate limit: 8/sec \n* Burst Rate: 8/sec \n "
      externalDocs:
        url: entitlement/api/v1/collection/#id
        x-ga: 'false'
      operationId: get-collection-by-id
      parameters:
      - name: id
        in: path
        description: Collection Id
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '403':
          description: Forbidden
          content:
            '*/*':
              schema:
                type: object
        '400':
          description: Bad Request
          content:
            '*/*':
              schema:
                type: object
        '200':
          description: Successful operation
          content:
            application/json; charset=UTF-8:
              schema:
                $ref: '#/components/schemas/Collection'
        4XX:
          description: Client error
          content:
            application/json; charset=UTF-8:
              schema:
                $ref: '#/components/schemas/SpringErrorResponse'
        '429':
          description: API is rate limited
          content:
            application/json; charset=UTF-8:
              schema:
                $ref: '#/components/schemas/SpringErrorResponse'
      security:
      - x-redlock-auth: []
      x-ga: 23.10.2-darwin
      x-public: 'true'
    put:
      tags:
      - Collections
      summary: Update Collection
      description: 'Update Collection or Asset Groups details.

        :::info

        This endpoint is available on the Prisma Cloud Darwin release only.

        :::

        '
      externalDocs:
        url: entitlement/api/v1/collection/#id
        x-ga: 'false'
      operationId: update-collection-by-id
      parameters:
      - name: id
        in: path
        description: Collection Id
        required: true
        schema:
          type: string
      requestBody:
        description: Collections Data Model
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Collection'
        required: true
      responses:
        '403':
          description: Forbidden
          content:
            '*/*':
              schema:
                type: object
        '400':
          description: Bad Request
          content:
            '*/*':
              schema:
                type: object
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Collection'
        4XX:
          description: Client error
          content:
            application/json; charset=UTF-8:
              schema:
                $ref: '#/components/schemas/SpringErrorResponse'
        '429':
          description: API is rate limited
          content:
            application/json; charset=UTF-8:
              schema:
                $ref: '#/components/schemas/SpringErrorResponse'
      security:
      - x-redlock-auth: []
      x-ga: 23.10.2-darwin
      x-public: 'true'
    delete:
      tags:
      - Collections
      summary: Delete Collection
      description: 'Deletes a Collection with the specified ID.

        :::info

        This endpoint is available on the Prisma Cloud Darwin release only.

        :::

        '
      externalDocs:
        url: entitlement/api/v1/collection/#id
        x-ga: 'false'
      operationId: delete-collection-by-id
      parameters:
      - name: id
        in: path
        description: Collection Id
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '403':
          description: Forbidden
          content:
            '*/*':
              schema:
                type: object
        '400':
          description: Bad Request
          content:
            '*/*':
              schema:
                type: object
        '204':
          description: Successful operation
        4XX:
          description: Client error
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SpringErrorResponse'
        '429':
          description: API is rate limited
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SpringErrorResponse'
      security:
      - x-redlock-auth: []
      x-ga: 23.10.2-darwin
      x-public: 'true'
    servers:
    - url: https://api.prismacloud.io
    - url: https://api2.prismacloud.io
    - url: https://api3.prismacloud.io
    - url: https://api4.prismacloud.io
    - url: https://api.anz.prismacloud.io
    - url: https://api.eu.prismacloud.io
    - url: https://api2.eu.prismacloud.io
    - url: https://api.gov.prismacloud.io
    - url: https://api.prismacloud.cn
    - url: https://api.ca.prismacloud.io
    - url: https://api.sg.prismacloud.io
    - url: https://api.uk.prismacloud.io
    - url: https://api.ind.prismacloud.io
    - url: https://api.jp.prismacloud.io
    - url: https://api.fr.prismacloud.io
  /entitlement/api/v1/collection:
    get:
      tags:
      - Collections
      summary: Get All Collections
      description: "Returns all Collections in a paginated format, sorted by ID desc.\n:::info\nThis endpoint is available on the Prisma Cloud Darwin release only.\n:::\n\n#### Rate Limits ####\n* Request rate limit: 4/sec \n* Burst Rate: 4/sec \n"
      externalDocs:
        url: entitlement/api/v1/collection
        x-ga: 'false'
      operationId: get-all-collections
      parameters:
      - name: exclude_asset_group
        in: query
        description: Exclude AssetGroup from response.
        required: false
        schema:
          type: boolean
      - name: page_size
        in: query
        description: Number of records per page. Default is 50 and max is 500.
        required: false
        schema:
          type: integer
          format: int32
      - name: order_by
        in: query
        description: Order by records based of ID, NAME, LAST_MODIFIED_TS.
        required: false
        schema:
          type: string
      - name: next_page_token
        in: query
        description: Token to fetch next page  Collections.
        required: false
        schema:
          type: string
      responses:
        '403':
          description: Forbidden
          content:
            '*/*':
              schema:
                type: object
        '400':
          description: Bad Request
          content:
            '*/*':
              schema:
                type: object
        '200':
          description: Successful operation
          content:
            application/json; charset=UTF-8:
              schema:
                $ref: '#/components/schemas/PrismaCollectionView'
        4XX:
          description: Client error
          content:
            application/json; charset=UTF-8:
              schema:
                $ref: '#/components/schemas/SpringErrorResponse'
        '429':
          description: API is rate limited
          content:
            application/json; charset=UTF-8:
              schema:
                $ref: '#/components/schemas/SpringErrorResponse'
      security:
      - x-redlock-auth: []
      x-ga: 23.10.2-darwin
      x-public: 'true'
    post:
      tags:
      - Collections
      summary: Create Collection
      description: 'Create a new Collection comprising of Asset Group Types. You can use ''*'' to include all Ids for a given assetGroupType.

        :::info

        This endpoint is available on the Prisma Cloud Darwin release only.

        :::

        '
      externalDocs:
        url: entitlement/api/v1/collection
        x-ga: 'false'
      operationId: create-collection
      requestBody:
        description: Collections Data Model
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Collection'
            examples:
              CREATE COLLECTION:
                description: "Create a new Collection comprising of Asset Group Types. You can use '*' to include all Ids for a given assetGroupType. \nIn the below examples all accountIds will be included."
                value:
                  name: test-collection
                  description: test description
                  assetGroups:
                    accountGroupIds:
                    - ag1
                    - ag2
                    repositoryIds:
                    - r1
                    - r2
                    accountIds:
                    - '*'
        required: true
      responses:
        '403':
          description: Forbidden
          content:
            '*/*':
              schema:
                type: object
        '400':
          description: Bad Request
          content:
            '*/*':
              schema:
                type: object
        '201':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Collection'
        4XX:
          description: Client error
          content:
            application/json; charset=UTF-8:
              schema:
                $ref: '#/components/schemas/SpringErrorResponse'
        '429':
          description: API is rate limited
          content:
            application/json; charset=UTF-8:
              schema:
                $ref: '#/components/schemas/SpringErrorResponse'
      security:
      - x-redlock-auth: []
      x-ga: 23.10.2-darwin
      x-public: 'true'
    servers:
    - url: https://api.prismacloud.io
    - url: https://api2.prismacloud.io
    - url: https://api3.prismacloud.io
    - url: https://api4.prismacloud.io
    - url: https://api.anz.prismacloud.io
    - url: https://api.eu.prismacloud.io
    - url: https://api2.eu.prismacloud.io
    - url: https://api.gov.prismacloud.io
    - url: https://api.prismacloud.cn
    - url: https://api.ca.prismacloud.io
    - url: https://api.sg.prismacloud.io
    - url: https://api.uk.prismacloud.io
    - url: https://api.ind.prismacloud.io
    - url: https://api.jp.prismacloud.io
    - url: https://api.fr.prismacloud.io
components:
  schemas:
    string:
      type: string
    -_collection.Collection:
      items:
        $ref: '#/components/schemas/collection.Collection'
      type: array
    -_collection.Usage:
      items:
        $ref: '#/components/schemas/collection.Usage'
      type: array
    common.Color:
      description: Color is a hexadecimal representation of color code value
      type: string
    collection.Usage:
      description: Usage represents details of a collection being used
      properties:
        name:
          description: 'Name of the consumer (e.g., container runtime, username, etc.).

            '
          type: string
        type:
          $ref: '#/components/schemas/collection.UsageType'
      type: object
    collection.UsageType:
      description: UsageType represents a collection usage type
      enum:
      - - policy
        - settings
        - user
        - group
        - registryScan
      type: string
    collection.Collection:
      description: Collection is a collection of resources
      properties:
        accountIDs:
          description: 'List of account IDs.

            '
          items:
            $ref: '#/components/schemas/string'
          type: array
        appIDs:
          description: 'List of application IDs.

            '
          items:
            $ref: '#/components/schemas/string'
          type: array
        clusters:
          description: 'List of Kubernetes cluster names.

            '
          items:
            $ref: '#/components/schemas/string'
          type: array
        color:
          $ref: '#/components/schemas/common.Color'
        containers:
          description: 'List of containers.

            '
          items:
            $ref: '#/components/schemas/string'
          type: array
        description:
          description: 'Free-form text.

            '
          type: string
        functions:
          description: 'List of functions.

            '
          items:
            $ref: '#/components/schemas/string'
          type: array
        hosts:
          description: 'List of  hosts.

            '
          items:
            $ref: '#/components/schemas/string'
          type: array
        images:
          description: 'List of images.

            '
          items:
            $ref: '#/components/schemas/string'
          type: array
        labels:
          description: 'List of labels.

            '
          items:
            $ref: '#/components/schemas/string'
          type: array
        modified:
          description: 'Datetime when the collection was last modified.

            '
          format: date-time
          type: string
        name:
          description: 'Collection name. Must be unique.

            '
          type: string
        namespaces:
          description: 'List of Kubernetes namespaces.

            '
          items:
            $ref: '#/components/schemas/string'
          type: array
        owner:
          description: 'User who created or last modified the collection.

            '
          type: string
        prisma:
          description: 'Indicates whether this collection originates from Prisma Cloud.

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

            '
          type: boolean
      type: object
    AssetGroup:
      type: object
      properties:
        accountGroupIds:
          maxItems: 5
          type: array
          items:
            type: string
        accountIds:
          maxItems: 1000
          type: array
          items:
            type: string
        repositoryIds:
          maxItems: 1000
          type: array
          items:
            type: string
      description: AssetGroup that are part of Collection
    PrismaCollectionView:
      type: object
      properties:
        value:
          type: array
          items:
            $ref: '#/components/schemas/Collection'
        nextPageToken:
          type: string
    SpringErrorResponse:
      required:
      - error
      - httpStatus
      - message
      - path
      - timestamp
      type: object
      properties:
        timestamp:
          type: string
        httpStatus:
          type: integer
          format: int32
        error:
          type: string
        errorDetails:
          type: array
          items:
            $ref: '#/components/schemas/ErrorDetails'
        message:
          type: string
        path:
          type: string
    ErrorDetails:
      required:
      - message
      - name
      type: object
      properties:
        name:
          type: string
        message:
          type: string
    Collection:
      type: object
      properties:
        id:
          type: string
          description: Collection id
          readOnly: true
        name:
          type: string
          description: Collection name
        description:
          type: string
          description: Collection description
        createdBy:
          type: string
          description: User who created the collection
          readOnly: true
        lastModifiedBy:
          type: string
          description: 'User who last updated the collection '
          readOnly: true
        createdTs:
          type: integer
          description: Collection created date
          format: int64
          readOnly: true
        lastModifiedTs:
          type: integer
          description: Collection last updated date
          format: int64
          readOnly: true
        assetGroups:
          $ref: '#/components/schemas/AssetGroup'
      description: Collections Data Model
  securitySchemes:
    x-redlock-auth:
      description: The x-redlock-auth value is a JSON Web Token (JWT).
      in: header
      name: x-redlock-auth
      type: apiKey
externalDocs:
  description: Platform Wiki Documentation
  url: https://redlock.atlassian.net/wiki/spaces/RED/pages/3211854036/Entitlement+service
x-refined-from:
- palo-alto-compute-34-03-openapi-34-03-138-sh-openapi.json
- palo-alto-compute-openapi-34-04-145-sh-openapi.json
- palo-alto-cspm-collectionsmicroservice-openapi.json
- palo-alto-cwpp-34-03-openapi-34-03-138-saas-openapi.json
- palo-alto-cwpp-openapi-34-04-145-saas-openapi.json