From d75f002b9aef4b42d50589f7d691074eef19bd04 Mon Sep 17 00:00:00 2001 From: sveisvei Date: Fri, 4 Nov 2016 16:13:58 +0100 Subject: [PATCH] wip docs --- docs/api-v1.md | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/docs/api-v1.md b/docs/api-v1.md index 189af72d68..c4ec1dbed8 100644 --- a/docs/api-v1.md +++ b/docs/api-v1.md @@ -283,3 +283,64 @@ Event types: ] } ``` + + +# Metrics + +**GET: http://unleash.host.com/metrics** + +Get aggregated state of metrics + +``` +{ + +} +``` + + +**GET: http://unleash.host.com/toggle-metrics** + +Get last hour of metrics per toggle + +``` +{ + +} +``` + +**POST: http://unleash.host.com/client/register** + +Register a client instance with the unleash server + +```json +{ + "appName": "appName", + "instanceId": "instanceId", + "strategies": ["default", "some-strategy-1"], + "started": "2016-11-03T07:16:43.572Z", + "interval": 10000, +} +``` + +**POST: http://unleash.host.com/client/metrics** + +Register a metrics payload with a timed bucket + +```json +{ + "appName": "appName", + "instanceId": "instanceId", + "bucket": { + "start": "2016-11-03T07:16:43.572Z", + "stop": "2016-11-03T07:16:53.572Z", + "toggles": { + "toggle-name-1": { + "yes": 123, + "no": 321 + } + } + }, +} +``` + +