Cisco Cisco ASA 5580 Adaptive Security Appliance
About the ASA REST API v1.3.2
REST API Online Documentation
REST API Online Documentation
27
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
the FirePOWER module if there is a “Categories: ad portal” blocking filter configured. To unblock the
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.
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:
python script.py <username> <password>
The Perl scripts require some additional set-up. You will need five components: Perl itself, and four Perl libraries:
Here is an example Perl installation on a Macintosh:
Boot strapping for MAC:
$ sudo perl -MCPAN e shell