openapi: 3.0.0
info:
  version: 2.0.0
  title: Config Operations
  description: These APIs are used for Prisma Access and NGFW operations within Strata Cloud Manager.
  termsOfService: 'https://www.paloaltonetworks.com/content/dam/pan/en_US/assets/pdf/legal/palo-alto-networks-end-user-license-agreement-eula.pdf'
  contact:
    email: support@paloaltonetworks.com
    name: Palo Alto Networks Technical Support
    url: 'https://support.paloaltonetworks.com'
  license:
    name: MIT
    url: https://opensource.org/license/mit
servers:
  - url: 'https://api.strata.paloaltonetworks.com/config/operations/v1'
    description: Current
  - url: 'https://api.sase.paloaltonetworks.com/sse/config/v1'
    description: Legacy
paths:
  /jobs:
    get:
      tags:
        - Jobs
      summary: List jobs
      description: |
        Retrieve a list of configuration jobs.
      operationId: ListJobs
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    allOf:
                      - type: array
                        items:
                          $ref: '#/components/schemas/jobs'
                  limit:
                    type: integer
                    default: 200
                  offset:
                    type: integer
                    default: 0
                  total:
                    type: integer
        '400':
          $ref: '#/components/responses/bad_request_errors_basic'
        '401':
          $ref: '#/components/responses/auth_errors'
        '403':
          $ref: '#/components/responses/access_errors'
        '404':
          $ref: '#/components/responses/not_found'
        default:
          $ref: '#/components/responses/default_errors'
  '/jobs/{id}':
    get:
      tags:
        - Jobs
      summary: Get a job
      description: |
        Get an existing configuration job.
      operationId: GetJobsByID
      parameters:
        - $ref: '#/components/parameters/jobid'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/jobs-response'
        '400':
          $ref: '#/components/responses/bad_request_errors_basic'
        '401':
          $ref: '#/components/responses/auth_errors'
        '403':
          $ref: '#/components/responses/access_errors'
        '404':
          $ref: '#/components/responses/not_found'
        default:
          $ref: '#/components/responses/default_errors'
  '/config-versions:load':
    post:
      tags:
        - Config Versions
      summary: Load config version
      description: |
        Load a specific configuration version into the candidate configuration.
      operationId: LoadConfigVersions
      requestBody:
        description: Created
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/load-config'
      responses:
        '201':
          $ref: '#/components/responses/http_created'
        '400':
          $ref: '#/components/responses/bad_request_errors_basic_with_body'
        '401':
          $ref: '#/components/responses/auth_errors'
        '403':
          $ref: '#/components/responses/access_errors'
        '409':
          $ref: '#/components/responses/conflict_errors'
        default:
          $ref: '#/components/responses/default_errors'
  '/config-versions:push':
    post:
      tags:
        - Config Versions
      summary: Push a configuration version
      description: |
        Push a specific configuration version to devices and/or containers.
      operationId: PushConfigVersions
      requestBody:
        description: Push configuration version request
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/push-config-version-request'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/push-config-version-response'
        '400':
          $ref: '#/components/responses/bad_request_errors_basic_with_body'
        '401':
          $ref: '#/components/responses/auth_errors'
        '403':
          $ref: '#/components/responses/access_errors'
        '409':
          $ref: '#/components/responses/conflict_errors'
        default:
          $ref: '#/components/responses/default_errors'
  '/config-versions/candidate:push':
    post:
      tags:
        - Config Versions
      summary: Push the candidate configuration
      description: |
        Push the candidate configuration.
      operationId: PushCandidateConfigVersions
      requestBody:
        description: Created
        content:
          application/json:
            schema:
              type: object
              properties:
                admin:
                  type: array
                  description: List the administrators and/or service accounts in this field. If you want to push folder named All, please do not add this admin field at all and list each of the folders under All in the folder field.
                  items:
                    type: string
                description:
                  type: string
                  description: A description of the changes being pushed
              allOf:
                - type: object
                  title: folders
                  properties:
                    folder:
                      type: array
                      description: The target folders for the configuration push
                      uniqueItems: true
                      items:
                        type: string
                        pattern: ^[a-zA-Z\d-_\. ]+$
                        maxLength: 64
                      example: [Prisma Access, Mobile Users, Service Conncetions]
                  required: 
                    -  folders
                - type: object
                  title: devices
                  properties:
                    devices:
                      type: array
                      description: The target devices for the configuration push
                      uniqueItems: true
                      items:
                        type: number
                        maxLength: 16
                      example: [007951000388704, 007951000388707, 007051000239252]
                  required: 
                    -  folders
      responses:
        '201':
          $ref: '#/components/responses/http_created'
        '400':
          $ref: '#/components/responses/bad_request_errors_basic_with_body'
        '401':
          $ref: '#/components/responses/auth_errors'
        '403':
          $ref: '#/components/responses/access_errors'
        '409':
          $ref: '#/components/responses/conflict_errors'
        default:
          $ref: '#/components/responses/default_errors'
  /config-versions:
    get:
      tags:
        - Config Versions
      summary: List configuration versions
      description: |
        Retrieve a list of configuration versions.
      operationId: ListConfigVersions
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/config-version'
                  offset:
                    type: integer
                  limit:
                    type: integer
                  total:
                    type: integer
        '400':
          $ref: '#/components/responses/bad_request_errors_basic'
        '401':
          $ref: '#/components/responses/auth_errors'
        '403':
          $ref: '#/components/responses/access_errors'
        '404':
          $ref: '#/components/responses/not_found'
        default:
          $ref: '#/components/responses/default_errors'
  /config-versions/candidate:
    delete:
      tags:
        - Config Versions
      summary: Delete a candidate configuration
      description: |
        Delete a candidate configuration.  Roll back to the running configuration.
      operationId: DeleteCandidateConfigVersions
      responses:
        '200':
          $ref: '#/components/responses/http_ok'
        '400':
          $ref: '#/components/responses/bad_request_errors_basic'
        '401':
          $ref: '#/components/responses/auth_errors'
        '403':
          $ref: '#/components/responses/access_errors'
        '404':
          $ref: '#/components/responses/not_found'
        '409':
          $ref: '#/components/responses/conflict_errors'
        default:
          $ref: '#/components/responses/default_errors'
  '/config-versions/{version}':
    get:
      tags:
        - Config Versions
      summary: Get config by version
      description: |
        Get config by version.
      operationId: GetConfigVersionsByID
      parameters:
        - $ref: '#/components/parameters/version'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/config-version'
        '400':
          $ref: '#/components/responses/bad_request_errors_basic'
        '401':
          $ref: '#/components/responses/auth_errors'
        '403':
          $ref: '#/components/responses/access_errors'
        '404':
          $ref: '#/components/responses/not_found'
        default:
          $ref: '#/components/responses/default_errors'
  /config-versions/running:
    get:
      tags:
        - Config Versions
      summary: Get running configuration versions
      description: |
        Get the running configuration versions on each folder.
      operationId: GetRunningConfigVersions
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/running-config-versions-response'
        '400':
          $ref: '#/components/responses/bad_request_errors_basic'
        '401':
          $ref: '#/components/responses/auth_errors'
        '403':
          $ref: '#/components/responses/access_errors'
        '404':
          $ref: '#/components/responses/not_found'
        default:
          $ref: '#/components/responses/default_errors'
