View all methods
customMetrics.push
Deprecated — This API method has been deprecated. Use Custom Tables instead.
Append a time series record by reference and key pair.
|
|
| Method |
POST https://yourinstance.getdx.net/api/customMetrics.push |
| Name |
Type |
Description |
token |
Token |
Auth token passed as an HTTP header. |
reference |
Text |
The domain reference. |
key |
Text |
The domain key. |
value |
Number |
The value to be stored. |
| Name |
Type |
Description |
metadata |
JSON |
Metadata you want to store. |
timestamp |
ISO8601 |
Defaults to time of request if not specified. |
Custom metrics API methods can be used to add arbitrary time series metrics to your DX database. The records are stored in the custom_metrics table that is queryable in alongside the rest of your DX data.
This is a typical request:
curl -X POST https://yourinstance.getdx.net/api/customMetrics.push \
-H 'Accept: application/json' \
-H 'Authorization: Bearer xxxx-xxxxxxxxx-xxxx' \
-H 'Content-Type: application/json' \
--data '{
"reference": "orgname/service",
"key": "example",
"value": 42.5,
"metadata": { "other": "data" },
"timestamp": "2024-01-01T11:22:33"
}'