🐘
Anecdote Docs
  • Getting started
  • Integrations
    • Gorgias
    • SurveyMonkey
    • Zendesk
    • SendBird
    • Freshdesk
    • Intercom
    • Kustomer
    • HubSpot
    • Typeform
    • Delighted
    • Android SDK
    • iOS SDK
  • Release Notes
  • On-Prem Setup
    • Getting started
    • Identifying the Need for On-Prem Setup
    • Strategy for Client-Side Data Collection and Processing
    • Architecture Overview
    • Why Airbyte and Its Technical Details
    • Custom Airbyte Destination Development and Specifications
    • Health Check Monitoring
  • Direct Data Injection EndPoint
    • Introduction
    • Getting Started
    • Authorization
    • Data Format
    • Error Handling
Powered by GitBook
On this page
  1. Direct Data Injection EndPoint

Getting Started

The following is examples of how to submit data using cURL or Python:

cURL Example

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"
				    }
				  ]
				}'

Python

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:

{"statusCode": 200, "body": "Data is Added Successfully"}

PreviousIntroductionNextAuthorization

Last updated 1 year ago