Copy curl -X POST 'https://api.anec.app/ingestion' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer YOUR_PRESHARED_KEY' \
-d '{
"source": "test_source_identifier",
"records": [
{
"ds": "2024-02-15T13:45:30+0200",
"message": "Test Message",
"filters": {
"country": "en",
"age": 27,
"tags": ["IOS", "Android"]
},
"score": 4,
"user_name": "adil_badil",
"url": "some_url"
}
]
}'
Copy import requests
import json
url = 'https://api.anec.app/ingestion'
headers = {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_PRESHARED_KEY'
}
data = {
"source": "test_source_identifier",
"records": [
{
"ds": "2024-02-15T13:45:30+0200",
"message": "Test Message",
"filters": {
"country": "en",
"age": 27,
"tags": ["IOS", "Android"]
},
"score": 4,
"user_name": "adil_badil",
"url": "some_url"
}
]
}
response = requests.post(url, headers=headers, data=json.dumps(data))
print(response.text)
Upon successful data submission, the system will respond with a status code of 200, accompanied by a message indicating that the data has been successfully added: