Fix broken svgs and improve database queries API doc (#14539)
Update README.md
Chris Akritidis committed
Feb 15, 2023 at 10:34 UTC
efa431c5b2ebac1d0b1b73c8517b45c8974106e0
1 file changed
+22
-17
web/api/queries/README.md
+22
-17
@@ -1,15 +1,14 @@
1
<!--
2
-title: "Database Queries"
3
-sidebar_label: "Database Queries"
2
+title: "REST API for Database Queries"
3
+sidebar_label: "REST API for Database Queries"
4
custom_edit_url: https://github.com/netdata/netdata/edit/master/web/api/queries/README.md
5
learn_status: "Published"
6
-learn_topic_type: "References"
7
-learn_rel_path: "Developers/Web/Api/Queries"
6
+learn_rel_path: "Integrations/Export"
7
-->
8
9
# Database Queries
10
12
-Netdata database can be queried with `/api/v1/data` and `/api/v1/badge.svg` REST API methods.
11
+The Netdata database can be queried with the `/api/v1/data` and `/api/v1/badge.svg` REST API methods.
12
13
Every data query accepts the following parameters:
14
@@ -108,18 +107,24 @@ For each value it calls the **grouping method** given with the `&group=` query p
107
The following grouping methods are supported. These are given all the values in the time-frame
108
and they group the values every `group points`.
109
111
--  finds the minimum value
112
--  finds the maximum value
113
--  finds the average value
114
--  adds all the values and returns the sum
115
--  sorts the values and returns the value in the middle of the list
116
--  finds the standard deviation of the values
117
--  finds the relative standard deviation (coefficient of variation) of the values
118
--  finds the exponential weighted moving average of the values
119
--  applies Holt-Winters double exponential smoothing
120
--  finds the difference of the last vs the first value
121
-
122
-The examples shown above, are live information from the `successful` web requests of the global Netdata registry.
110
+-  finds the minimum value
111
+-  finds the maximum value
112
+-  finds the average value
113
+-  adds all the values and returns the sum
114
+-  sorts the values and returns the value in the middle of the list
115
+-  finds the standard deviation of the values
116
+-  finds the relative standard deviation (coefficient of variation) of the values
117
+-  finds the exponential weighted moving average of the values
118
+-  applies Holt-Winters double exponential smoothing
119
+-  finds the difference of the last vs the first value
120
+
121
+The examples shown above show live information from the `received` traffic on the `eth0` interface of the global Netdata registry.
122
+Inspect any of the badges to see the parameters provided. You can directly issue the request to the registry server's API yourself, e.g. by
123
+passing the following to get the value shown on the badge for the sum of the values within the period:
124
+
125
+```
126
+https://registry.my-netdata.io/api/v1/data?chart=net.eth0&options=unaligned&dimensions=received&group=sum&units=kilobits&after=-60&label=sum&points=1
127
+```
128
129
## Further processing
130