Previous page Next page

Status Codes

When you submit an HTTP request to CNA, the server will return one of the following status codes:

Table 10:  Server Response Codes 
Code
Name
Meaning

200

OK

The request was successful; output (text from a show command, for example) is contained in the response body

204

No Content

The request was successful but command produced no output and the response body contains no content

400

Bad Request

The request could not be understood due to malformed syntax or bad or missing arguments; see the response body for details

401

Unauthorized

The login user ID or password, or the enable password if required to execute the requested command, was missing or invalid; check response headers for details:

  • Enable-Authenticate indicates missing or invalid enable password
  • WWW-Authenticate indicates missing or invalid login ID or password

406

Not Accepted

The web server could not comply with the request (example: you specified Accept-Encoding with a type not supported by the server); see the response body for details

500

Internal Server Error

An error was encountered while the CNA software was trying to process your request; see the response body for details

For single configuration commands that produce no output from the CNA CLI, you will receive a 204 status code indicating that the command was successfully applied to CNA’s running configuration.

When you submit multiple configuration commands in a single request, they are applied to CNA’s running configuration with the equivalent of the CLI’s copy command, which generates a status report indicating how many of the commands were successfully applied to the running configuration and how many failed. This CLI-generated status report will be contained in the response body.

The format of the contents in the response body will vary depending on the command submitted to the CLI and cannot be predicted in advance.

Your client application should be prepared to handle any format supported by CNA now or in the future--ASCII text, HTML, XML, and possibly binary formats such as PDF files or Excel spreadsheets.

Check the Content-Type response header to determine the type of returned output.


Previous page Next page