cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
963
Views
10
Helpful
4
Replies

A sample on OpenVUln API by product

Chris-CCO
Level 1
Level 1

Hello,

I would like to use the following API

https://api.cisco.com/security/advisories/product?product=

specifically for a the product name : Cisco Email Security Appliance (ESA)

I do a lot of test but I don't find the good way to fill the awaited paramater.

Could you please enlight me ?

Many thanks in advance

Chris

 

1 Accepted Solution

Accepted Solutions

I don't have a curl CLI to experiment on, but have you tried encoding the spaces in the URL?

 

curl -X GET -s -k -H "Accept: application/json" -H "Authorization: Bearer <My_Token>" https://api.cisco.com/security/advisories/product/?product=Cisco%20Email%20Security%20Appliance%20(ESA)

...I don't believe you need to escape the brackets.

 

cheers,

Seb.

View solution in original post

4 Replies 4

Seb Rupik
VIP Alumni
VIP Alumni

Hi there,

You are missing a forward slash.

The correct structure is:

https://api.cisco.com/security/advisories/product/?product=Cisco Email Security Appliance (ESA)

cheers,

Seb.

 

Hello Seb,

I have tried your solution and it is quite good.

Unfortunately, I would like to have only the product

Cisco Email Security Appliance (ESA)

 in that case, the api replies the following message : <html><body><b>Http/1.1 Bad Request</b></body> </html>

My exact syntax is :

curl -X GET -s -k -H "Accept: application/json" -H "Authorization: Bearer <My_Token>" https://api.cisco.com/security/advisories/product/?product='Cisco Email Security Appliance \(ESA\)'

 

What should I write in order to have only the requested product name and not all the Cisco devices ?

(because it seems that there is a blank between Cisco and Email ... this is not well interpreted by the Api)

 

Many thanks in advance

Christian

 

 


@Seb Rupik wrote:

Hi there,

You are missing a forward slash.

The correct structure is:

https://api.cisco.com/security/advisories/product/?product=Cisco Email Security Appliance (ESA)

cheers,

Seb.

 




I don't have a curl CLI to experiment on, but have you tried encoding the spaces in the URL?

 

curl -X GET -s -k -H "Accept: application/json" -H "Authorization: Bearer <My_Token>" https://api.cisco.com/security/advisories/product/?product=Cisco%20Email%20Security%20Appliance%20(ESA)

...I don't believe you need to escape the brackets.

 

cheers,

Seb.

In fact, the escape of the bracket is necessary

The final request is :

curl -X GET -s -k -H "Accept: application/json" -H "Authorization: Bearer <Mys_Token>" https://api.cisco.com/security/advisories/product/?product=Cisco%20Email%20Security%20Appliance%20\(ESA\) 

 

Thanks a lot for your support

Regards

Christian