Hi, all,
I'm trying to use the cp_hec_api_python_sdk and I'm getting a strange error. The code:
CPHEC = CPHEC(ClientID, SecretKey, region)
eventsearchdate = '2023-10-01T09:12:33.001Z'
eventtypes = ['phishing']
eventsearch = CPHEC.event_query(eventsearchdate)
print(eventsearch)
Returns:
{'responseEnvelope': {'requestId': '7b81b4d0-c47d-4e49-9e06-346732e8c33d', 'responseCode': 422, 'responseText': '{"detail":[{"loc":["header","x-cloud-sec-scope"],"msg":"string does not match regex \\"^[a-zA-Z\\\\-0-9]+:[a-zA-Z\\\\-0-9]+(,[a-zA-Z\\\\-0-9]+:[a-zA-Z\\\\-0-9]+)*$\\"","type":"value_error.str.regex","ctx":{"pattern":"^[a-zA-Z\\\\-0-9]+:[a-zA-Z\\\\-0-9]+(,[a-zA-Z\\\\-0-9]+:[a-zA-Z\\\\-0-9]+)*$"}},{"loc":["body","request_scope",0],"msg":"string does not match regex \\"^[a-zA-Z\\\\-0-9]+:[a-zA-Z\\\\-0-9]+$\\"","type":"value_error.str.regex","ctx":{"pattern":"^[a-zA-Z\\\\-0-9]+:[a-zA-Z\\\\-0-9]+$"}}]}', 'recordsNumber': 0, 'scrollId': ''}}
Any ideas?
Thanks!