- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
03-31-2023 12:13 PM
I was able to use "get_endpoints" because in that instance, the PARAMS are just {}.
But with /public_api/v1/alerts/get_alerts/ :
>>> PARAMS = {"request_data": {"filters": [{"field": "alert_id_list","operator": "in","value": [88299]}]}}
>>> r = requests.post(url=url,headers=headers,params=PARAMS)
>>> print(r.json())
{'reply': {'err_code': 500, 'err_msg': 'Got an invalid input while processing XDR public API', 'err_extra': 'request_data must be of type: dict'}}
Am I missing something here?
>>> type(PARAMS)
<class 'dict'>
04-05-2023 07:29 AM
Needed to be:
response = requests.post(url, headers=headers, json=params)
04-05-2023 07:29 AM
Needed to be:
response = requests.post(url, headers=headers, json=params)
Click Accept as Solution to acknowledge that the answer to your question has been provided.
The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!
These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!
The LIVEcommunity thanks you for your participation!