Skip to content

Send any data

Goal: get events from your own services, scripts, devices or third-party tools into Anosys. Time: about 5 minutes.

Pick the method that fits your source:

Method Best for Auth
REST GET Scripts, cron jobs, devices, anything that can call a URL URL or API key
REST POST Backend services sending JSON, one or many events at a time URL or API key
Webhook Third-party tools that can call a webhook URL
OpenTelemetry Services already instrumented with OpenTelemetry URL or API key
Decorators Logging specific functions in Python or JavaScript API key
Tracker script Websites and web apps See Website analytics

Bulk loads from data warehouses or cloud storage are set up with our team: email support@anosys.ai.

Step 1. Create an endpoint

Create an endpoint of type Generic / Custom HTTP (or Custom Variables if you only send your own fields) under Collecting → Endpoints. Then open Collecting → Integration Options, select it, and use the tab for your method (GET, POST, Webhook or OTEL). The console shows the exact URL to copy.

Unauthorized or Authorized?

At the top of Integration Options you choose how requests are authenticated. Unauthorized URLs carry your workspace and endpoint in the path and need no header. Authorized (API Key) URLs are shared and need an anosys-apikey header. Use Authorized from servers. See Core concepts.

Step 2. Send an event

Your own fields are named by type and number: cvs1… for text, cvn1… for numbers, cvb1… for true/false. Name them in Collecting → Field Mapping afterwards.

REST GET

1
2
3
curl -G "https://api.anosys.ai/ingestion/YOUR_WORKSPACE/YOUR_TYPE/YOUR_ENDPOINT" \
  --data-urlencode "cvs1=checkout_completed" \
  --data-urlencode "cvn1=129.90"
1
2
3
4
import requests

url = "https://api.anosys.ai/ingestion/YOUR_WORKSPACE/YOUR_TYPE/YOUR_ENDPOINT"
requests.get(url, params={"cvs1": "checkout_completed", "cvn1": 129.90}, timeout=10).raise_for_status()
1
2
3
curl -G "https://api.anosys.ai/ingestion" \
  --header "anosys-apikey: YOUR_API_KEY" \
  --data-urlencode "cvs1=checkout_completed"

REST POST

Send a JSON array. Each object is one event.

1
2
3
curl "https://api.anosys.ai/ingestion/YOUR_WORKSPACE/YOUR_TYPE/YOUR_ENDPOINT" \
  --header "Content-Type: application/json" \
  --data '[{"cvs1": "checkout_completed", "cvn1": 129.90, "cvb1": true}]'
1
2
3
4
5
6
7
8
import requests

requests.post(
    "https://api.anosys.ai/ingestion",
    headers={"anosys-apikey": "YOUR_API_KEY"},
    json=[{"cvs1": "checkout_completed", "cvn1": 129.90}],
    timeout=10,
).raise_for_status()

Webhook

Paste the URL from the Webhook tab into the third-party tool's webhook setting:

https://api.anosys.ai/webhook/YOUR_WORKSPACE/YOUR_TYPE/YOUR_ENDPOINT

OpenTelemetry

Point your OTLP/HTTP exporter at the URL from the OTEL tab:

export OTEL_EXPORTER_OTLP_ENDPOINT="https://api.anosys.ai/YOUR_WORKSPACE/YOUR_TYPE/YOUR_ENDPOINT"
export OTEL_EXPORTER_OTLP_PROTOCOL="http/protobuf"

The tab also lists the per-signal URLs (/v1/traces, /v1/logs, /v1/metrics). Full guide, including the OpenTelemetry Collector: OpenTelemetry.

Python and JavaScript decorators

pip install anosys-sdk-core
export ANOSYS_API_KEY="YOUR_API_KEY"
1
2
3
4
5
6
7
from anosys_sdk_core import anosys_logger, anosys_raw_logger

@anosys_logger(source="billing.charge")
def charge(customer_id, amount):
    ...

anosys_raw_logger({"event": "nightly_sync_done", "rows": 1824})
npm install anosys-sdk-openai
1
2
3
4
5
import { anosysLogger } from 'anosys-sdk-openai';

const charge = anosysLogger('billing.charge')(async (customerId, amount) => {
  // your logic
});

Each decorated call is logged with its arguments, return value and duration.

Step 3. Check it arrived

  • The endpoint's activity graph in Collecting → Endpoints shows calls within seconds.
  • If nothing shows up, paste your URL into Collecting → API Validators. It checks the URL and field names and tells you what's wrong.

Next steps