|
|
|
To send requests, use the POST method with either /exec or /configure as the URI, depending on what kind of command you are sending to the CNA CLI (/exec indicates non-configuration commands, /configure designates commands that are to be added to CNA’s running config).
Case is not significant except for the POST method name, which must be entered in uppercase characters.
You must use an Authorization header with the Basic keyword and a base64 encoded user ID and password.
You must include a Content-Length header.
If you specify HTTP/1.1 in the POST method, you must also include a Host header.
You can use the HTTP/1.1 Accept header to specify a preferred media type (if you have a preference for plain text instead of HTML, for example). However, there is no guarantee that your request will be honored, and you should be prepared to accept whatever is delivered.
You can use the HTTP/1.1 Accept-Encoding header to specify either gzip or zip format. The returned data stream will constitute a compressed file in the specified format. If you specified zip encoding, the CNA command output will be delivered in a file, named PathControl_Response, that is contained within the compressed file.
To enter CNA’s enable password through the API, use the Avaya custom header Enable-Authorization with the Basic keyword, and encode the password in base64 format.
The body of the HTTP request should contain the commands being sent to CNA. The body can be divided into multiple lines, as in a configuration file.
You must separate the last header and the body with a blank link (empty carriage return).
Your header block should be structured as follows:
POST </exec | /configure> HTTP/<1.0 | 1.1> Host: <hostname of CNA---only required for HTTP 1.1> Authorization: Basic <userID:password, base64-encoded> Enable-Authorization: Basic <enable password, base64-encoded, if required by CNA command being executed> Content-Length: <character count of contents> <commands; separate from headers by an empty line>
|
|
|