Set up an HTTP log collector to receive logs
curl -X POST https://api-{tenant external URL}/logs/v1/event -H 'Authorization: {api_key}' -H 'Content-Type: text/plain' -d '{"example1": "test", "timestamp": 1609100113039} {"example2": [12321,546456,45687,1]}'import requests def test_http_collector(api_key): headers = { "Authorization": api_key, "Content-Type": "text/plain" } # Note: the logs must be separated by a new line body = "{'example1': 'test', 'timestamp': 1609100113039}" \ "{'example2': [12321,546456,45687,1]}" res = requests.post(url="https://api-{tenant external URL}/logs/v1/event", headers=headers, data=body) return resSuccess/failure response codeDescriptionOutput code displayed (if applicable)
Last updated
Was this helpful?
