Palo Alto Networks Background Jobs API

Background jobs is an asynchronous way of managing the report. When you want to download the results up to 100k records, you can create a background job and use the available apis to check the job status, download the report once finished and list all the background jobs created in past 30 Days.

OpenAPI Specification

palo-alto-networks-background-jobs-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: 'Platform: Reporting Service Background Jobs API'
  version: '1.0'
  description: Background jobs is an asynchronous way of managing the report. When you want to download the results up to 100k records, you can create a background job and use the available apis to check the job status, download the report once finished and list all the background jobs created in past 30 Days.
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
tags:
- name: Background Jobs
  description: Background jobs is an asynchronous way of managing the report. When you want to download the results up to 100k records, you can create a background job and use the available apis to check the job status, download the report once finished and list all the background jobs created in past 30 Days.
paths:
  /report-service/api/v1/report:
    get:
      tags:
      - Background Jobs
      summary: Get Reports Metadata
      description: 'List the reports metadata for given report types

        :::info

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

        :::

        '
      operationId: list-reports
      parameters:
      - name: report_types
        in: query
        description: Report types to be retrieved. You can specify multiple report types as comma separated values
        required: false
        schema:
          type: string
      - name: page
        in: query
        description: The required page number for the paginated results. Page number starts from the 0. Default value is 0
        required: false
        schema:
          type: integer
      - name: size
        in: query
        description: The number of results to be returned as part of the page response. Default value is 100
        required: false
        schema:
          type: integer
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListJobResponseModel'
        '400':
          description: Bad Request - report types not specified
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseStatus'
        '401':
          description: Unauthorized - user cannot be authenticated to service the request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseStatus'
        '403':
          description: Forbidden - user role can not be determined
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseStatus'
      security:
      - x-redlock-auth: []
      x-public: 'true'
      x-ga: 24.1.1-darwin
  /report-service/api/v1/report/{reportId}:
    get:
      tags:
      - Background Jobs
      summary: Get Report Metadata by ID
      description: 'Get the metadata for the given report id

        :::info

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

        :::

        '
      operationId: get-report-metadata-by-id
      parameters:
      - name: reportId
        in: path
        description: Id of the report for which the metadata to retrieved.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListReportDetails'
        '401':
          description: Unauthorized - user cannot be authenticated to service the request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseStatus'
        '403':
          description: Forbidden - user does not have the required role
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseStatus'
        '404':
          description: Not Found - report not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseStatus'
      security:
      - x-redlock-auth: []
      x-public: 'true'
      x-ga: 24.1.1-darwin
  /report-service/api/v1/report/{reportId}/status:
    get:
      tags:
      - Background Jobs
      summary: Get Report Status
      description: 'Get the status for the given report id

        :::info

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

        :::

        '
      operationId: get-report-status-by-id
      parameters:
      - name: reportId
        in: path
        description: Id of the report for which status to be retrieved.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successful operation
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ReportResponse'
        '401':
          description: Unauthorized - user cannot be authenticated to service the request
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ResponseStatus'
        '403':
          description: Forbidden - user does not have the required role
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ResponseStatus'
        '404':
          description: Not Found - report not found
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ResponseStatus'
      security:
      - x-redlock-auth: []
      x-public: 'true'
      x-ga: 24.1.1-darwin
  /report-service/api/v1/report/{reportId}/download:
    get:
      tags:
      - Background Jobs
      summary: Download a report
      description: 'Download the report by given report id. Output format can vary with the different report type. Possible formats can be of zip, json.

        :::info

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

        :::

        '
      operationId: download-report-by-id
      parameters:
      - name: reportId
        in: path
        description: Id of the report to be downloaded.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successful operation
        '401':
          description: Unauthorized - user cannot be authenticated to service the request
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ResponseStatus'
        '403':
          description: Forbidden - user does not have the required role
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ResponseStatus'
        '404':
          description: Not Found - report not found
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ResponseStatus'
      security:
      - x-redlock-auth: []
      x-public: 'true'
      x-ga: 24.1.1-darwin
components:
  schemas:
    ResponseStatus:
      type: object
      properties:
        i18nKey:
          type: string
        severity:
          type: string
          enum:
          - ERROR
          - INFO
          - WARNING
        subject:
          type: string
        statusCode:
          type: integer
          format: int32
    ReportResponse:
      type: object
      properties:
        reportId:
          type: string
          description: Id of the report being created.
        createdBy:
          type: string
          description: User who created the report.
        createdOn:
          type: integer
          description: Timestamp when report request is created.
          format: int64
        status:
          type: string
          description: Current status of the report.
        statusUrl:
          type: string
          description: Url to check the report status.
        downloadUrl:
          type: string
          description: Url to download the report once report is generated.
    ListJobResponseModel:
      type: object
      properties:
        reports:
          type: array
          description: Report metadata list.
          items:
            $ref: '#/components/schemas/ListReportDetails'
        currentPage:
          type: integer
          description: Current page number.
          format: int64
        totalItems:
          type: integer
          description: Total number of the available reports.
          format: int64
        totalPages:
          type: integer
          description: Total number of pages to fetch the reports.
          format: int64
        pageSize:
          type: integer
          description: Number of records per page.
          format: int64
    ListReportDetails:
      type: object
      properties:
        reportId:
          type: string
          description: Id of the report.
          format: uuid
        status:
          type: string
          description: Status of the report.
        reportType:
          type: string
          description: Type of the report.
        clientType:
          type: string
          description: Client identifier.
        payload:
          type: object
          description: Payload used for creating the report.
        pathVariables:
          type: object
          description: Path variables used for creating the report.
        queryParams:
          type: object
          description: Query params used for creating the report.
        requestHeaders:
          type: object
          description: Request headers used for creating the report.
        additionalInformation:
          type: object
          description: Any additional attributes used for creating the report.
        createdOn:
          type: integer
          description: Timestamp when report request is created.
          format: int64
        downloadUrl:
          type: string
          description: Url to download the report once report is generated.
  securitySchemes:
    x-redlock-auth:
      description: The x-redlock-auth value is a JSON Web Token (JWT).
      in: header
      name: x-redlock-auth
      type: apiKey