better documentation about before and after API parameters; fixes #1135
Costa Tsaousis (ktsaou) committed
Oct 21, 2016 at 00:15 UTC
a3cd218112c56bd755f0c6afde6a778049d31921
2 files changed
+31
-26
web/netdata-swagger.json
+27
-22
@@ -3,7 +3,7 @@
3
"info": {
4
"title": "NetData API",
5
"description": "Real time data collection and graphs...",
6
- "version": "1.2.1_master"
6
+ "version": "1.4.1_master"
7
},
8
"host": "registry.my-netdata.io",
9
"schemes": [
@@ -90,7 +90,7 @@
90
{
91
"name": "after",
92
"in": "query",
93
- "description": "This parameter can either be an absolute timestamp specifying the starting point of the data to be returned, or a relative number of seconds, to the last collected timestamp. Netdata will assume it is a relative number if it is smaller than the duration of the round robin database for this chart. So, if the round robin database is 3600 seconds, any value from -3600 to 3600 will trigger relative arithmetics. Netdata will adapt this parameter to the boundaries of the round robin database.",
93
+ "description": "This parameter can either be an absolute timestamp specifying the starting point of the data to be returned, or a relative number of seconds (negative, relative to parameter: before). Netdata will assume it is a relative number if it is less that 3 years (in seconds). Netdata will adapt this parameter to the boundaries of the round robin database. The default is the beginning of the round robin database (i.e. by default netdata will attempt to return data for the entire database).",
94
"required": true,
95
"type": "number",
96
"format": "integer",
@@ -100,7 +100,7 @@
100
{
101
"name": "before",
102
"in": "query",
103
- "description": "This parameter can either be an absolute timestamp specifying the ending point of the data to be returned, or a relative number of seconds, to the last collected timestamp. Netdata will assume it is a relative number if it is smaller than the duration of the round robin database for this chart. So, if the round robin database is 3600 seconds, any value from -3600 to 3600 will trigger relative arithmetics. Netdata will adapt this parameter to the boundaries of the round robin database.",
103
+ "description": "This parameter can either be an absolute timestamp specifying the ending point of the data to be returned, or a relative number of seconds (negative), relative to the last collected timestamp. Netdata will assume it is a relative number if it is less than 3 years (in seconds). Netdata will adapt this parameter to the boundaries of the round robin database. The default is zero (i.e. the timestamp of the last value collected).",
104
"required": false,
105
"type": "number",
106
"format": "integer",
@@ -109,7 +109,7 @@
109
{
110
"name": "points",
111
"in": "query",
112
- "description": "The number of points to be returned. If not given, or it is <= 0, or it is bigger than the points stored in the round robin database for this chart for the given duration, all the available collected values for the given duration are returned.",
112
+ "description": "The number of points to be returned. If not given, or it is <= 0, or it is bigger than the points stored in the round robin database for this chart for the given duration, all the available collected values for the given duration will be returned.",
113
"required": true,
114
"type": "number",
115
"format": "integer",
@@ -119,12 +119,15 @@
119
{
120
"name": "group",
121
"in": "query",
122
- "description": "The grouping method. If multiple collected values are to be grouped in order to return fewer points, this parameters defines the method of grouping. Two methods are supported, \"max\" and \"average\". \"max\" is actually calculated on the absolute value collected (so it works for both positive and negative dimesions to return the most extreme value in either direction).",
122
+ "description": "The grouping method. If multiple collected values are to be grouped in order to return fewer points, this parameters defines the method of grouping. methods supported \"min\", \"max\", \"average\", \"sum\", \"incremental-sum\". \"max\" is actually calculated on the absolute value collected (so it works for both positive and negative dimesions to return the most extreme value in either direction).",
123
"required": true,
124
"type": "string",
125
"enum": [
126
+ "min",
127
"max",
127
- "average"
128
+ "average",
129
+ "sum",
130
+ "incremental-sum"
131
],
132
"default": "average",
133
"allowEmptyValue": false
@@ -173,7 +176,8 @@
176
"null2zero",
177
"objectrows",
178
"google_json",
176
- "percentage"
179
+ "percentage",
180
+ "unaligned"
181
],
182
"collectionFormat": "pipes"
183
},
@@ -242,6 +246,15 @@
246
"allowEmptyValue": false,
247
"default": "system.cpu"
248
},
249
+ {
250
+ "name": "alarm",
251
+ "in": "query",
252
+ "description": "the name of an alarm linked to the chart",
253
+ "required": false,
254
+ "type": "string",
255
+ "format": "any text",
256
+ "allowEmptyValue": true
257
+ },
258
{
259
"name": "dimension",
260
"in": "query",
@@ -274,25 +287,18 @@
287
"format": "integer",
288
"default": 0
289
},
277
- {
278
- "name": "points",
279
- "in": "query",
280
- "description": "The number of points to be returned. If not given, or it is <= 0, or it is bigger than the points stored in the round robin database for this chart for the given duration, all the available collected values for the given duration are returned.",
281
- "required": true,
282
- "type": "number",
283
- "format": "integer",
284
- "allowEmptyValue": false,
285
- "default": 20
286
- },
290
{
291
"name": "group",
292
"in": "query",
290
- "description": "The grouping method. If multiple collected values are to be grouped in order to return fewer points, this parameters defines the method of grouping. Two methods are supported, \"max\" and \"average\". \"max\" is actually calculated on the absolute value collected (so it works for both positive and negative dimesions to return the most extreme value in either direction).",
293
+ "description": "The grouping method. If multiple collected values are to be grouped in order to return fewer points, this parameters defines the method of grouping. methods are supported \"min\", \"max\", \"average\", \"sum\", \"incremental-sum\". \"max\" is actually calculated on the absolute value collected (so it works for both positive and negative dimesions to return the most extreme value in either direction).",
294
"required": true,
295
"type": "string",
296
"enum": [
297
+ "min",
298
"max",
295
- "average"
299
+ "average",
300
+ "sum",
301
+ "incremental-sum"
302
],
303
"default": "average",
304
"allowEmptyValue": false
@@ -306,13 +312,12 @@
312
"items": {
313
"type": "string",
314
"enum": [
309
- "nonzero",
310
- "flip",
315
"abs",
316
"absolute",
317
"absolute-sum",
318
"null2zero",
315
- "percentage"
319
+ "percentage",
320
+ "unaligned"
321
],
322
"collectionFormat": "pipes"
323
},
web/netdata-swagger.yaml
+4
-4
@@ -2,7 +2,7 @@ swagger: '2.0'
2
info:
3
title: NetData API
4
description: 'Real time data collection and graphs...'
5
- version: 1.2.1_master
5
+ version: 1.4.1_master
6
host: registry.my-netdata.io
7
schemes:
8
- http
@@ -66,7 +66,7 @@ paths:
66
allowEmptyValue: false
67
- name: after
68
in: query
69
- description: 'This parameter can either be an absolute timestamp specifying the starting point of the data to be returned, or a relative number of seconds (relative to parameter: before). Netdata will assume it is a relative number if it is smaller than the duration of the round robin database for this chart. So, if the round robin database is 3600 seconds, any value from -3600 to 3600 will trigger relative arithmetics. Netdata will adapt this parameter to the boundaries of the round robin database.'
69
+ description: 'This parameter can either be an absolute timestamp specifying the starting point of the data to be returned, or a relative number of seconds (negative, relative to parameter: before). Netdata will assume it is a relative number if it is less that 3 years (in seconds). Netdata will adapt this parameter to the boundaries of the round robin database. The default is the beginning of the round robin database (i.e. by default netdata will attempt to return data for the entire database).'
70
required: true
71
type: number
72
format: integer
@@ -74,14 +74,14 @@ paths:
74
default: -600
75
- name: before
76
in: query
77
- description: 'This parameter can either be an absolute timestamp specifying the ending point of the data to be returned, or a relative number of seconds, to the last collected timestamp. Netdata will assume it is a relative number if it is smaller than the duration of the round robin database for this chart. So, if the round robin database is 3600 seconds, any value from -3600 to 3600 will trigger relative arithmetics. Netdata will adapt this parameter to the boundaries of the round robin database.'
77
+ description: 'This parameter can either be an absolute timestamp specifying the ending point of the data to be returned, or a relative number of seconds (negative), relative to the last collected timestamp. Netdata will assume it is a relative number if it is less than 3 years (in seconds). Netdata will adapt this parameter to the boundaries of the round robin database. The default is zero (i.e. the timestamp of the last value collected).'
78
required: false
79
type: number
80
format: integer
81
default: 0
82
- name: points
83
in: query
84
- description: 'The number of points to be returned. If not given, or it is <= 0, or it is bigger than the points stored in the round robin database for this chart for the given duration, all the available collected values for the given duration are returned.'
84
+ description: 'The number of points to be returned. If not given, or it is <= 0, or it is bigger than the points stored in the round robin database for this chart for the given duration, all the available collected values for the given duration will be returned.'
85
required: true
86
type: number
87
format: integer