Data API
Ideal for applications that can emit metrics and logs directly or for custom monitoring
This guide provides detailed information on using the slaOS direct data ingestion API (Data API). It covers authentication, request format, field descriptions, and best practices for submitting data to slaOS.
Need help troubleshooting the Data API? Contact us at hello@rated.co for consultation.
Ingestion Endpoint
To send events to slaOS, you need to use the following endpoint:
Understanding ingestion_id
and ingestion_key
ingestion_id
and ingestion_key
ingestion_id
: A unique identifier for your slaOS project. This value is specific to your organization and is used to identify the source of the data being ingested.ingestion_key
: A secret key that is also specific to your organization and tied to your data ingestion activities. This key works in tandem with theingestion_id
to authenticate your data submissions.
To find the Ingestion Key and ID in the UI, navigate to Settings and then select General (Organization). You can access this by going to this link.
It’s important to note that the ingestion_key
is not an API key or bearer token—it does not provide access to other slaOS functionalities and cannot be used to retrieve or manipulate data outside of the ingestion endpoint.
Additional security Considerations
Refreshing the Ingestion Key: You can refresh your ingestion key through the slaOS UI if you suspect it has been compromised (Settings -> General)
HTTPS: Always use HTTPS to encrypt data in transit.
Request Format
The API accepts JSON payloads. Here's an example of a valid request:
The API accepts JSON payloads where the body can include either a single event or a list of events.
Field Descriptions
organization_id (string, required)
Unique identifier for the customer or vendor associated with this event.
See Prerequisites for a refresher of the different uses of
organization_id
.
key (string, required)
A unique identifier for the type of event or metric being recorded.
This is not a service name, but rather a metric identifier. You can have multiple metrics for a single service, product, or project.
Example: "api_requests", "database_queries", "order_processing"
timestamp (string, required)
The time the event occurred.
Accepted formats:
ISO 8601:
YYYY-MM-DD[T]HH:MM[:SS[.ffffff]][Z or [±]HH[:]MM]
Unix timestamp (as a string)
values (object, required)
Key-value pairs representing the metrics for this event.
Keys are metric names, values are the corresponding measurements.
Value types are dynamically derived from the first payload sent under the same
key
. However, only timestamps, strings, floats, and integers are supported.
idempotency_key (string, optional)
Idempotency key, a unique identifier for this specific event.
Used for deduplication if the same event is sent multiple times.
Limitations
The total size of each event payload should not exceed 200KB.
There are no specific restrictions on the number or types of key/value pairs in the
values
object.
Ingestion endpoint example
Best Practices and Considerations
Consistency in
key
usage: Use consistentkey
values for similar types of events to ensure proper aggregation and analysis in slaOS.Timestamp accuracy: Ensure that the
timestamp
is as accurate as possible to the time the event occurred.Deduplication: Use the
local_identifier
field to prevent duplicate event processing if you're unsure about the success of a previous submission.
Last updated