Dears,
I am trying to use the "Utilities: Call REST API" function in order to get JSON info provided by the following IBM url https://exchange.xforce.ibmcloud.com/ip/185.99.32.36
I have tried a function's script as below but I am not able to get info as listed when I browse this URL:
import base64
import json
inputs.rest_verify = "True"
inputs.rest_method = "GET"
api_key = 'aaaaaaaaa'
api_password = 'bbbbbbbbb'
# Create a dictionary for the headers
headers = {
'Authorization': 'Basic ' + base64.b64encode(f'{api_key}:{api_password}'.encode('utf-8')).decode('utf-8')
}
# Convert the headers dictionary to a JSON object
headers_json = json.dumps(headers)
# Set the headers in the inputs
inputs.rest_headers = headers_json
base_url = 'https://exchange.xforce.ibmcloud.com/ip/' + artifact.value
inputs.rest_url = base_url
Any hints how to get these info into SOAR results?
Best Regards
Nabil
------------------------------
Nabil Nehme
------------------------------