The customer is trying to query the API for information however the request are failing with "Authorization Required" error.
This may not necessarily be an authentication issue, the API calls have a number of mandatory requirements...
The most common issue we see is that a header is missing, the below code snippet is a good example of how the call should be peformed.
import json
conn = http.client.HTTPSConnection("api.eu.elastica.net")
payload = ''
headers = {
'Content-Type': 'application/json',
'X-Elastica-Dbname-Resolved': 'True',
'Authorization': 'Basic YzU1ZjNiMDg2MzBhMTFlYzgyNWVjZTQ5MjVlYzRmZGE6a1RhZ1ZWaEdESUlVbm5aY0lBbkt2aU5zNEI4a0VkcXFIUGVoRzFnSDl1bw=='
}
conn.request("GET", "/mytenantname/audit/v2/data/?resource=service&earliest_date=1638349200&latest_date=1640077200&resolution=31556926&brr=80,85", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
The basic auth is an amalgamation of the user and secret strings.
As per the above the X header and the Content-Type headers are both mandatory, see the link below for more detail and how you can perform initial testing with the postman tool.
https://knowledge.broadcom.com/external/article?articleId=231085
Also check out the links below which detail the requirement for the X header and the basic request format….
https://techdocs.broadcom.com/us/en/symantec-security-software/information-security/symantec-cloudsoc/cloud/api-home/audit-api/getting-audit-datasources.html
https://techdocs.broadcom.com/us/en/symantec-security-software/information-security/symantec-cloudsoc/cloud/api-home/audit-api/getting-audit-users.html
If customers continue to run into problems they are advised to use postman or curl to perform some basic tests and once successful with those transcribe the approach into the required code.