Cortex XSOAR 6.x
Make your first API call
The following examples vary depending on the type of key you select.
You can test authentication with Advanced API keys using the provided Python 3 example. With Standard API keys, use either the cURL example or the Python 3 example. Don't forget to replace the example variables with your unique API key, API key ID, and FQDN tenant. After you verify authentication, you can begin making API calls.
curl -X POST https://company.us.com/incident
-H "Authorization:{api_key}"
-H "Content-Type:application/json"
--data '{
"details": "My test incident",
"name": "My test incident",
"severity": 2,
"type": "Unclassified"
}'
import requests
def test_standard_authentication(api_key):
headers = {
"Authorization": api_key
}
parameters = {}
res = requests.post(url="https://company.us.com/incident",
headers=headers,
json=parameters)
return resLast updated
Was this helpful?
