Aggregated Events
If you have an open source offering with telemetry functionality to collect anonymous usage or event data, you can use the Product Usage API to share aggregated data with Reo.Dev.
Important: Either domain
or ip_addr
must be provided in the payload - they are conditionally required based on data availability.
From the aggregated telemetry data, we should be able to get:
IP address of the system OR Domain information (one is required)
Aggregated usage counts
Activity Details
From the telemetry data, we will be able to enrich the:
IP address and find out the company to which the user belongs
Domain mapping for company association
Note: Either domain
or ip_addr
must be provided - they are conditionally required based on availability.
With the aggregated data, we will map the product usage at a domain level and ultimately to the company to which the usage is associated.
API Structure
X-API-KEY
Generated Reo.Dev <API_KEY>
for authorization.
string
Content-Type
Request content-type is always set to application/json.
string
curl --location 'https://ingest.reo.dev/api/product/aggregateusage' \
--header 'X-API-KEY: <API_KEY>' \
--header 'Content-Type: application/json' \
--data '{
"payload": {
"mode": "DOMAIN",
"activity_type": "secondary23",
"source": "TELEMETRY",
"environment": "PRODUCTION",
"event_id": 1231231232,
"event_at": 639303296,
"domain": "",
"ip_addr": "156.59.87.83",
"count": 1250,
"product_id": "reoWebApp",
"user_agent": "Mozilla/5.0 (Macintosh, Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36",
"meta": {
"property1": "value1",
"property2": "value2"
}
}
}'
Tenant API Key
To access your API key, navigate to: Settings → Integrations → API Keys → Product Usage API
Admins can generate and copy the ke
Non-admin users can only view and copy the existing key
Parameters
mode (Required)
Aggregation mode for the telemetry data
enum
DOMAIN
"DOMAIN"
source (Required)
Source of the activity
enum
TELEMETRY
"TELEMETRY"
activity_type (Required)
Usage Metrics of the product. The definition of primary, secondary1, secondary2, and secondary23 should match with metrics defined in the Reo.Dev settings
string
Keys defined in metrics section in Reo.dev UI
"secondary23"
environment (optional)
Environment where product has been deployed
string
"PRODUCTION"
count (mandatory)
Aggregated count of the telemetry events/usage
integer
1250
ip_addr (conditional)
IP address of the system from where the telemetry data originated. Required if domain
is not provided
string
"156.59.87.83"
domain (conditional)
Domain associated with the telemetry data. Required if ip_addr
is not provided
string
"reo.dev"
event_id (optional)
A unique identifier for the API call
string
193ef456430
event_at (mandatory)
The time at which the API call was made (Formatted as a UNIX epoch in seconds)
integer
639303296
product_id (Required)
Unique identifier of your product
string
"reoWebApp"
user_agent (optional)
Additional browser properties
string
"Mozilla/5.0 (Macintosh, Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
meta (optional)
Any other parameter that needs to be sent
object
{"property1":"value1","property2":"value2"}
Sample JSON Request
{
"payload": {
"mode": "DOMAIN",
"activity_type": "secondary23",
"source": "TELEMETRY",
"environment": "PRODUCTION",
"event_id": 1231231232,
"event_at": 639303296,
"count": 1250,
"ip_addr": "156.59.87.83",
"domain": "",
"product_id": "reoWebApp",
"user_agent": "Mozilla/5.0 (Macintosh, Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36",
"meta": {
"property1": "value1",
"property2": "value2"
}
}
}
Sample JSON Response [Success]
{
"response_code": "200",
"response": "Data Uploaded",
"status": "success"
}
Sample JSON Response [Wrong API Key]
{
"response_code": 400,
"response": "Authentication Failure",
"status": "failure"
}
Last updated
Was this helpful?