API Reference
Query metrics
API Documentation
API Reference
- Inventory
- Resource
- Monitor
- Incident
- Integration
- Organization
- User
- POSTQuery logs
- POSTQuery metrics
- POSTQuery traces
API Reference
Query metrics
Retrieve metrics based on the specified filters.
POST
/
query
/
metrics
curl --request POST \
--url https://api.alerty.ai/query/metrics \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"start_time": "2023-01-01T00:00:00Z",
"end_time": "2023-01-02T00:00:00Z",
"service_name": "<string>",
"metric_name": "<string>",
"limit": 100
}'
{
"exponential_histograms": [
{
"resource_attributes": {},
"resource_schema_url": "<string>",
"scope_name": "<string>",
"scope_version": "<string>",
"scope_attributes": {},
"scope_dropped_attr_count": 123,
"scope_schema_url": "<string>",
"metric_name": "<string>",
"metric_description": "<string>",
"metric_unit": "<string>",
"attributes": {},
"start_time_unix": "2023-11-07T05:31:56Z",
"time_unix": "2023-11-07T05:31:56Z",
"count": 123,
"sum": 123,
"scale": 123,
"zero_count": 123,
"positive_offset": 123,
"positive_bucket_counts": [
123
],
"negative_offset": 123,
"negative_bucket_counts": [
123
],
"exemplars": [
{
"filtered_attributes": {},
"time_unix": "2023-11-07T05:31:56Z",
"value": 123,
"span_id": "<string>",
"trace_id": "<string>"
}
],
"flags": 123,
"min": 123,
"max": 123
}
],
"gauges": [
{
"resource_attributes": {},
"resource_schema_url": "<string>",
"scope_name": "<string>",
"scope_version": "<string>",
"scope_attributes": {},
"scope_dropped_attr_count": 123,
"scope_schema_url": "<string>",
"metric_name": "<string>",
"metric_description": "<string>",
"metric_unit": "<string>",
"attributes": {},
"start_time_unix": "2023-11-07T05:31:56Z",
"time_unix": "2023-11-07T05:31:56Z",
"value": 123,
"flags": 123,
"exemplars": [
{
"filtered_attributes": {},
"time_unix": "2023-11-07T05:31:56Z",
"value": 123,
"span_id": "<string>",
"trace_id": "<string>"
}
]
}
],
"histograms": [
{
"resource_attributes": {},
"resource_schema_url": "<string>",
"scope_name": "<string>",
"scope_version": "<string>",
"scope_attributes": {},
"scope_dropped_attr_count": 123,
"scope_schema_url": "<string>",
"metric_name": "<string>",
"metric_description": "<string>",
"metric_unit": "<string>",
"attributes": {},
"start_time_unix": "2023-11-07T05:31:56Z",
"time_unix": "2023-11-07T05:31:56Z",
"count": 123,
"sum": 123,
"bucket_counts": [
123
],
"explicit_bounds": [
123
],
"exemplars": [
{
"filtered_attributes": {},
"time_unix": "2023-11-07T05:31:56Z",
"value": 123,
"span_id": "<string>",
"trace_id": "<string>"
}
],
"flags": 123,
"min": 123,
"max": 123
}
],
"sums": [
{
"resource_attributes": {},
"resource_schema_url": "<string>",
"scope_name": "<string>",
"scope_version": "<string>",
"scope_attributes": {},
"scope_dropped_attr_count": 123,
"scope_schema_url": "<string>",
"metric_name": "<string>",
"metric_description": "<string>",
"metric_unit": "<string>",
"attributes": {},
"start_time_unix": "2023-11-07T05:31:56Z",
"time_unix": "2023-11-07T05:31:56Z",
"value": 123,
"flags": 123,
"exemplars": [
{
"filtered_attributes": {},
"time_unix": "2023-11-07T05:31:56Z",
"value": 123,
"span_id": "<string>",
"trace_id": "<string>"
}
],
"agg_temp": 123,
"is_monotonic": true
}
],
"summaries": [
{
"resource_attributes": {},
"resource_schema_url": "<string>",
"scope_name": "<string>",
"scope_version": "<string>",
"scope_attributes": {},
"scope_dropped_attr_count": 123,
"scope_schema_url": "<string>",
"metric_name": "<string>",
"metric_description": "<string>",
"metric_unit": "<string>",
"attributes": {},
"start_time_unix": "2023-11-07T05:31:56Z",
"time_unix": "2023-11-07T05:31:56Z",
"count": 123,
"sum": 123,
"value_at_quantiles": [
{
"quantile": 123,
"value": 123
}
],
"flags": 123
}
]
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
application/json
Start time for the query.
Example:
"2023-01-01T00:00:00Z"
End time for the query.
Example:
"2023-01-02T00:00:00Z"
Filter metrics by service name.
Filter metrics by name.
Limit the number of results.
Response
200
application/json
Metrics retrieved
curl --request POST \
--url https://api.alerty.ai/query/metrics \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"start_time": "2023-01-01T00:00:00Z",
"end_time": "2023-01-02T00:00:00Z",
"service_name": "<string>",
"metric_name": "<string>",
"limit": 100
}'
{
"exponential_histograms": [
{
"resource_attributes": {},
"resource_schema_url": "<string>",
"scope_name": "<string>",
"scope_version": "<string>",
"scope_attributes": {},
"scope_dropped_attr_count": 123,
"scope_schema_url": "<string>",
"metric_name": "<string>",
"metric_description": "<string>",
"metric_unit": "<string>",
"attributes": {},
"start_time_unix": "2023-11-07T05:31:56Z",
"time_unix": "2023-11-07T05:31:56Z",
"count": 123,
"sum": 123,
"scale": 123,
"zero_count": 123,
"positive_offset": 123,
"positive_bucket_counts": [
123
],
"negative_offset": 123,
"negative_bucket_counts": [
123
],
"exemplars": [
{
"filtered_attributes": {},
"time_unix": "2023-11-07T05:31:56Z",
"value": 123,
"span_id": "<string>",
"trace_id": "<string>"
}
],
"flags": 123,
"min": 123,
"max": 123
}
],
"gauges": [
{
"resource_attributes": {},
"resource_schema_url": "<string>",
"scope_name": "<string>",
"scope_version": "<string>",
"scope_attributes": {},
"scope_dropped_attr_count": 123,
"scope_schema_url": "<string>",
"metric_name": "<string>",
"metric_description": "<string>",
"metric_unit": "<string>",
"attributes": {},
"start_time_unix": "2023-11-07T05:31:56Z",
"time_unix": "2023-11-07T05:31:56Z",
"value": 123,
"flags": 123,
"exemplars": [
{
"filtered_attributes": {},
"time_unix": "2023-11-07T05:31:56Z",
"value": 123,
"span_id": "<string>",
"trace_id": "<string>"
}
]
}
],
"histograms": [
{
"resource_attributes": {},
"resource_schema_url": "<string>",
"scope_name": "<string>",
"scope_version": "<string>",
"scope_attributes": {},
"scope_dropped_attr_count": 123,
"scope_schema_url": "<string>",
"metric_name": "<string>",
"metric_description": "<string>",
"metric_unit": "<string>",
"attributes": {},
"start_time_unix": "2023-11-07T05:31:56Z",
"time_unix": "2023-11-07T05:31:56Z",
"count": 123,
"sum": 123,
"bucket_counts": [
123
],
"explicit_bounds": [
123
],
"exemplars": [
{
"filtered_attributes": {},
"time_unix": "2023-11-07T05:31:56Z",
"value": 123,
"span_id": "<string>",
"trace_id": "<string>"
}
],
"flags": 123,
"min": 123,
"max": 123
}
],
"sums": [
{
"resource_attributes": {},
"resource_schema_url": "<string>",
"scope_name": "<string>",
"scope_version": "<string>",
"scope_attributes": {},
"scope_dropped_attr_count": 123,
"scope_schema_url": "<string>",
"metric_name": "<string>",
"metric_description": "<string>",
"metric_unit": "<string>",
"attributes": {},
"start_time_unix": "2023-11-07T05:31:56Z",
"time_unix": "2023-11-07T05:31:56Z",
"value": 123,
"flags": 123,
"exemplars": [
{
"filtered_attributes": {},
"time_unix": "2023-11-07T05:31:56Z",
"value": 123,
"span_id": "<string>",
"trace_id": "<string>"
}
],
"agg_temp": 123,
"is_monotonic": true
}
],
"summaries": [
{
"resource_attributes": {},
"resource_schema_url": "<string>",
"scope_name": "<string>",
"scope_version": "<string>",
"scope_attributes": {},
"scope_dropped_attr_count": 123,
"scope_schema_url": "<string>",
"metric_name": "<string>",
"metric_description": "<string>",
"metric_unit": "<string>",
"attributes": {},
"start_time_unix": "2023-11-07T05:31:56Z",
"time_unix": "2023-11-07T05:31:56Z",
"count": 123,
"sum": 123,
"value_at_quantiles": [
{
"quantile": 123,
"value": 123
}
],
"flags": 123
}
]
}