This repository was archived by the owner on Jul 19, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Indicator Registry API
Vera Reynolds edited this page Sep 25, 2019
·
2 revisions
GET /v1/indicator-documents
If no parameters are provided, all documents will be returned. If multiple parameters are provided, only documents that match all provided parameters will be returned.
-
product-name[optional]: filter documents by product name. For example?product-name=rediswill return only documents withproduct: {name: redis} - metadata tags [optional]: filter documents by any number of metadata tags. For example
?deployment=cf-123will return only documents withmetadata: {deployment: cf-123}
curl -X GET https://localhost:8091/v1/indicator-documents?deployment=cf-0123456789 \
--cert client.pem \
--key client.key \
--cacert ca.pem[
{
"apiVersion": "indicatorprotocol.io/v1",
"uid": "my-product-b25baef861986f0854e6c3d7e2db878d5123b3ca",
"kind": "IndicatorDocument",
"metadata": {
"labels": {
"deployment": "cf-0123456789",
"source_id": "my-metric-source"
}
},
"spec": {
"product": {
"name": "my-product",
"version": "1.2.3"
},
"indicators": [
{
"name": "doc_performance_indicator",
"type": "kpi",
"promql": "avg_over_time(demo_latency{source_id=\"my-metric-source\",deployment=\"cf-0123456789\"}[5m])",
"thresholds": [
{
"level": "critical",
"operator": "gt",
"value": 176
}
],
"alert": {
"for": "1m",
"step": "1m"
},
"presentation": {
"chartType": "step",
"currentValue": false,
"frequency": 0,
"labels": [],
"units": ""
},
"status": {
"value": "healthy",
"updatedAt": "0001-01-01T00:00:00Z"
}
}
],
"layout": {
"title": "Hello Indicators",
"description": "",
"sections": [
{
"title": "Metrics",
"description": "",
"indicators": [
"doc_performance_indicator"
]
}
],
"owner": ""
}
}
}
]curl -X POST /v1/register
The data attached to this request must be a valid Indicator Document.
curl -X POST https://localhost:8091/v1/register \
--cert client.pem \
--key client.key \
--cacert ca.pem \
--data-binary @example_indicators.yml200 OK