Cisco Cisco ASA 5525-X Adaptive Security Appliance - No Payload Encryption
About the ASA REST API v1.2.2
REST API Online Documentation
REST API Online Documentation
26
Write Memory API
Changes to the ASA configuration made by REST API calls are not persisted to the start-up configuration; that is,
changes are assigned only to the running configuration. This 'Write Memory API' can be used to save the current running
configuration to the start-up configuration.
POST URL: /api/commands/writemem
Request payload is empty.
REST API Online Documentation
The on-line documentation interface ('Doc-UI') combines the functionality of a user interface with all the information
contained in the embedded API documentation. The Doc-UI can be run in any of the following browsers: Chrome
(current), Firefox (current), Internet Explorer 9+, Safari 5.1+, Opera (current). Older versions may work, but Internet
(current), Firefox (current), Internet Explorer 9+, Safari 5.1+, Opera (current). Older versions may work, but Internet
Explorer 8 and below will not.
The REST API Agent must be enabled to access the Doc-UI; the Doc-UI is accessible from https://<asa management
interface ip>/doc/
interface ip>/doc/
(note that the ending '/' is necessary for accessing the Doc-UI).
Note: When you access the local REST API documentation pages, your browser sends a request to the ASA for the
pages, and also requests certain jQuery and JSON files from various Web locations. One of these locations is
https://cdnjs.cloudflare.com
https://cdnjs.cloudflare.com
.
However, when passing through an ASA with FirePOWER Services enabled, such requests may be blocked by
the FirePOWER module if there is a “Categories: ad portal” blocking filter configured. To unblock the
cloudflare
cloudflare
site, create an access control rule that explicitly allows this site, and place it above the rule which
includes an application condition blocking “ad portals.”
See
filtering or application control.
Types of Scripts
Three types of scripts can be generated from the Doc-UI so you can automate REST API operations: Javascript, Python,
and Perl.
Prerequisites for Using Generated Scripts
. Node.js lets you use
JavaScript applications, typically written for a browser, like a command-line script (such as Python or Perl). Simply follow
the installation instructions, and then run your script with:
node script.js
. Once you have installed Python, you
can run your script with: