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

PSIRT OpenVuln API with HTTPError: 406

espsc
Level 1
Level 1

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

PR Oxman
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.