rgajula
Occasional contributor

Add/Delete/Update products and versions using API

Hi Experts,

I was wondering if there is an option for Add/Delete/Update the products,product versions under a watch list. We would need this to automate the dynamic products and version changes to get updated in the watch list. I have found Vulnerability Manager module API, But does it require additional license? Please help.

Our product is SV Research.

 

Thanks & Regards,

Ramu Gajula

0 Kudos
6 Replies
raslam
Flexera
Flexera

Hi Ramu, 

APIs should usually be included unless the customer is still on per recipient licensing. Please get back to us with your account name so we can further verify the information internally, otherwise you can also check by accessing the below API link with your SVR admin login credentials. 
 
 
The below link will provide you the detailed help about SVR API's and how you can further use API links within your scripts. 
 
 
Regards,
Raheel 
 
 
rgajula
Occasional contributor

Hi Raslam,

Thank you for your response. Following are our account details. Could you please verify from your side if we are entitled for this request.

Account ID: 657453

Thanks and Regards,

Ramu.

0 Kudos

Ramu, 

Thanks for the account ID and we have verified your account internally. We would like to confirm that your company account is entitled to use the Flexera SVR APIs. Please follow the previously provided API help links for more detail. 

-Raheel 

rgajula
Occasional contributor

Hi Raheel,

Thank you. I will try this out.

Thanks & Regards,

Ramu.

rgajula
Occasional contributor

Hi Raheel,

I tried connecting to the API of our Flexera instance in cloud using a simple GET request. Th response i get is HTTP Code 403.

Following is the script. Could you please check and let me know if i am missing anything here.

 

# import requests module
import requests
from requests.auth import HTTPBasicAuth

# Making a get request


session = requests.Session()
session.headers.update({'Authorization': 'Bearer {MY_AUTH_TOKEN_HERE}'})
response = session.get('https://api.app.flexerasoftware.com/api/')

# print request object
print(response)

 

Regards,

Ramu.

0 Kudos

Hi Ramu,

 

Your Python script is returning error 403 which means that your simple request is not able to authenticate. I have edited your Python script to allow you to authenticate. Below script is displaying products from your SVR. Before running this Python script please edit token. You will need to apply your required filters to data received from API. 

 

# import requests module
import requests
from requests.auth import HTTPBasicAuth

# Making a get request

session = requests.Session()
session.headers.update({'Authorization': 'Token xxxxxxxxxxxxxxxxxxxxxxx'})
response = session.get('https://api.app.flexerasoftware.com/api/inventory/products/')

# print request object
print(response)
if response:
print('Response OK')
else:
print('Response Failed')
print(response.text)

 

Regards,

Artur

0 Kudos