cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
174
Views
0
Helpful
1
Replies

PSIRT OpenVuln API with HTTPError: 406

espsc
Beginner
Beginner

Hi Everyone

 

I have facing an issue about using the PSIRT OpenVuln API as a library call function in my script with "query_client.get_by_aci" function and it works for some time.

 

However, it return the result with shown as follow

"""

raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 406 Client Error: Not Acceptable for url: https://api.cisco.com/security/advisories/aci?version=14.2%283l%29

"""

 

I have checked with code and find that there no difference for this function

"advisories_aci=query_client.get_by_aci('aci','14.2(3l)')" in python. Any idea of it?

1 Reply 1

poxman
Cisco Employee
Cisco Employee

Hello,

 

ACI version we are discussing here comes under error category as “No data found”. There is no associated advisory found for that ACI - 14.2(7r), So getting below error message, which is correct.

https://api.cisco.com/security/advisories/aci?version=14.2(7r)

 

{

    "errorCode": "NO_DATA_FOUND",

    "errorMessage": "Advisory-id not found"

}

 

But yes, Error code 404 is appropriate over what we are sending as 406.  We will get this fixed.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Recognize Your Peers