Cisco Cisco ASA 5555-X Adaptive Security Appliance

下载
页码 29
 
About the ASA REST API v1.2.1 
Limitations 
 
25 
Generic CLI Command Executer API 
This special API can take single or multi-line CLI commands and will present the output of the CLI as the API response. 
Post URL: 
/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 an error or 
success response, but they do not have any effect on the device. 
Token Authentication API 
The REST client needs to send a POST request to '/api/tokenservices', with user information in the basic authentication 
header to get a token for that user. Subsequently the REST client can use this token in a 'X-Auth-Token' request header 
for any subsequent REST API calls. The 'token' will be valid until either it is explicitly invalidated by 'DELETE 
/api/tokenservices/<token>' request using user information in the basic authentication header, or until the session times 
out. 
The details of request payload, response structure are as follows. POST URL: /api/tokenservices 
Post request payload is empty. The user information should be in basic authentication header. The response could be as 
follows. 
 
Reason 
HTTP Status Code