Palo Alto Networks Device Operations API
Operations for device management and troubleshooting
Operations for device management and troubleshooting
openapi: 3.2.0
info:
version: 2.0.0
title: Operations and Troubleshooting Device Operations API
description: 'These APIs can be used to retrieve operational data on your devices, for management and troubleshooting purposes.
'
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/operations/v1
description: Current
security:
- scmToken: []
tags:
- name: Device Operations
description: Operations for device management and troubleshooting
paths:
/local-config/versions:
get:
tags:
- Device Operations
summary: List local configuration versions for a device
description: 'Retrieves the version history of local configurations for a specified device.
**Purpose:**
- Track configuration changes pushed to devices
- View version history with timestamps
- Identify current and previous configuration versions
'
operationId: getLocalConfigVersions
parameters:
- name: device
in: query
description: 'The serial number of the device for which to retrieve configuration versions.
**Format:** Typically 14-15 digit device serial number
**Example:** `007951000123456`
**Required:** Yes
'
required: true
schema:
type: string
pattern: ^[0-9]{14,15}$
example: 007951000123456
responses:
'200':
description: 'Success - Returns array of local configuration versions.
**Notes:**
- Empty array `[]` is returned if no versions exist
- Empty array `[]` is returned if device doesn''t exist
- Versions typically ordered by timestamp
'
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/local_config_version'
examples:
with_versions:
summary: Device with configuration versions
value:
- id: 1
serial: 007951000123456
local_version: 1.0.0
timestamp: '2025-01-15T10:30:00Z'
xfmed_version: 1.0.0-transformed
- id: 2
serial: 007951000123456
local_version: 0.9.0
timestamp: '2025-01-14T09:20:00Z'
xfmed_version: 0.9.0-transformed
no_versions:
summary: Device with no versions (or non-existent device)
value: []
'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'
/local-config/download:
get:
tags:
- Device Operations
summary: Download local configuration file
description: 'Downloads a specific local configuration file for a device.
**Purpose:**
- Retrieve the actual XML configuration file pushed to a device
- Download configuration for backup or review purposes
- Access specific configuration versions from history
**Process:**
- Queries the database for the specified device and version
- Retrieves the base64-encoded configuration
- Decodes and returns it as an XML file download
- File is downloaded with name: `local-config-{device}-{version}.xml`
'
operationId: downloadLocalConfig
parameters:
- name: device
in: query
description: 'The serial number of the device for which to download the configuration.
**Format:** Typically 14-15 digit device serial number
**Example:** `007951000123456`
**Required:** Yes
'
required: true
schema:
type: string
pattern: ^[0-9]{14,15}$
example: 007951000123456
- name: version
in: query
description: 'The configuration version ID to download.
**Source:** Use the `id` field from `/local-config/versions` response
**Example:** `1`
**Required:** Yes
'
required: true
schema:
type: string
example: '1'
responses:
'200':
description: 'Success - Configuration file downloaded successfully.
**Response Type:** Binary file download (XML)
**Content-Type:** `application/octet-stream`
**Filename:** `local-config-{device}-{version}.xml`
'
headers:
Content-Disposition:
description: Attachment header specifying the downloaded filename
schema:
type: string
example: attachment; filename=local-config-007951000123456-1.xml
Content-Type:
description: MIME type of the downloaded file
schema:
type: string
example: application/octet-stream
content:
application/octet-stream:
schema:
type: string
format: binary
description: 'XML configuration file content.
The file contains the device''s local configuration in XML format,
retrieved from the database and decoded from base64 encoding.
'
'400':
description: 'Bad Request - Missing required query parameters.
**Common Causes:**
- Missing `device` parameter
- Missing `version` parameter
'
content:
application/json:
schema:
type: object
properties:
error:
type: string
examples:
missing_device:
summary: Missing device parameter
value:
error: device query parameter is required
missing_version:
summary: Missing version parameter
value:
error: version query parameter is required
'404':
description: 'Not Found - Configuration not found for the specified device and version.
**Common Causes:**
- Invalid version ID for the device
- Device configuration has been deleted
- Database record doesn''t exist
'
content:
application/json:
schema:
type: object
properties:
error:
type: string
example:
error: configuration not found
'500':
description: 'Internal Server Error - Database query error, parsing error, or decoding error.
**Common Causes:**
- Database connectivity issues
- Invalid JSON response from database service
- Missing `local_cfg` field in database response
- Invalid base64 encoding in stored configuration
- Failed to decode base64 content
'
content:
application/json:
schema:
type: object
properties:
error:
type: string
examples:
database_error:
summary: Database query error
value:
error: database query error
parse_error:
summary: Failed to parse database response
value:
error: failed to parse response
missing_field:
summary: Missing local_cfg field
value:
error: local_cfg field not found in response
decode_error:
summary: Failed to decode configuration
value:
error: failed to decode configuration
default:
$ref: '#/components/responses/default_errors'
/jobs/route-table:
post:
summary: Initiate a job to retrieve route table from device(s)
description: 'Initiates an asynchronous job to retrieve the route table (or advanced route table) from one or more specified devices. It returns a job ID that can be used to poll for results using the jobs endpoint. For advanced route table, please set the ''advanced'' attribute to `true`, in the request body. This attribute defaults to `false`.
'
tags:
- Device Operations
operationId: requestRouteTable
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- devices
properties:
devices:
type: array
description: List of device serial numbers from which to retrieve the route table. Must contain between 1 and 5 unique device serial numbers.
minItems: 1
maxItems: 5
uniqueItems: true
items:
type: string
pattern: ^[0-9]{14,15}$
description: Device serial number.
example:
- 007951000123456
- 007951000123457
- 007951000123458
advanced:
type: boolean
description: Optional flag to request advanced routing table information. Defaults to false if not specified.
default: false
example: false
examples:
single_device:
summary: Single device request
value:
devices:
- 007951000123456
multiple_devices:
summary: Multiple devices request
value:
devices:
- 007951000123456
- 007951000123457
- 007951000123458
with_advanced:
summary: Request with advanced flag
value:
devices:
- 007951000123456
advanced: true
responses:
'201':
description: 'Success - Job created successfully.
Use the returned `job_id` to poll for results using `GET /device/jobs/{job_id}`.
'
content:
application/json:
schema:
type: object
required:
- job_id
properties:
job_id:
type: string
format: uuid
description: 'Unique identifier for the created routing table retrieval job.
**Usage:**
- Use this ID with `GET /device/jobs/{job_id}` to poll for job completion
- Job typically completes within 5-30 seconds
- Job results will contain the routing table data from the device(s)
'
example: 550e8400-e29b-41d4-a716-446655440000
examples:
success:
summary: Successful job creation
value:
job_id: 550e8400-e29b-41d4-a716-446655440000
'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/dns-proxy:
post:
summary: Initiate a job to retrieve the dns proxy table from device(s)
description: 'Initiates an asynchronous job to retrieve the dns proxy table from one or more specified devices. It returns a job ID that can be used to poll for results using the jobs endpoint.
'
tags:
- Device Operations
operationId: requestDnsProxy
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- devices
properties:
devices:
type: array
description: List of device serial numbers from which to retrieve the route table. Must contain between 1 and 5 unique device serial numbers.
minItems: 1
maxItems: 5
uniqueItems: true
items:
type: string
pattern: ^[0-9]{14,15}$
description: Device serial number.
example:
- 007951000123456
- 007951000123457
- 007951000123458
examples:
single_device:
summary: Single device request
value:
devices:
- 007951000123456
multiple_devices:
summary: Multiple devices request
value:
devices:
- 007951000123456
- 007951000123457
- 007951000123458
responses:
'201':
description: 'Success - Job created successfully.
Use the returned `job_id` to poll for results using `GET /device/jobs/{job_id}`.
'
content:
application/json:
schema:
type: object
required:
- job_id
properties:
job_id:
type: string
format: uuid
description: 'Unique identifier for the created routing table retrieval job.
**Usage:**
- Use this ID with `GET /device/jobs/{job_id}` to poll for job completion
- Job typically completes within 5-30 seconds
- Job results will contain the routing table data from the device(s)
'
example: 550e8400-e29b-41d4-a716-446655440000
examples:
success:
summary: Successful job creation
value:
job_id: 550e8400-e29b-41d4-a716-446655440000
'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/fib-table:
post:
summary: Initiate a job to retrieve FIB table from device(s)
description: 'Initiates an asynchronous job to retrieve the FIB (Forwarding Information Base) Table from one or more specified devices. It returns a job ID that can be used to poll for results using the jobs endpoint. For advanced FIB table, please set the ''advanced'' attribute to `true`, in the request body. This attribute defaults to `false`.
'
tags:
- Device Operations
operationId: requestFIBTable
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- devices
properties:
devices:
type: array
description: List of device serial numbers from which to retrieve the FIB table. Must contain between 1 and 5 unique device serial numbers.
minItems: 1
maxItems: 5
uniqueItems: true
items:
type: string
pattern: ^[0-9]{14,15}$
description: Device serial number.
example:
- 007951000123456
- 007951000123457
- 007951000123458
advanced:
type: boolean
description: Optional flag to request advanced FIB table information. Defaults to false if not specified.
default: false
example: false
examples:
single_device:
summary: Single device request
value:
devices:
- 007951000123456
multiple_devices:
summary: Multiple devices request
value:
devices:
- 007951000123456
- 007951000123457
- 007951000123458
with_advanced:
summary: Request with advanced flag
value:
devices:
- 007951000123456
advanced: true
responses:
'201':
description: 'Success - Job created successfully.
Use the returned `job_id` to poll for results using `GET /device/jobs/{job_id}`.
'
content:
application/json:
schema:
type: object
required:
- job_id
properties:
job_id:
type: string
format: uuid
description: 'Unique identifier for the created FIB table retrieval job.
**Usage:**
- Use this ID with `GET /device/jobs/{job_id}` to poll for job completion
- Job typically completes within 5-30 seconds
- Job results will contain the FIB table data from the device(s)
'
example: 550e8400-e29b-41d4-a716-446655440000
examples:
success:
summary: Successful job creation
value:
job_id: 550e8400-e29b-41d4-a716-446655440000
'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/logging-service-forwarding-status:
post:
summary: Initiate a job to request logging service forwarding status for device(s)
description: 'Initiates an asynchronous job to retrieve the logging service forwarding status for one or more specified devices. It returns a job ID that can be used to poll for results using the jobs endpoint.
'
tags:
- Device Operations
operationId: requestLoggingServiceForwardingStatus
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- devices
properties:
devices:
type: array
description: List of device serial numbers from which to retrieve the route table. Must contain between 1 and 5 unique device serial numbers.
minItems: 1
maxItems: 5
uniqueItems: true
items:
type: string
pattern: ^[0-9]{14,15}$
description: Device serial number.
example:
- 007951000123456
- 007951000123457
- 007951000123458
examples:
single_device:
summary: Single device request
value:
devices:
- 007951000123456
multiple_devices:
summary: Multiple devices request
value:
devices:
- 007951000123456
- 007951000123457
- 007951000123458
responses:
'201':
description: 'Success - Job created successfully.
Use the returned `job_id` to poll for results using `GET /device/jobs/{job_id}`.
'
content:
application/json:
schema:
type: object
required:
- job_id
properties:
job_id:
type: string
format: uuid
description: 'Unique identifier for the created routing table retrieval job.
**Usage:**
- Use this ID with `GET /device/jobs/{job_id}` to poll for job completion
- Job typically completes within 5-30 seconds
- Job results will contain the routing table data from the device(s)
'
example: 550e8400-e29b-41d4-a716-446655440000
examples:
success:
summary: Successful job creation
value:
job_id: 550e8400-e29b-41d4-a716-446655440000
'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/device-interfaces:
post:
summary: Initiate a job to retrieve network interfaces from device(s)
description: 'Initiates an asynchronous job to retrieve the network interfaces from one or more specified devices. It returns a job ID that can be used to poll for results using the jobs endpoint.
'
tags:
- Device Operations
operationId: requestDeviceInterfaces
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- devices
properties:
devices:
type: array
description: List of device serial numbers from which to retrieve the route table. Must contain between 1 and 5 unique device serial numbers.
minItems: 1
maxItems: 5
uniqueItems: true
items:
type: string
pattern: ^[0-9]{14,15}$
description: Device serial number.
example:
- 007951000123456
- 007951000123457
- 007951000123458
examples:
single_device:
summary: Single device request
value:
devices:
- 007951000123456
multiple_devices:
summary: Multiple devices request
value:
devices:
- 007951000123456
- 007951000123457
- 007951000123458
responses:
'201':
description: 'Success - Job created successfully.
Use the returned `job_id` to poll for results using `GET /device/jobs/{job_id}`.
'
content:
application/json:
schema:
type: object
required:
- job_id
properties:
job_id:
type: string
format: uuid
description: 'Unique identifier for the created routing table retrieval job.
**Usage:**
- Use this ID with `GET /device/jobs/{job_id}` to poll for job completion
- Job typically completes within 5-30 seconds
- Job results will contain the routing table data from the device(s)
'
example: 550e8400-e29b-41d4-a716-446655440000
examples:
success:
summary: Successful job creation
value:
job_id: 550e8400-e29b-41d4-a716-446655440000
'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/device-rules:
post:
summary: Initiate a job to retrieve rules on one or more device(s)
description: 'Initiates an asynchronous job to retrieve rules on from one or more specified devices. It returns a job ID that can be used to poll for results using the jobs endpoint.
'
tags:
- Device Operations
operationId: requestDeviceRules
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- devices
properties:
devices:
type: array
description: List of device serial numbers from which to retrieve the route table. Must contain between 1 and 5 unique device serial numbers.
minItems: 1
maxItems: 5
uniqueItems: true
items:
type: string
pattern: ^[0-9]{14,15}$
description: Device serial number.
example:
- 007951000123456
- 007951000123457
- 007951000123458
examples:
single_device:
summary: Single device request
value:
devices:
- 007951000123456
multiple_devices:
summary: Multiple devices request
value:
devices:
- 007951000123456
- 007951000123457
- 007951000123458
responses:
'201':
description: 'Success - Job created successfully.
Use the returned `job_id` to poll for results using `GET /device/jobs/{job_id}`.
'
content:
application/json:
schema:
type: object
required:
- job_id
properties:
job_id:
type: string
format: uuid
description: 'Unique identifier for the created routing table retrieval job.
**Usage:**
- Use this ID with `GET /device/jobs/{job_id}` to poll for job completion
- Job typically completes within 5-30 seconds
- Job results will contain the routing table data from the device(s)
'
example: 550e8400-e29b-41d4-a716-446655440000
examples:
success:
summary: Successful job creation
value:
job_id: 550e8400-e29b-41d4-a716-446655440000
'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/bgp-policy-export:
post:
summary: Initiate a job for BGP Policy Export from device(s)
description: 'Initiates an asynchronous job for BGP Policy Export from device(s). It returns a job ID that can be used to poll for results using the jobs endpoint.
'
tags:
- Device Operations
operationId: bgpPolicyExport
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- devices
properties:
devices:
type: array
description: List of device serial numbers from which to retrieve the route table. Must contain between 1 and 5 unique device serial numbers.
minItems: 1
maxItems: 5
uniqueItems: true
items:
type: string
pattern: ^[0-9]{14,15}$
description: Device serial number.
example:
- 007951000123456
- 007951000123457
- 007951000123458
examples:
single_device:
summary: Single device request
value:
devices:
- 007951000123456
multiple_devices:
summary: Multiple devices request
value:
devices:
- 007951000123456
- 007951000123457
- 007951000123458
responses:
'201':
description: 'Success - Job created successfully.
Use the returned `job_id` to poll for results using `GET /device/jobs/{job_id}`.
'
content:
application/json:
schema:
type: object
required:
- job_id
properties:
job_id:
type: string
format: uuid
description: 'Unique identifier for the created routing table retrieval job.
**Usage:**
- Use this ID with `GET /device/jobs/{job_id}` to poll for job completion
- Job typically completes within 5-30 seconds
- Job results will contain the routing table data from the device(s)
'
example: 550e8400-e29b-41d4-a716-446655440000
examples:
success:
summary: Successful job creation
value:
job_id: 550e8400-e29b-41d4-a716-446655440000
'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'
components:
examples:
json_401_panui_auth_key_expired:
summary: Key Expired
value:
_errors:
- code: E016
message: Key Expired
details: {}
_request_id: abcd-1234
json_501_panui_restapi_method_not_supported:
summary: Method Not Supported
value:
_errors:
- code: E012
message: Method Not Supported
details: {}
_request_id: abcd-1234
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: abcd-1234
json_501_panui_restapi_version_not_supported:
summary: Version Not Supported
value:
_errors:
- code: E012
message: Version Not Supported
detail
# --- truncated at 32 KB (41 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/palo-alto-networks/refs/heads/main/openapi/palo-alto-networks-device-operations-api-openapi.yml