metrics
POST
https://hermeticor.com /v1/metrics/aggregates Aggregate a metric over time: measurement, interval, breakdown, filters, timezone
Request body
application/json
metricstringrequiredAn event name, a custom metric id (a name alone is read as an event name), or mapped:<role>
measurementstringmeasurementPropertystringintervalstringbystringfromstringrequiredtostringrequiredtimezonestringfilterConditionsItem[]Show child parameters
propertystringrequiredopstringvaluestring | number | boolean | string | number[]topNinteger{
"metric": "string",
"measurement": "count",
"measurementProperty": "string",
"interval": "day",
"by": "string",
"from": "2024-01-01T00:00:00Z",
"to": "2024-01-01T00:00:00Z",
"timezone": "UTC",
"filter": [],
"topN": 10
}Code samples
cURL
curl -X POST "https://hermeticor.com/v1/metrics/aggregates" \
-H "Authorization: Bearer $HERMETICOR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"metric":"string","measurement":"count","measurementProperty":"string","interval":"day","by":"string","from":"2024-01-01T00:00:00Z","to":"2024-01-01T00:00:00Z","timezone":"UTC","filter":[],"topN":10}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 Default Response
Example
{
"metric": "string",
"measurement": "string",
"interval": "string",
"timezone": "string",
"by": "string",
"buckets": [
"string"
],
"series": [
{
"key": "string",
"values": [
0
],
"total": 0
}
],
"total": 0
}Schema
metricstringrequiredmeasurementstringrequiredintervalstringrequiredtimezonestringrequiredbystringrequiredbucketsstring[]requiredseriesobject[]requiredShow child parameters
keystringrequiredvaluesnumber[]requiredtotalnumberrequiredtotalnumberrequired4XX Default Response
Example
{
"error": {
"code": "string",
"message": "string",
"details": {}
}
}Schema
errorobjectrequiredShow child parameters
codestringrequiredmessagestringrequireddetailsobjectGET
https://hermeticor.com /v1/custom-metrics Parameters
limitintegerqueryPage size; omitted returns the whole list
cursorstringqueryOpaque: the
nextCursor of the previous pageCode samples
cURL
curl -X GET "https://hermeticor.com/v1/custom-metrics" \
-H "Authorization: Bearer $HERMETICOR_API_KEY"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 Default Response
Example
{
"items": [
{
"id": "string",
"name": "string",
"description": "string",
"definition": {
"sources": [
{
"event": "string",
"conditions": []
}
],
"valueProperty": null
},
"createdAt": "2024-01-01T00:00:00Z",
"updatedAt": "2024-01-01T00:00:00Z"
}
],
"nextCursor": "string"
}Schema
itemsItemsItem144[]requiredShow child parameters
idstringrequirednamestringrequireddescriptionstringrequireddefinitionobjectrequiredShow child parameters
sourcesSourcesItem[]requiredvaluePropertystringrequiredcreatedAtstringrequiredupdatedAtstringrequirednextCursorstringrequiredPOST
https://hermeticor.com /v1/custom-metrics Request body
application/json
namestringrequireddescriptionstringdefinitionobjectrequiredShow child parameters
sourcesSourcesItem2[]requiredShow child parameters
eventstringrequiredconditionsConditionsItem[]valuePropertystring{
"name": "string",
"description": null,
"definition": {
"sources": [
{
"event": "string",
"conditions": []
}
],
"valueProperty": null
}
}Code samples
cURL
curl -X POST "https://hermeticor.com/v1/custom-metrics" \
-H "Authorization: Bearer $HERMETICOR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"string","description":null,"definition":{"sources":[{"event":"string","conditions":[]}],"valueProperty":null}}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
201 Default Response
Example
{
"id": "string",
"name": "string",
"description": "string",
"definition": {
"sources": [
{
"event": "string",
"conditions": []
}
],
"valueProperty": null
},
"createdAt": "2024-01-01T00:00:00Z",
"updatedAt": "2024-01-01T00:00:00Z"
}Schema
idstringrequirednamestringrequireddescriptionstringrequireddefinitionobjectrequiredShow child parameters
sourcesSourcesItem[]requiredShow child parameters
eventstringrequiredconditionsConditionsItem2[]requiredvaluePropertystringrequiredcreatedAtstringrequiredupdatedAtstringrequiredGET
https://hermeticor.com /v1/custom-metrics/{id} Parameters
idstringpathrequiredCode samples
cURL
curl -X GET "https://hermeticor.com/v1/custom-metrics/{id}" \
-H "Authorization: Bearer $HERMETICOR_API_KEY"TypeScript
Python
Go
PHP
Ruby
Java
Responses
DELETE
https://hermeticor.com /v1/custom-metrics/{id} Parameters
idstringpathrequiredCode samples
cURL
curl -X DELETE "https://hermeticor.com/v1/custom-metrics/{id}" \
-H "Authorization: Bearer $HERMETICOR_API_KEY"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 Default Response
Example
{
"ok": true
}Schema
okbooleanrequiredPATCH
https://hermeticor.com /v1/custom-metrics/{id} Parameters
idstringpathrequiredRequest body
application/json
namestringdescriptionstringdefinitionobjectShow child parameters
sourcesSourcesItem2[]requiredShow child parameters
eventstringrequiredconditionsConditionsItem[]valuePropertystring{
"name": "string",
"description": "string",
"definition": {
"sources": [
{
"event": "string",
"conditions": []
}
],
"valueProperty": null
}
}Code samples
cURL
curl -X PATCH "https://hermeticor.com/v1/custom-metrics/{id}" \
-H "Authorization: Bearer $HERMETICOR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"string","description":"string","definition":{"sources":[{"event":"string","conditions":[]}],"valueProperty":null}}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
GET
https://hermeticor.com /v1/mapped-metrics Parameters
limitintegerqueryPage size; omitted returns the whole list
cursorstringqueryOpaque: the
nextCursor of the previous pageCode samples
cURL
curl -X GET "https://hermeticor.com/v1/mapped-metrics" \
-H "Authorization: Bearer $HERMETICOR_API_KEY"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 Default Response
Example
{
"items": [
{
"role": "placed_order",
"metricName": "string",
"configured": true
}
],
"nextCursor": "string"
}Schema
itemsItemsItem145[]requiredShow child parameters
rolestringrequiredmetricNamestringrequiredconfiguredbooleanrequirednextCursorstringrequiredGET
https://hermeticor.com /v1/mapped-metrics/{role} Parameters
rolestringpathrequiredCode samples
cURL
curl -X GET "https://hermeticor.com/v1/mapped-metrics/{role}" \
-H "Authorization: Bearer $HERMETICOR_API_KEY"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 Default Response
Example
{
"role": "placed_order",
"metricName": "string",
"configured": true
}Schema
rolestringrequiredmetricNamestringrequiredconfiguredbooleanrequiredPUT
https://hermeticor.com /v1/mapped-metrics/{role} Parameters
rolestringpathrequiredRequest body
application/json
metricNamestringrequired{
"metricName": "string"
}Code samples
cURL
curl -X PUT "https://hermeticor.com/v1/mapped-metrics/{role}" \
-H "Authorization: Bearer $HERMETICOR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"metricName":"string"}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
Updated