tags:
  - name: Config Versions
    description: Config Versions
  - name: Jobs
    description: Jobs
components:
  parameters:
    limit:
      name: limit
      in: query
      description: The maximum number of results per page
      required: false
      schema:
        type: integer
        default: 200
    offset:
      name: offset
      in: query
      description: The offset into the list of results returned
      required: false
      schema:
        type: integer
        default: 0
    jobid:
      name: id
      in: path
      description: The ID of the job
      required: true
      schema:
        type: string
    version:
      name: version
      in: path
      description: The configuration version number
      required: true
      schema:
        type: integer
  securitySchemes:
    scmOAuth:
      type: oauth2
      description: |
        Strata Cloud Manager APIs authenticate client requests using the 
        OAuth 2.0 Client Credentials flow.  Please use the `client_id`, 
        `client_secret` values associated with an IAM service account along 
        with a scope value of `tsg_id:XXXXXXXXXX`, where `XXXXXXXXXX` is the 
        Tenant Service Group (TSG) ID.  The resulting JWT access token should 
        be attached to all API calls as a `Bearer` token in the `Authorization` 
        header (ex. `Authorization: Bearer tokenstring`).
      flows: 
        clientCredentials:
          tokenUrl: https://auth.apps.paloaltonetworks.com/oauth2/access_token
          scopes: {}
    scmToken:
      type: http
      description: |
        Strata Cloud Manager APIs authenticate client requests using the 
        OAuth 2.0 Client Credentials flow.  Please use the `client_id`, 
        `client_secret` values associated with an IAM service account along 
        with a scope value of `tsg_id:XXXXXXXXXX`, where `XXXXXXXXXX` is the 
        Tenant Service Group (TSG) ID.  The resulting JWT access token should 
        be attached to all API calls as a `Bearer` token in the `Authorization` 
        header (ex. `Authorization: Bearer tokenstring`).
      scheme: bearer
      bearerFormat: JWT
  responses:
    http_ok:
      description: OK
    http_created:
      description: Created
    auth_errors:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/generic_error'
          examples:
            auth_not_authenticated:
              $ref: '#/components/examples/json_401_panui_auth_not_authenticated'
            invalid_credential:
              $ref: '#/components/examples/json_401_panui_auth_invalid_credential'
            key_too_long:
              $ref: '#/components/examples/json_401_panui_auth_key_too_long'
            key_expired:
              $ref: '#/components/examples/json_401_panui_auth_key_expired'
            need_password_change:
              $ref: '#/components/examples/json_401_panui_auth_need_password_change'
    access_errors:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/generic_error'
          examples:
            auth_unauthorized:
              $ref: '#/components/examples/json_403_panui_auth_unauthorized'
    bad_request_errors_basic:
      description: Bad Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/generic_error'
          examples:
            input_format_mismatch:
              $ref: '#/components/examples/json_400_panui_restapi_input_format_mismatch'
            output_format_mismatch:
              $ref: '#/components/examples/json_400_panui_restapi_output_format_mismatch'
            missing_query_parameter:
              $ref: '#/components/examples/json_400_panui_restapi_missing_query_parameter'
            invalid_query_parameter:
              $ref: '#/components/examples/json_400_panui_restapi_invalid_query_parameter'
    bad_request_errors_basic_with_body:
      description: Bad Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/generic_error'
          examples:
            input_format_mismatch:
              $ref: '#/components/examples/json_400_panui_restapi_input_format_mismatch'
            output_format_mismatch:
              $ref: '#/components/examples/json_400_panui_restapi_output_format_mismatch'
            missing_query_parameter:
              $ref: '#/components/examples/json_400_panui_restapi_missing_query_parameter'
            invalid_query_parameter:
              $ref: '#/components/examples/json_400_panui_restapi_invalid_query_parameter'
            missing_body:
              $ref: '#/components/examples/json_400_panui_restapi_missing_body'
            invalid_object:
              $ref: '#/components/examples/json_400_panui_mgmt_invalid_object'
    not_found:
      description: Not Found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/generic_error'
          examples:
            object_not_present:
              $ref: '#/components/examples/json_404_panui_mgmt_object_not_present'
    conflict_errors:
      description: Conflict
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/generic_error'
          examples:
            object_not_unique:
              $ref: '#/components/examples/json_409_panui_mgmt_object_not_unique'
            name_not_unique:
              $ref: '#/components/examples/json_409_panui_mgmt_name_not_unique'
            reference_not_zero:
              $ref: '#/components/examples/json_409_panui_mgmt_reference_not_zero'
    default_errors:
      description: General Errors
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/generic_error'
          examples:
            version_not_supported:
              $ref: '#/components/examples/json_501_panui_restapi_version_not_supported'
            method_not_allowed:
              $ref: '#/components/examples/json_501_panui_restapi_method_not_supported'
            action_not_supported:
              $ref: '#/components/examples/json_405_panui_restapi_action_not_supported'
            bad_xpath:
              $ref: '#/components/examples/json_400_panui_mgmt_bad_xpath'
            invalid_command:
              $ref: '#/components/examples/json_400_panui_mgmt_invalid_command'
            malformed_command:
              $ref: '#/components/examples/json_400_panui_mgmt_malformed_command'
            session_timeout:
              $ref: '#/components/examples/json_504_panui_mgmt_session_timeout'
  examples:
    json_401_panui_auth_not_authenticated:
      summary: Not Authenticated
      value:
        _errors:
          - code: E016
            message: Not Authenticated
            details: {}
        _request_id: 123e4567-e89b-12d3-a456-426655440000
    json_401_panui_auth_invalid_credential:
      summary: Invalid Credential
      value:
        _errors:
          - code: E016
            message: Invalid Credential
            details: {}
        _request_id: 123e4567-e89b-12d3-a456-426655440000
    json_401_panui_auth_key_too_long:
      summary: Key Too Long
      value:
        _errors:
          - code: E016
            message: Key Too Long
            details: {}
        _request_id: 123e4567-e89b-12d3-a456-426655440000
    json_401_panui_auth_key_expired:
      summary: Key Expired
      value:
        _errors:
          - code: E016
            message: Key Expired
            details: {}
        _request_id: 123e4567-e89b-12d3-a456-426655440000
    json_401_panui_auth_need_password_change:
      summary: Need Password Change
      value:
        _errors:
          - code: E016
            message: The password needs to be changed.
            details: {}
        _request_id: 123e4567-e89b-12d3-a456-426655440000
    json_403_panui_auth_unauthorized:
      summary: Unauthorized
      value:
        _errors:
          - code: E007
            message: Unauthorized
            details: {}
        _request_id: 123e4567-e89b-12d3-a456-426655440000
    json_501_panui_restapi_version_not_supported:
      summary: Version Not Supported
      value:
        _errors:
          - code: E012
            message: Version Not Supported
            details: {}
        _request_id: 123e4567-e89b-12d3-a456-426655440000
    json_501_panui_restapi_method_not_supported:
      summary: Method Not Supported
      value:
        _errors:
          - code: E012
            message: Method Not Supported
            details: {}
        _request_id: 123e4567-e89b-12d3-a456-426655440000
    json_400_panui_restapi_input_format_mismatch:
      summary: Input Format Mismatch
      value:
        _errors:
          - code: E003
            message: 'Input Format Mismatch: input-format=json'
            details: {}
        _request_id: 123e4567-e89b-12d3-a456-426655440000
    json_400_panui_restapi_output_format_mismatch:
      summary: Output Format Mismatch
      value:
        _errors:
          - code: E003
            message: 'Output Format Mismatch: output-format=json Accept=xml'
            details: {}
        _request_id: 123e4567-e89b-12d3-a456-426655440000
    json_400_panui_restapi_missing_query_parameter:
      summary: Missing Query Parameter
      value:
        _errors:
          - code: E003
            message: 'Missing Query Parameter: name'
            details: {}
        _request_id: 123e4567-e89b-12d3-a456-426655440000
    json_400_panui_restapi_invalid_query_parameter:
      summary: Invalid Query Parameter
      value:
        _errors:
          - code: E003
            message: 'Invalid Query Parameter: location=invalid'
            details: {}
        _request_id: 123e4567-e89b-12d3-a456-426655440000
    json_400_panui_restapi_missing_body:
      summary: Missing Body
      value:
        _errors:
          - code: E003
            message: Missing Body
            details: {}
        _request_id: 123e4567-e89b-12d3-a456-426655440000
    json_405_panui_restapi_action_not_supported:
      summary: Action Not Supported
      value:
        _errors:
          - code: E012
            message: 'Action Not Supported: move'
            details: {}
        _request_id: 123e4567-e89b-12d3-a456-426655440000
    json_400_panui_mgmt_bad_xpath:
      summary: Bad XPath
      value:
        _errors:
          - code: E013
            message: Bad XPath
            details: {}
        _request_id: 123e4567-e89b-12d3-a456-426655440000
    json_404_panui_mgmt_object_not_present:
      summary: Object Not Present
      value:
        _errors:
          - code: E005
            message: Object Not Present
            details: {}
        _request_id: 123e4567-e89b-12d3-a456-426655440000
    json_409_panui_mgmt_object_not_unique:
      summary: Object Not Unique
      value:
        _errors:
          - code: E016
            message: Object Not Unique
            details: {}
        _request_id: 123e4567-e89b-12d3-a456-426655440000
    json_409_panui_mgmt_name_not_unique:
      summary: Name Not Unique
      value:
        _errors:
          - code: E006
            message: Name Not Unique
            details: {}
        _request_id: 123e4567-e89b-12d3-a456-426655440000
    json_409_panui_mgmt_reference_not_zero:
      summary: Reference Not Zero
      value:
        _errors:
          - code: E009
            message: Reference Not Zero
            details: {}
        _request_id: 123e4567-e89b-12d3-a456-426655440000
    json_400_panui_mgmt_invalid_object:
      summary: Invalid Object
      value:
        _errors:
          - code: E003
            message: Invalid Object
            details: {}
        _request_id: 123e4567-e89b-12d3-a456-426655440000
    json_400_panui_mgmt_invalid_command:
      summary: Invalid Command
      value:
        _errors:
          - code: E003
            message: Invalid Command
            details: {}
        _request_id: 123e4567-e89b-12d3-a456-426655440000
    json_400_panui_mgmt_malformed_command:
      summary: Malformed Command
      value:
        _errors:
          - code: E003
            message: Malformed Command
            details: {}
        _request_id: 123e4567-e89b-12d3-a456-426655440000
    json_504_panui_mgmt_session_timeout:
      summary: Session Timeout
      value:
        _errors:
          - code: '4'
            message: Session Timeout
            details: {}
        _request_id: 123e4567-e89b-12d3-a456-426655440000
  schemas:
    jobs:
      type: object
      properties:
        device_name:
          type: string
          description: The name of the device
        end_ts:
          type: string
          description: The timestamp indicating when the job was finished
        id:
          type: string
          description: The job ID
          example: "115"
        job_result:
          type: string
          description: The job result
          example: "2"
        job_status:
          type: string
          description: The current status of the job
          example: "2"
        job_type:
          type: string
          description: The job type
          example: "53"
        parent_id:
          type: string
          description: The parent job ID
          example: "114"
        percent:
          type: string
          description: Job completion percentage
        result_str:
          type: string
          enum:
            - OK
            - FAIL
            - PEND
            - WAIT
            - CANCELLED
            - TIMEOUT
          description: The result of the job
        start_ts:
          type: string
          description: The timestamp indicating when the job was created
        status_str:
          type: string
          enum:
            - ACT
            - FIN
            - PEND
            - PUSHSENT
            - PUSHFAIL
            - PUSHABORT
            - PUSHTIMEOUT
          description: The current status of the job
        summary:
          type: string
          description: The completion summary of the job
        type_str:
          type: string
          enum:
            - CommitAll
            - CommitAndPush
            - NGFW-Bootstrap-Push
            - Validate
          description: The job type
          example: CommitAndPush
        uname:
          type: string
          description: The administrator or service account that created the job
          format: email
        description:
          type: string
          description: A description provided by the administrator or service account
          example: Added a new security rule for marketing
        details:
          type: string
          description: JSON string with detailed errors or info
          example: "{\"errors\":[\"Config push aborted, error: Failed to handle VPN clusters. Please check AutoVPN config for the device\"]}"
      required:
        - device_name
        - end_ts
        - id
        - job_result
        - job_status
        - job_type
        - parent_id
        - percent
        - result_str
        - start_ts
        - status_str
        - summary
        - type_str
        - uname
    load-config:
      type: object
      properties:
        version:
          type: integer
    push-config-version-request:
      type: object
      properties:
        version:
          type: integer
          description: The configuration version number to push
          example: 123
        devices:
          type: array
          description: The target device serial numbers for the configuration push
          uniqueItems: true
          items:
            type: string
            pattern: '^[0-9]{14,15}$'
          example: ["007951000388704", "007951000388707"]
        containers:
          type: array
          description: The folders for the configuration push
          uniqueItems: true
          items:
            type: string
            maxLength: 64
          example: ["folder1", "folder2"]
      required:
        - version
    push-config-version-response:
      type: object
      properties:
        success:
          type: boolean
          description: Indicates whether the push operation was initiated successfully
          example: true
        job_id:
          type: string
          description: The job ID for tracking the push operation
          example: "12345"
        message:
          type: string
          description: Additional information about the push operation
    config-version:
      type: object
      properties:
        id:
          type: integer
          description: The configuration version
        version:
          type: string
          description: The configuration version name
        date:
          type: string
          format: date-time
        admin:
          type: string
          description: The administrator or service account that pushed this configuration version
          format: email
        scope:
          type: string
        description:
          type: string
        swg_config:
          type: string
        updated:
          type: number
        created:
          type: number
        deleted:
          type: number
        ngfw_scope:
          type: string
          description: A comma separated list of firewall serial numbers
        types:
          type: string
        impacted_devices:
          type: string
        edited_by:
          type: string
      required:
        - id
        - version
        - date
        - admin
        - scope
        - description
        - updated
        - created
        - deleted
    running-versions:
      type: object
      properties:
        device:
          type: string
          description: The folder name or firewall serial number
        version:
          type: integer
          description: The configuration version number
        date:
          type: string
          description: The timestamp of when the configuration version was pushed to the folder or firewall
          format: date-time
      required:
        - device
        - version
        - date
    jobs-response:
      type: object
      description: Response containing job data
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/jobs'
    running-config-versions-response:
      type: object
      description: Paginated response containing running configuration versions
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/running-versions'
        offset:
          type: integer
        limit:
          type: integer
        total:
          type: integer
    generic_error:
      type: object
      properties:
        _errors:
          $ref: '#/components/schemas/error_detail_cause_infos'
        _request_id:
          type: string
      x-examples: {}
    error_detail_cause_infos:
      type: array
      items:
        $ref: '#/components/schemas/error_detail_cause_info'
      x-examples: {}
    error_detail_cause_info:
      type: object
      title: Cause Info
      properties:
        code:
          type: string
        message:
          type: string
        details:
          type: object
        help:
          type: string
security:
  - scmToken: []
x-internal: false
