: Resource Methods and Query Parameters (REST API)
Focus
Focus

Resource Methods and Query Parameters (REST API)

Table of Contents

Resource Methods and Query Parameters (REST API)

The PAN-OS REST API requires query parameters for all API requests. The following table describes the methods that the PAN-OS REST API supports and includes the query parameters required for each operation.
For a list of all resource URIs, see Access the PAN-OS REST API. To start using the API, see Work With Objects (REST API) or Create a Security Policy Rule (REST API).
Resource MethodRead the list of resourcesCreate a resourceModify a resource Delete a resourceRename a resourceMove a policy rule(Policies only)
HTTP Method
GETPOSTPUTDELETEPOSTPOST
Query Parameters
nameoptionalrequiredrequiredrequiredrequiredrequired
locationrequired,
valid values on the firewall:
predefined
,
shared for Objects only
,
vsys
, or
panorama-pushed
required,
valid values on the firewall:
shared for Objects only
,
vsys
valid values on Panorama:
shared
or
device-group
required,
valid values on the firewall:
shared for Objects only
,
vsys
valid values on Panorama:
shared
or
device-group
required,
valid values on the firewall:
shared for Objects only
,
vsys
valid values on Panorama:
shared
or
device-group
required,
valid values on the firewall:
shared for Objects only
,
vsys
valid values on Panorama:
shared
or
device-group
required,
valid values on the firewall:
shared
,
vsys
valid values on Panorama:
shared
or
device-group
vsysrequired, if location is
vsys
or
panorama-pushed
required, if location is
vsys
required, if location is
vsys
required, if location is
vsys
required, if location is
vsys
required, if location is
vsys
device-group(Panorama only) required, if location is device-group(Panorama only) required, if location is device-group(Panorama only) required, if location is device-group(Panorama only) required, if location is device-group(Panorama only) required, if location is device-group(Panorama only) required, if location is device-group
input-formatoptional, default format is JSONoptional, default format is JSON
output-formatoptional, default format is JSONoptional, default format is JSONoptional, default format is JSONoptional, default format is JSONoptional, default format is JSONoptional, default format is JSON
newnamerequired
whererequired,
valid values:
top
,
bottom
,
before
,
after
dstrequired, when
where
is
before
or
after
Request Body
requiredrequired
The following table shows examples of request formats with query parameters.
ActionExample of Query Parameters in URL
List
GET https://<firewall or Panorama IP>/restapi/v11.0/<resource URI>?location=location&output-format=json
Create
POST https://<firewall or Panorama IP>/restapi/v11.0/<resource URI>?location=location&name=name
Edit
PUT https://<firewall or Panorama IP>/restapi/v11.0/<resource URI>?location=location&name=name
Delete
DELETE https://<firewall or Panorama IP>/restapi/v11.0/<resource URI>?location=location&name=name
Rename
POST https://<firewall or Panorama IP>/restapi/v11.0/<resource URI>:rename?location=location&name=name &newname=newname
Move
POST https://<firewall or Panorama IP>/restapi/v11.0/<resource URI>:move?location=location&name=name &where=<move to>
<move to> can betop,bottom,before &dst=<policy name>, after &dst=<policy name>