Cisco Cisco ASA 5555-X Adaptive Security Appliance

下载
页码 32
 
About the ASA REST API 
Limitations 
 
30 
/api/cli 
Post Request Payload/Content: 
‘‘commands’’: [‘‘command-1’’, ‘‘command-2’’,…, ‘‘command-n’’]  
Response: 
‘‘response’’: [‘‘command-1 response’’, ‘‘command-2 response’’,…, ‘‘command-n response’’]  
Limitations 
The debug commands are not supported in CLI pass-through. All debug commands are per terminal session, and not a 
global configuration. So, if debug commands are sent over CLI pass-through, either they might return error or success 
response, but they do not have any effect on the device. 
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 
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/ (note that the ending '/' is necessary for accessing the Doc-UI). 
Types of Scripts 
There are three types of scripts that can be generated by the Doc-UI that will allow you to perform REST API operations: 
Javascript, Python, and Perl. 
Pre-requisites for Using Generated Scripts 
The Javascript scripts require the installation of node.js, which can be found at http://nodejs.org/. Node.js allows 
you to use Javascript, typically written for a browser, like a command line script (such as Python or Perl). Simply follow 
the installation instructions, and run your script with: