| 1 | { |
| 2 | "openapi": "3.0.0", |
| 3 | "info": { |
| 4 | "title": "Netdata API", |
| 5 | "description": "Real-time performance and health monitoring.\n\n## API Versions\n\nNetdata provides three API versions:\n- **v1**: The original API, focused on single-node operations\n- **v2**: Multi-node API with advanced grouping and aggregation capabilities\n- **v3**: The latest API version that combines v1 and v2 endpoints and may include additional features\n\n### v3 API Endpoints\n\nThe v3 API provides the current, actively maintained endpoints:\n- `/api/v3/data` - Multi-dimensional data queries\n- `/api/v3/weights` - Metric scoring/correlation\n- `/api/v3/contexts` - Context metadata\n- `/api/v3/nodes` - Node information\n- `/api/v3/q` - Full-text search\n- `/api/v3/alerts` - Alert information\n- `/api/v3/alert_transitions` - Alert state transitions\n- `/api/v3/alert_config` - Alert configuration\n- `/api/v3/functions` - Available functions\n- `/api/v3/function` - Execute functions\n- `/api/v3/info` - Agent information\n- `/api/v3/node_instances` - Node instance information\n- `/api/v3/stream_path` - Streaming topology\n- `/api/v3/versions` - Version information\n- `/api/v3/badge.svg` - Dynamic badges\n- `/api/v3/allmetrics` - Export metrics\n- `/api/v3/context` - Single context info\n- `/api/v3/variable` - Variable information\n- `/api/v3/config` - Dynamic configuration\n- `/api/v3/settings` - Agent settings\n- `/api/v3/me` - Current user information\n- `/api/v3/claim` - Agent claiming\n- Additional management and streaming endpoints\n\n**Note:** V1 and V2 APIs are deprecated and maintained for backwards compatibility only. New integrations should use V3 exclusively.\n", |
| 6 | "version": "v1-rolling", |
| 7 | "contact": { |
| 8 | "name": "Netdata Agent API", |
| 9 | "email": "info@netdata.cloud", |
| 10 | "url": "https://netdata.cloud" |
| 11 | }, |
| 12 | "license": { |
| 13 | "name": "GPL v3+", |
| 14 | "url": "https://github.com/netdata/netdata/blob/master/LICENSE" |
| 15 | } |
| 16 | }, |
| 17 | "servers": [ |
| 18 | { |
| 19 | "url": "https://registry.my-netdata.io" |
| 20 | }, |
| 21 | { |
| 22 | "url": "http://registry.my-netdata.io" |
| 23 | }, |
| 24 | { |
| 25 | "url": "http://localhost:19999" |
| 26 | } |
| 27 | ], |
| 28 | "tags": [ |
| 29 | { |
| 30 | "name": "nodes", |
| 31 | "description": "Everything related to monitored nodes" |
| 32 | }, |
| 33 | { |
| 34 | "name": "charts", |
| 35 | "description": "Everything related to chart instances - DO NOT USE IN NEW CODE - use contexts instead" |
| 36 | }, |
| 37 | { |
| 38 | "name": "contexts", |
| 39 | "description": "Everything related contexts - in new code, use this instead of charts" |
| 40 | }, |
| 41 | { |
| 42 | "name": "data", |
| 43 | "description": "Everything related to data queries" |
| 44 | }, |
| 45 | { |
| 46 | "name": "badges", |
| 47 | "description": "Everything related to dynamic badges based on metric data" |
| 48 | }, |
| 49 | { |
| 50 | "name": "weights", |
| 51 | "description": "Everything related to scoring / weighting metrics" |
| 52 | }, |
| 53 | { |
| 54 | "name": "functions", |
| 55 | "description": "Everything related to functions" |
| 56 | }, |
| 57 | { |
| 58 | "name": "alerts", |
| 59 | "description": "Everything related to alerts" |
| 60 | }, |
| 61 | { |
| 62 | "name": "management", |
| 63 | "description": "Everything related to managing netdata Agents" |
| 64 | } |
| 65 | ], |
| 66 | "paths": { |
| 67 | "/api/v2/nodes": { |
| 68 | "get": { |
| 69 | "deprecated": true, |
| 70 | "operationId": "getNodes2", |
| 71 | "tags": [ |
| 72 | "nodes" |
| 73 | ], |
| 74 | "summary": "Nodes Info v2", |
| 75 | "description": "Get a list of all nodes hosted by this Netdata Agent.\n\n**Security & Access Control:**\n- 📊 **Public Data API** - Bearer token optional, IP-based ACL restrictions apply\n- **Default Access:** Public (no authentication required)\n- **Bearer Protection:** When enabled via `/api/v3/bearer_protection`, requires bearer token\n- **IP Restrictions:** Subject to `allow dashboard from` in netdata.conf\n- **Access Methods:** Direct HTTP/HTTPS, Netdata Cloud, external tools\n", |
| 76 | "security": [ |
| 77 | {}, |
| 78 | { |
| 79 | "bearerAuth": [] |
| 80 | } |
| 81 | ], |
| 82 | "parameters": [ |
| 83 | { |
| 84 | "$ref": "#/components/parameters/scopeNodes" |
| 85 | }, |
| 86 | { |
| 87 | "$ref": "#/components/parameters/scopeContexts" |
| 88 | }, |
| 89 | { |
| 90 | "$ref": "#/components/parameters/filterNodes" |
| 91 | }, |
| 92 | { |
| 93 | "$ref": "#/components/parameters/filterContexts" |
| 94 | }, |
| 95 | { |
| 96 | "$ref": "#/components/parameters/contextsQueryOptions" |
| 97 | } |
| 98 | ], |
| 99 | "responses": { |
| 100 | "200": { |
| 101 | "description": "OK", |
| 102 | "content": { |
| 103 | "application/json": { |
| 104 | "schema": { |
| 105 | "description": "`/api/v2/nodes` response for all nodes hosted by a Netdata Agent.\n", |
| 106 | "type": "object", |
| 107 | "properties": { |
| 108 | "api": { |
| 109 | "$ref": "#/components/schemas/api" |
| 110 | }, |
| 111 | "agents": { |
| 112 | "$ref": "#/components/schemas/agents" |
| 113 | }, |
| 114 | "versions": { |
| 115 | "$ref": "#/components/schemas/versions" |
| 116 | }, |
| 117 | "nodes": { |
| 118 | "type": "array", |
| 119 | "items": { |
| 120 | "$ref": "#/components/schemas/nodeFull" |
| 121 | } |
| 122 | } |
| 123 | } |
| 124 | } |
| 125 | } |
| 126 | } |
| 127 | } |
| 128 | } |
| 129 | } |
| 130 | }, |
| 131 | "/api/v3/nodes": { |
| 132 | "get": { |
| 133 | "operationId": "getNodes3", |
| 134 | "tags": [ |
| 135 | "nodes" |
| 136 | ], |
| 137 | "summary": "Nodes Info v3", |
| 138 | "description": "Get a list of all nodes hosted by this Netdata Agent.\n\n**Security & Access Control:**\n- 📊 **Public Data API** - Bearer token optional, IP-based ACL restrictions apply\n- **Default Access:** Public (no authentication required)\n- **Bearer Protection:** When enabled via `/api/v3/bearer_protection`, requires bearer token\n- **IP Restrictions:** Subject to `allow dashboard from` in netdata.conf\n- **Access Methods:** Direct HTTP/HTTPS, Netdata Cloud, external tools\n", |
| 139 | "security": [ |
| 140 | {}, |
| 141 | { |
| 142 | "bearerAuth": [] |
| 143 | } |
| 144 | ], |
| 145 | "parameters": [ |
| 146 | { |
| 147 | "$ref": "#/components/parameters/scopeNodes" |
| 148 | }, |
| 149 | { |
| 150 | "$ref": "#/components/parameters/scopeContexts" |
| 151 | }, |
| 152 | { |
| 153 | "$ref": "#/components/parameters/filterNodes" |
| 154 | }, |
| 155 | { |
| 156 | "$ref": "#/components/parameters/filterContexts" |
| 157 | }, |
| 158 | { |
| 159 | "$ref": "#/components/parameters/contextsQueryOptions" |
| 160 | } |
| 161 | ], |
| 162 | "responses": { |
| 163 | "200": { |
| 164 | "description": "OK", |
| 165 | "content": { |
| 166 | "application/json": { |
| 167 | "schema": { |
| 168 | "description": "`/api/v3/nodes` response for all nodes hosted by a Netdata Agent.\n", |
| 169 | "type": "object", |
| 170 | "properties": { |
| 171 | "api": { |
| 172 | "$ref": "#/components/schemas/api" |
| 173 | }, |
| 174 | "agents": { |
| 175 | "$ref": "#/components/schemas/agents" |
| 176 | }, |
| 177 | "versions": { |
| 178 | "$ref": "#/components/schemas/versions" |
| 179 | }, |
| 180 | "nodes": { |
| 181 | "type": "array", |
| 182 | "items": { |
| 183 | "$ref": "#/components/schemas/nodeFull" |
| 184 | } |
| 185 | } |
| 186 | } |
| 187 | } |
| 188 | } |
| 189 | } |
| 190 | } |
| 191 | } |
| 192 | } |
| 193 | }, |
| 194 | "/api/v2/contexts": { |
| 195 | "get": { |
| 196 | "deprecated": true, |
| 197 | "operationId": "getContexts2", |
| 198 | "tags": [ |
| 199 | "contexts" |
| 200 | ], |
| 201 | "summary": "Contexts Info v2", |
| 202 | "description": "Get a list of all contexts, across all nodes, hosted by this Netdata Agent.\n\n**Security & Access Control:**\n- 📊 **Public Data API** - Bearer token optional, IP-based ACL restrictions apply\n- **Default Access:** Public (no authentication required)\n- **Bearer Protection:** When enabled via `/api/v3/bearer_protection`, requires bearer token\n- **IP Restrictions:** Subject to `allow dashboard from` in netdata.conf\n- **Access Methods:** Direct HTTP/HTTPS, Netdata Cloud, external tools\n", |
| 203 | "security": [ |
| 204 | {}, |
| 205 | { |
| 206 | "bearerAuth": [] |
| 207 | } |
| 208 | ], |
| 209 | "parameters": [ |
| 210 | { |
| 211 | "$ref": "#/components/parameters/scopeNodes" |
| 212 | }, |
| 213 | { |
| 214 | "$ref": "#/components/parameters/scopeContexts" |
| 215 | }, |
| 216 | { |
| 217 | "$ref": "#/components/parameters/filterNodes" |
| 218 | }, |
| 219 | { |
| 220 | "$ref": "#/components/parameters/filterContexts" |
| 221 | }, |
| 222 | { |
| 223 | "$ref": "#/components/parameters/contextsQueryOptions" |
| 224 | } |
| 225 | ], |
| 226 | "responses": { |
| 227 | "200": { |
| 228 | "description": "OK", |
| 229 | "content": { |
| 230 | "application/json": { |
| 231 | "schema": { |
| 232 | "$ref": "#/components/schemas/contexts2" |
| 233 | } |
| 234 | } |
| 235 | } |
| 236 | } |
| 237 | } |
| 238 | } |
| 239 | }, |
| 240 | "/api/v3/contexts": { |
| 241 | "get": { |
| 242 | "operationId": "getContexts3", |
| 243 | "tags": [ |
| 244 | "contexts" |
| 245 | ], |
| 246 | "summary": "Contexts Info v3", |
| 247 | "description": "Get a list of all contexts, across all nodes, hosted by this Netdata Agent.\n\n**Security & Access Control:**\n- 📊 **Public Data API** - Bearer token optional, IP-based ACL restrictions apply\n- **Default Access:** Public (no authentication required)\n- **Bearer Protection:** When enabled via `/api/v3/bearer_protection`, requires bearer token\n- **IP Restrictions:** Subject to `allow dashboard from` in netdata.conf\n- **Access Methods:** Direct HTTP/HTTPS, Netdata Cloud, external tools\n", |
| 248 | "security": [ |
| 249 | {}, |
| 250 | { |
| 251 | "bearerAuth": [] |
| 252 | } |
| 253 | ], |
| 254 | "parameters": [ |
| 255 | { |
| 256 | "$ref": "#/components/parameters/scopeNodes" |
| 257 | }, |
| 258 | { |
| 259 | "$ref": "#/components/parameters/scopeContexts" |
| 260 | }, |
| 261 | { |
| 262 | "$ref": "#/components/parameters/filterNodes" |
| 263 | }, |
| 264 | { |
| 265 | "$ref": "#/components/parameters/filterContexts" |
| 266 | }, |
| 267 | { |
| 268 | "$ref": "#/components/parameters/contextsQueryOptions" |
| 269 | } |
| 270 | ], |
| 271 | "responses": { |
| 272 | "200": { |
| 273 | "description": "OK", |
| 274 | "content": { |
| 275 | "application/json": { |
| 276 | "schema": { |
| 277 | "$ref": "#/components/schemas/contexts2" |
| 278 | } |
| 279 | } |
| 280 | } |
| 281 | } |
| 282 | } |
| 283 | } |
| 284 | }, |
| 285 | "/api/v2/q": { |
| 286 | "get": { |
| 287 | "deprecated": true, |
| 288 | "operationId": "q2", |
| 289 | "tags": [ |
| 290 | "contexts" |
| 291 | ], |
| 292 | "summary": "Full Text Search v2", |
| 293 | "description": "Get a list of contexts, across all nodes, hosted by this Netdata Agent, matching a string expression\n\n**Security & Access Control:**\n- 📊 **Public Data API** - Bearer token optional, IP-based ACL restrictions apply\n- **Default Access:** Public (no authentication required)\n- **Bearer Protection:** When enabled via `/api/v3/bearer_protection`, requires bearer token\n- **IP Restrictions:** Subject to `allow dashboard from` in netdata.conf\n- **Access Methods:** Direct HTTP/HTTPS, Netdata Cloud, external tools\n", |
| 294 | "security": [ |
| 295 | {}, |
| 296 | { |
| 297 | "bearerAuth": [] |
| 298 | } |
| 299 | ], |
| 300 | "parameters": [ |
| 301 | { |
| 302 | "name": "q", |
| 303 | "in": "query", |
| 304 | "description": "The strings to search for, formatted as a simple pattern", |
| 305 | "required": true, |
| 306 | "schema": { |
| 307 | "type": "string", |
| 308 | "format": "simple pattern" |
| 309 | } |
| 310 | }, |
| 311 | { |
| 312 | "$ref": "#/components/parameters/scopeNodes" |
| 313 | }, |
| 314 | { |
| 315 | "$ref": "#/components/parameters/scopeContexts" |
| 316 | }, |
| 317 | { |
| 318 | "$ref": "#/components/parameters/filterNodes" |
| 319 | }, |
| 320 | { |
| 321 | "$ref": "#/components/parameters/filterContexts" |
| 322 | }, |
| 323 | { |
| 324 | "$ref": "#/components/parameters/contextsQueryOptions" |
| 325 | } |
| 326 | ], |
| 327 | "responses": { |
| 328 | "200": { |
| 329 | "description": "OK", |
| 330 | "content": { |
| 331 | "application/json": { |
| 332 | "schema": { |
| 333 | "$ref": "#/components/schemas/contexts2" |
| 334 | } |
| 335 | } |
| 336 | } |
| 337 | } |
| 338 | } |
| 339 | } |
| 340 | }, |
| 341 | "/api/v3/q": { |
| 342 | "get": { |
| 343 | "operationId": "q3", |
| 344 | "tags": [ |
| 345 | "contexts" |
| 346 | ], |
| 347 | "summary": "Full Text Search v3", |
| 348 | "description": "Get a list of contexts, across all nodes, hosted by this Netdata Agent, matching a string expression.\n\n**Security & Access Control:**\n- 📊 **Public Data API** - Bearer token optional, IP-based ACL restrictions apply\n- **Default Access:** Public (no authentication required)\n- **Bearer Protection:** When enabled via `/api/v3/bearer_protection`, requires bearer token\n- **IP Restrictions:** Subject to `allow dashboard from` in netdata.conf\n- **Access Methods:** Direct HTTP/HTTPS, Netdata Cloud, external tools\n", |
| 349 | "security": [ |
| 350 | {}, |
| 351 | { |
| 352 | "bearerAuth": [] |
| 353 | } |
| 354 | ], |
| 355 | "parameters": [ |
| 356 | { |
| 357 | "name": "q", |
| 358 | "in": "query", |
| 359 | "description": "The strings to search for, formatted as a simple pattern", |
| 360 | "required": true, |
| 361 | "schema": { |
| 362 | "type": "string", |
| 363 | "format": "simple pattern" |
| 364 | } |
| 365 | }, |
| 366 | { |
| 367 | "$ref": "#/components/parameters/scopeNodes" |
| 368 | }, |
| 369 | { |
| 370 | "$ref": "#/components/parameters/scopeContexts" |
| 371 | }, |
| 372 | { |
| 373 | "$ref": "#/components/parameters/filterNodes" |
| 374 | }, |
| 375 | { |
| 376 | "$ref": "#/components/parameters/filterContexts" |
| 377 | }, |
| 378 | { |
| 379 | "$ref": "#/components/parameters/contextsQueryOptions" |
| 380 | } |
| 381 | ], |
| 382 | "responses": { |
| 383 | "200": { |
| 384 | "description": "OK", |
| 385 | "content": { |
| 386 | "application/json": { |
| 387 | "schema": { |
| 388 | "$ref": "#/components/schemas/contexts2" |
| 389 | } |
| 390 | } |
| 391 | } |
| 392 | } |
| 393 | } |
| 394 | } |
| 395 | }, |
| 396 | "/api/v1/info": { |
| 397 | "get": { |
| 398 | "deprecated": true, |
| 399 | "operationId": "getNodeInfo1", |
| 400 | "tags": [ |
| 401 | "nodes" |
| 402 | ], |
| 403 | "summary": "Node Info v1", |
| 404 | "description": "The info endpoint returns basic information about netdata. It provides:\n* netdata version\n* netdata unique id\n* list of hosts mirrored (includes itself)\n* Operating System, Virtualization, K8s nodes and Container technology information\n* List of active collector plugins and modules\n* Streaming information\n* number of alarms in the host\n * number of alarms in normal state\n * number of alarms in warning state\n * number of alarms in critical state\n\n**Security & Access Control:**\n- 📊 **Public Data API** - Bearer token optional, IP-based ACL restrictions apply\n- **Default Access:** Public (no authentication required)\n- **Bearer Protection:** When enabled via `/api/v3/bearer_protection`, requires bearer token\n- **IP Restrictions:** Subject to `allow dashboard from` in netdata.conf\n- **Access Methods:** Direct HTTP/HTTPS, Netdata Cloud, external tools\n", |
| 405 | "security": [ |
| 406 | {}, |
| 407 | { |
| 408 | "bearerAuth": [] |
| 409 | } |
| 410 | ], |
| 411 | "responses": { |
| 412 | "200": { |
| 413 | "description": "netdata basic information.", |
| 414 | "content": { |
| 415 | "application/json": { |
| 416 | "schema": { |
| 417 | "$ref": "#/components/schemas/info" |
| 418 | } |
| 419 | } |
| 420 | } |
| 421 | }, |
| 422 | "503": { |
| 423 | "description": "netdata daemon not ready (used for health checks)." |
| 424 | } |
| 425 | } |
| 426 | } |
| 427 | }, |
| 428 | "/api/v1/charts": { |
| 429 | "get": { |
| 430 | "deprecated": true, |
| 431 | "operationId": "getNodeCharts1", |
| 432 | "tags": [ |
| 433 | "charts" |
| 434 | ], |
| 435 | "summary": "List all charts v1 - EOL", |
| 436 | "description": "The charts endpoint returns a summary about all charts stored in the netdata server.\n**Security & Access Control:** - 📊 **Public Data API** - Bearer token optional, IP-based ACL restrictions apply - **Default Access:** Public (no authentication required) - **Bearer Protection:** When enabled via `/api/v3/bearer_protection`, requires bearer token - **IP Restrictions:** Subject to `allow dashboard from` in netdata.conf - **Access Methods:** Direct HTTP/HTTPS, Netdata Cloud, external tools", |
| 437 | "security": [ |
| 438 | {}, |
| 439 | { |
| 440 | "bearerAuth": [] |
| 441 | } |
| 442 | ], |
| 443 | "responses": { |
| 444 | "200": { |
| 445 | "description": "An array of charts.", |
| 446 | "content": { |
| 447 | "application/json": { |
| 448 | "schema": { |
| 449 | "$ref": "#/components/schemas/chart_summary" |
| 450 | } |
| 451 | } |
| 452 | } |
| 453 | } |
| 454 | } |
| 455 | } |
| 456 | }, |
| 457 | "/api/v1/chart": { |
| 458 | "get": { |
| 459 | "deprecated": true, |
| 460 | "operationId": "getNodeChart1", |
| 461 | "tags": [ |
| 462 | "charts" |
| 463 | ], |
| 464 | "summary": "Get one chart v1 - EOL", |
| 465 | "description": "The chart endpoint returns detailed information about a chart.\n**Security & Access Control:** - 📊 **Public Data API** - Bearer token optional, IP-based ACL restrictions apply - **Default Access:** Public (no authentication required) - **Bearer Protection:** When enabled via `/api/v3/bearer_protection`, requires bearer token - **IP Restrictions:** Subject to `allow dashboard from` in netdata.conf - **Access Methods:** Direct HTTP/HTTPS, Netdata Cloud, external tools", |
| 466 | "security": [ |
| 467 | {}, |
| 468 | { |
| 469 | "bearerAuth": [] |
| 470 | } |
| 471 | ], |
| 472 | "parameters": [ |
| 473 | { |
| 474 | "$ref": "#/components/parameters/chart" |
| 475 | } |
| 476 | ], |
| 477 | "responses": { |
| 478 | "200": { |
| 479 | "description": "A javascript object with detailed information about the chart.", |
| 480 | "content": { |
| 481 | "application/json": { |
| 482 | "schema": { |
| 483 | "$ref": "#/components/schemas/chart" |
| 484 | } |
| 485 | } |
| 486 | } |
| 487 | }, |
| 488 | "400": { |
| 489 | "description": "No chart id was supplied in the request." |
| 490 | }, |
| 491 | "404": { |
| 492 | "description": "No chart with the given id is found." |
| 493 | } |
| 494 | } |
| 495 | } |
| 496 | }, |
| 497 | "/api/v1/contexts": { |
| 498 | "get": { |
| 499 | "deprecated": true, |
| 500 | "operationId": "getNodeContexts1", |
| 501 | "tags": [ |
| 502 | "contexts" |
| 503 | ], |
| 504 | "summary": "Get a list of all node contexts available v1", |
| 505 | "description": "The contexts endpoint returns a summary about all contexts stored in the netdata server.\n**Security & Access Control:** - 📊 **Public Data API** - Bearer token optional, IP-based ACL restrictions apply - **Default Access:** Public (no authentication required) - **Bearer Protection:** When enabled via `/api/v3/bearer_protection`, requires bearer token - **IP Restrictions:** Subject to `allow dashboard from` in netdata.conf - **Access Methods:** Direct HTTP/HTTPS, Netdata Cloud, external tools", |
| 506 | "security": [ |
| 507 | {}, |
| 508 | { |
| 509 | "bearerAuth": [] |
| 510 | } |
| 511 | ], |
| 512 | "parameters": [ |
| 513 | { |
| 514 | "$ref": "#/components/parameters/dimensions" |
| 515 | }, |
| 516 | { |
| 517 | "$ref": "#/components/parameters/chart_label_key" |
| 518 | }, |
| 519 | { |
| 520 | "$ref": "#/components/parameters/chart_labels_filter" |
| 521 | }, |
| 522 | { |
| 523 | "$ref": "#/components/parameters/contextOptions1" |
| 524 | }, |
| 525 | { |
| 526 | "$ref": "#/components/parameters/after" |
| 527 | }, |
| 528 | { |
| 529 | "$ref": "#/components/parameters/before" |
| 530 | } |
| 531 | ], |
| 532 | "responses": { |
| 533 | "200": { |
| 534 | "description": "An array of contexts.", |
| 535 | "content": { |
| 536 | "application/json": { |
| 537 | "schema": { |
| 538 | "$ref": "#/components/schemas/context_summary" |
| 539 | } |
| 540 | } |
| 541 | } |
| 542 | } |
| 543 | } |
| 544 | } |
| 545 | }, |
| 546 | "/api/v1/context": { |
| 547 | "get": { |
| 548 | "deprecated": true, |
| 549 | "operationId": "getNodeContext1", |
| 550 | "tags": [ |
| 551 | "contexts" |
| 552 | ], |
| 553 | "summary": "Get info about a specific context", |
| 554 | "description": "The context endpoint returns detailed information about a given context.\nThe `context` parameter is required for this call.\n\n**Security & Access Control:**\n- 📊 **Public Data API** - Bearer token optional, IP-based ACL restrictions apply\n- **Default Access:** Public (no authentication required)\n- **Bearer Protection:** When enabled via `/api/v3/bearer_protection`, requires bearer token\n- **IP Restrictions:** Subject to `allow dashboard from` in netdata.conf\n- **Access Methods:** Direct HTTP/HTTPS, Netdata Cloud, external tools\n", |
| 555 | "security": [ |
| 556 | {}, |
| 557 | { |
| 558 | "bearerAuth": [] |
| 559 | } |
| 560 | ], |
| 561 | "parameters": [ |
| 562 | { |
| 563 | "$ref": "#/components/parameters/context" |
| 564 | }, |
| 565 | { |
| 566 | "$ref": "#/components/parameters/dimensions" |
| 567 | }, |
| 568 | { |
| 569 | "$ref": "#/components/parameters/chart_label_key" |
| 570 | }, |
| 571 | { |
| 572 | "$ref": "#/components/parameters/chart_labels_filter" |
| 573 | }, |
| 574 | { |
| 575 | "$ref": "#/components/parameters/contextOptions1" |
| 576 | }, |
| 577 | { |
| 578 | "$ref": "#/components/parameters/after" |
| 579 | }, |
| 580 | { |
| 581 | "$ref": "#/components/parameters/before" |
| 582 | } |
| 583 | ], |
| 584 | "responses": { |
| 585 | "200": { |
| 586 | "description": "A javascript object with detailed information about the context.", |
| 587 | "content": { |
| 588 | "application/json": { |
| 589 | "schema": { |
| 590 | "$ref": "#/components/schemas/context" |
| 591 | } |
| 592 | } |
| 593 | } |
| 594 | }, |
| 595 | "400": { |
| 596 | "description": "No context id was supplied in the request." |
| 597 | }, |
| 598 | "404": { |
| 599 | "description": "No context with the given id is found." |
| 600 | } |
| 601 | } |
| 602 | } |
| 603 | }, |
| 604 | "/api/v3/context": { |
| 605 | "get": { |
| 606 | "operationId": "getNodeContext3", |
| 607 | "tags": [ |
| 608 | "contexts" |
| 609 | ], |
| 610 | "summary": "Get info about a specific context - Latest API", |
| 611 | "description": "The context endpoint returns detailed information about a specific monitoring context across all nodes.\n\nThis is the latest version (v3) of the context API. It provides the same functionality as v1 but may include additional features in the future.\n\n**What is a Context?**\nA context is a grouping of charts that monitor the same type of metric across different instances. For example:\n- `system.cpu` - CPU usage (one chart per node)\n- `disk.io` - Disk I/O operations (one chart per disk)\n- `net.packets` - Network packets (one chart per network interface)\n\n**Use Cases:**\n- Get metadata about a specific metric type across all instances and nodes\n- Discover which charts belong to a context\n- Filter charts by labels or dimensions\n- Understand metric families, units, and chart types\n- Build dynamic dashboards that adapt to available instances\n\nThe response includes all charts that belong to the specified context, with their metadata, dimensions, labels, and current availability status.\n\n**Security & Access Control:**\n- 📊 **Public Data API** - Bearer token optional, IP-based ACL restrictions apply\n- **Default Access:** Public (no authentication required)\n- **Bearer Protection:** When enabled via `/api/v3/bearer_protection`, requires bearer token\n- **IP Restrictions:** Subject to `allow dashboard from` in netdata.conf\n- **Access Methods:** Direct HTTP/HTTPS, Netdata Cloud, external tools\n", |
| 612 | "security": [ |
| 613 | {}, |
| 614 | { |
| 615 | "bearerAuth": [] |
| 616 | } |
| 617 | ], |
| 618 | "parameters": [ |
| 619 | { |
| 620 | "name": "context", |
| 621 | "in": "query", |
| 622 | "description": "The context identifier to query. This is a required parameter.\n\nA context represents a type of metric collected across multiple instances. Each context groups charts that measure the same thing but for different entities.\n\n**Common Context Examples:**\n- `system.cpu` - CPU utilization metrics\n- `system.ram` - RAM usage metrics\n- `disk.io` - Disk I/O operations\n- `disk.ops` - Disk operation counts\n- `net.packets` - Network packet statistics\n- `net.drops` - Network packet drops\n- `cgroup.cpu` - Container CPU usage\n- `nginx.requests` - Nginx request rates\n\n**Finding Available Contexts:**\nUse the `/api/v3/contexts` endpoint to get a list of all available contexts.\n\n**Alias:** Can also be specified as `ctx` for brevity.\n", |
| 623 | "required": true, |
| 624 | "schema": { |
| 625 | "type": "string" |
| 626 | }, |
| 627 | "example": "system.cpu" |
| 628 | }, |
| 629 | { |
| 630 | "$ref": "#/components/parameters/dimensions" |
| 631 | }, |
| 632 | { |
| 633 | "$ref": "#/components/parameters/chart_label_key" |
| 634 | }, |
| 635 | { |
| 636 | "$ref": "#/components/parameters/chart_labels_filter" |
| 637 | }, |
| 638 | { |
| 639 | "name": "options", |
| 640 | "in": "query", |
| 641 | "description": "Comma or pipe-separated list of options to control the response content and format.\n\n**Available Options:**\n- `full` or `all` - Include all possible information (equivalent to enabling all options below)\n- `charts` - Include the list of charts belonging to this context\n- `dimensions` - Include dimension information for each chart\n- `queue` - Include data collection queue statistics\n- `flags` - Include internal flags and states\n- `labels` - Include chart labels\n- `alerts` - Include alert configurations and states for this context\n\n**Option Combinations:**\nOptions can be combined. For example: `options=charts,dimensions,labels` will include charts with their dimensions and labels.\n\n**Default Behavior:**\nWhen not specified, returns basic context information without detailed chart data.\n\n**Examples:**\n- `options=full` - Complete information\n- `options=charts,dimensions` - Charts with dimension details\n- `options=charts|labels` - Charts with labels (pipe separator)\n", |
| 642 | "required": false, |
| 643 | "schema": { |
| 644 | "type": "string" |
| 645 | }, |
| 646 | "examples": { |
| 647 | "minimal": { |
| 648 | "value": "", |
| 649 | "summary": "Basic context info only" |
| 650 | }, |
| 651 | "standard": { |
| 652 | "value": "charts,dimensions", |
| 653 | "summary": "Charts with dimensions" |
| 654 | }, |
| 655 | "complete": { |
| 656 | "value": "full", |
| 657 | "summary": "All available information" |
| 658 | } |
| 659 | } |
| 660 | }, |
| 661 | { |
| 662 | "name": "after", |
| 663 | "in": "query", |
| 664 | "description": "Return only charts that have collected data after this timestamp.\n\nThis filters charts based on their data collection activity, excluding charts that haven't collected data since the specified time.\n\n**Format:** Unix timestamp in seconds\n\n**Use Cases:**\n- Find recently active charts\n- Exclude stale or obsolete charts\n- Filter charts by collection timeframe\n\n**Example:** `after=1609459200` (charts active after January 1, 2021)\n\nWhen not specified, all charts are included regardless of their last update time.\n", |
| 665 | "required": false, |
| 666 | "schema": { |
| 667 | "type": "integer", |
| 668 | "format": "int64" |
| 669 | }, |
| 670 | "example": 1609459200 |
| 671 | }, |
| 672 | { |
| 673 | "name": "before", |
| 674 | "in": "query", |
| 675 | "description": "Return only charts that have collected data before this timestamp.\n\nThis filters charts based on their data collection activity, excluding charts that only have data after the specified time.\n\n**Format:** Unix timestamp in seconds\n\n**Use Cases:**\n- Historical analysis of chart availability\n- Find charts that were active during a specific time period\n- Exclude newer charts from results\n\n**Example:** `before=1640995200` (charts active before January 1, 2022)\n\nWhen combined with `after`, you can specify an exact time window:\n`after=1609459200&before=1640995200` (charts active during 2021)\n\nWhen not specified, all charts are included regardless of their collection timeline.\n", |
| 676 | "required": false, |
| 677 | "schema": { |
| 678 | "type": "integer", |
| 679 | "format": "int64" |
| 680 | }, |
| 681 | "example": 1640995200 |
| 682 | } |
| 683 | ], |
| 684 | "responses": { |
| 685 | "200": { |
| 686 | "description": "Success. Returns detailed information about the requested context.\n\nThe response is a JSON object containing:\n- Context metadata (name, title, family, units, chart type)\n- List of charts belonging to this context (when options=charts)\n- Dimension information (when options=dimensions)\n- Chart labels (when options=labels)\n- Alert configurations (when options=alerts)\n- Collection statistics (when options=queue)\n\n**Response Structure:**\nThe exact structure depends on the options parameter. With `options=full`, you get complete information including all charts, their dimensions, labels, and current states.\n", |
| 687 | "content": { |
| 688 | "application/json": { |
| 689 | "schema": { |
| 690 | "$ref": "#/components/schemas/context" |
| 691 | } |
| 692 | } |
| 693 | } |
| 694 | }, |
| 695 | "400": { |
| 696 | "description": "Bad request. Common causes:\n- Missing required 'context' parameter\n- Invalid parameter values\n- Malformed filter patterns\n" |
| 697 | }, |
| 698 | "404": { |
| 699 | "description": "Not found. The specified context does not exist on this Netdata agent.\n\nThis can occur when:\n- The context name is misspelled\n- The context is not being collected on this agent\n- The context was available but is now obsolete\n" |
| 700 | }, |
| 701 | "500": { |
| 702 | "description": "Internal server error. Usually indicates the server is out of memory." |
| 703 | } |
| 704 | } |
| 705 | } |
| 706 | }, |
| 707 | "/api/v1/config": { |
| 708 | "get": { |
| 709 | "deprecated": true, |
| 710 | "operationId": "getConfig", |
| 711 | "tags": [ |
| 712 | "dyncfg" |
| 713 | ], |
| 714 | "description": "Get dynamic configuration information.\n\n**Security & Access Control:**\n- 📊 **Public Data API** - Bearer token optional, IP-based ACL restrictions apply\n- **Default Access:** Public (no authentication required)\n- **Bearer Protection:** When enabled via `/api/v3/bearer_protection`, requires bearer token\n- **IP Restrictions:** Subject to `allow dashboard from` in netdata.conf\n- **Access Methods:** Direct HTTP/HTTPS, Netdata Cloud, external tools\n", |
| 715 | "security": [ |
| 716 | {}, |
| 717 | { |
| 718 | "bearerAuth": [] |
| 719 | } |
| 720 | ], |
| 721 | "parameters": [ |
| 722 | { |
| 723 | "name": "action", |
| 724 | "in": "query", |
| 725 | "description": "The type of information required", |
| 726 | "schema": { |
| 727 | "type": "string", |
| 728 | "enum": [ |
| 729 | "tree", |
| 730 | "schema", |
| 731 | "get", |
| 732 | "enable", |
| 733 | "disable", |
| 734 | "restart" |
| 735 | ], |
| 736 | "default": "tree" |
| 737 | } |
| 738 | }, |
| 739 | { |
| 740 | "name": "id", |
| 741 | "in": "query", |
| 742 | "description": "The ID of the dynamic configuration entity", |
| 743 | "schema": { |
| 744 | "type": "string" |
| 745 | } |
| 746 | }, |
| 747 | { |
| 748 | "name": "path", |
| 749 | "in": "query", |
| 750 | "description": "Top level path of the configuration entities, used with action 'tree'", |
| 751 | "schema": { |
| 752 | "type": "string", |
| 753 | "default": "/" |
| 754 | } |
| 755 | }, |
| 756 | { |
| 757 | "name": "timeout", |
| 758 | "in": "query", |
| 759 | "description": "The timeout in seconds", |
| 760 | "schema": { |
| 761 | "type": "number", |
| 762 | "default": 120 |
| 763 | } |
| 764 | } |
| 765 | ], |
| 766 | "responses": { |
| 767 | "200": { |
| 768 | "description": "The call was successful.", |
| 769 | "content": { |
| 770 | "application/json": { |
| 771 | "schema": { |
| 772 | "oneOf": [ |
| 773 | { |
| 774 | "$ref": "#/components/schemas/config_default_response" |
| 775 | }, |
| 776 | { |
| 777 | "$ref": "#/components/schemas/config_tree" |
| 778 | }, |
| 779 | { |
| 780 | "$ref": "#/components/schemas/config_schema" |
| 781 | } |
| 782 | ] |
| 783 | } |
| 784 | } |
| 785 | } |
| 786 | }, |
| 787 | "400": { |
| 788 | "description": "Something is wrong with the request.", |
| 789 | "content": { |
| 790 | "application/json": { |
| 791 | "schema": { |
| 792 | "$ref": "#/components/schemas/config_default_response" |
| 793 | } |
| 794 | } |
| 795 | } |
| 796 | }, |
| 797 | "404": { |
| 798 | "description": "The configurable entity requests is not found.", |
| 799 | "content": { |
| 800 | "application/json": { |
| 801 | "schema": { |
| 802 | "$ref": "#/components/schemas/config_default_response" |
| 803 | } |
| 804 | } |
| 805 | } |
| 806 | } |
| 807 | } |
| 808 | }, |
| 809 | "post": { |
| 810 | "operationId": "postConfig", |
| 811 | "tags": [ |
| 812 | "dyncfg" |
| 813 | ], |
| 814 | "description": "Post dynamic configuration to Netdata.\n", |
| 815 | "parameters": [ |
| 816 | { |
| 817 | "name": "action", |
| 818 | "in": "query", |
| 819 | "description": "The type of action required.", |
| 820 | "schema": { |
| 821 | "type": "string", |
| 822 | "enum": [ |
| 823 | "add", |
| 824 | "test", |
| 825 | "update" |
| 826 | ] |
| 827 | } |
| 828 | }, |
| 829 | { |
| 830 | "name": "id", |
| 831 | "in": "query", |
| 832 | "description": "The ID of the dynamic configuration entity to configure.", |
| 833 | "schema": { |
| 834 | "type": "string" |
| 835 | } |
| 836 | }, |
| 837 | { |
| 838 | "name": "name", |
| 839 | "in": "query", |
| 840 | "description": "Name of the dynamic configuration entity, used with action 'add'", |
| 841 | "schema": { |
| 842 | "type": "string" |
| 843 | } |
| 844 | }, |
| 845 | { |
| 846 | "name": "timeout", |
| 847 | "in": "query", |
| 848 | "description": "The timeout in seconds", |
| 849 | "schema": { |
| 850 | "type": "number", |
| 851 | "default": 120 |
| 852 | } |
| 853 | } |
| 854 | ], |
| 855 | "responses": { |
| 856 | "200": { |
| 857 | "description": "The call was successful. This also means the configuration is currently running.", |
| 858 | "content": { |
| 859 | "application/json": { |
| 860 | "schema": { |
| 861 | "$ref": "#/components/schemas/config_default_response" |
| 862 | } |
| 863 | } |
| 864 | } |
| 865 | }, |
| 866 | "202": { |
| 867 | "description": "The call was successful. The configuration has been accepted, but its status is not yet known.", |
| 868 | "content": { |
| 869 | "application/json": { |
| 870 | "schema": { |
| 871 | "$ref": "#/components/schemas/config_default_response" |
| 872 | } |
| 873 | } |
| 874 | } |
| 875 | }, |
| 876 | "299": { |
| 877 | "description": "The call was successful. The configuration has been accepted, but a restart is required to apply it.", |
| 878 | "content": { |
| 879 | "application/json": { |
| 880 | "schema": { |
| 881 | "$ref": "#/components/schemas/config_default_response" |
| 882 | } |
| 883 | } |
| 884 | } |
| 885 | }, |
| 886 | "400": { |
| 887 | "description": "Something is wrong with the request.", |
| 888 | "content": { |
| 889 | "application/json": { |
| 890 | "schema": { |
| 891 | "$ref": "#/components/schemas/config_default_response" |
| 892 | } |
| 893 | } |
| 894 | } |
| 895 | }, |
| 896 | "404": { |
| 897 | "description": "The configurable entity requests is not found.", |
| 898 | "content": { |
| 899 | "application/json": { |
| 900 | "schema": { |
| 901 | "$ref": "#/components/schemas/config_default_response" |
| 902 | } |
| 903 | } |
| 904 | } |
| 905 | } |
| 906 | } |
| 907 | } |
| 908 | }, |
| 909 | "/api/v2/data": { |
| 910 | "get": { |
| 911 | "deprecated": true, |
| 912 | "operationId": "dataQuery2", |
| 913 | "tags": [ |
| 914 | "data" |
| 915 | ], |
| 916 | "summary": "Data Query v2", |
| 917 | "description": "Multi-node, multi-context, multi-instance, multi-dimension data queries, with time and metric aggregation.\n\n**Security & Access Control:**\n- 📊 **Public Data API** - Bearer token optional, IP-based ACL restrictions apply\n- **Default Access:** Public (no authentication required)\n- **Bearer Protection:** When enabled via `/api/v3/bearer_protection`, requires bearer token\n- **IP Restrictions:** Subject to `allow dashboard from` in netdata.conf\n- **Access Methods:** Direct HTTP/HTTPS, Netdata Cloud, external tools\n", |
| 918 | "security": [ |
| 919 | {}, |
| 920 | { |
| 921 | "bearerAuth": [] |
| 922 | } |
| 923 | ], |
| 924 | "parameters": [ |
| 925 | { |
| 926 | "name": "group_by", |
| 927 | "in": "query", |
| 928 | "description": "A comma separated list of the groupings required.\nAll possible values can be combined together, except `selected`. If `selected` is given in the list, all others are ignored.\nThe order they are placed in the list is currently ignored.\nThis parameter is also accepted as `group_by[0]` and `group_by[1]` when multiple grouping passes are required.\n", |
| 929 | "required": false, |
| 930 | "schema": { |
| 931 | "type": "array", |
| 932 | "items": { |
| 933 | "type": "string", |
| 934 | "enum": [ |
| 935 | "dimension", |
| 936 | "instance", |
| 937 | "percentage-of-instance", |
| 938 | "label", |
| 939 | "node", |
| 940 | "context", |
| 941 | "units", |
| 942 | "selected" |
| 943 | ] |
| 944 | }, |
| 945 | "default": [ |
| 946 | "dimension" |
| 947 | ] |
| 948 | } |
| 949 | }, |
| 950 | { |
| 951 | "name": "group_by_label", |
| 952 | "in": "query", |
| 953 | "description": "A comma separated list of the label keys to group by their values. The order of the labels in the list is respected.\nThis parameter is also accepted as `group_by_label[0]` and `group_by_label[1]` when multiple grouping passes are required.\n", |
| 954 | "required": false, |
| 955 | "schema": { |
| 956 | "type": "string", |
| 957 | "format": "comma separated list of label keys to group by", |
| 958 | "default": "" |
| 959 | } |
| 960 | }, |
| 961 | { |
| 962 | "name": "aggregation", |
| 963 | "in": "query", |
| 964 | "description": "The aggregation function to apply when grouping metrics together.\nWhen option `raw` is given, `average` and `avg` behave like `sum` and the caller is expected to calculate the average.\nThis parameter is also accepted as `aggregation[0]` and `aggregation[1]` when multiple grouping passes are required.\n", |
| 965 | "required": false, |
| 966 | "schema": { |
| 967 | "type": "string", |
| 968 | "enum": [ |
| 969 | "min", |
| 970 | "max", |
| 971 | "avg", |
| 972 | "average", |
| 973 | "sum", |
| 974 | "percentage", |
| 975 | "extremes" |
| 976 | ], |
| 977 | "default": "average" |
| 978 | } |
| 979 | }, |
| 980 | { |
| 981 | "$ref": "#/components/parameters/scopeNodes" |
| 982 | }, |
| 983 | { |
| 984 | "$ref": "#/components/parameters/scopeContexts" |
| 985 | }, |
| 986 | { |
| 987 | "$ref": "#/components/parameters/scopeInstances" |
| 988 | }, |
| 989 | { |
| 990 | "$ref": "#/components/parameters/scopeLabels" |
| 991 | }, |
| 992 | { |
| 993 | "$ref": "#/components/parameters/scopeDimensions" |
| 994 | }, |
| 995 | { |
| 996 | "$ref": "#/components/parameters/filterNodes" |
| 997 | }, |
| 998 | { |
| 999 | "$ref": "#/components/parameters/filterContexts" |
| 1000 | }, |
| 1001 | { |
| 1002 | "$ref": "#/components/parameters/filterInstances" |
| 1003 | }, |
| 1004 | { |
| 1005 | "$ref": "#/components/parameters/filterLabels" |
| 1006 | }, |
| 1007 | { |
| 1008 | "$ref": "#/components/parameters/filterAlerts" |
| 1009 | }, |
| 1010 | { |
| 1011 | "$ref": "#/components/parameters/filterDimensions" |
| 1012 | }, |
| 1013 | { |
| 1014 | "$ref": "#/components/parameters/after" |
| 1015 | }, |
| 1016 | { |
| 1017 | "$ref": "#/components/parameters/before" |
| 1018 | }, |
| 1019 | { |
| 1020 | "$ref": "#/components/parameters/points" |
| 1021 | }, |
| 1022 | { |
| 1023 | "$ref": "#/components/parameters/tier" |
| 1024 | }, |
| 1025 | { |
| 1026 | "$ref": "#/components/parameters/dataQueryOptions" |
| 1027 | }, |
| 1028 | { |
| 1029 | "$ref": "#/components/parameters/dataTimeGroup2" |
| 1030 | }, |
| 1031 | { |
| 1032 | "$ref": "#/components/parameters/dataTimeGroupOptions2" |
| 1033 | }, |
| 1034 | { |
| 1035 | "$ref": "#/components/parameters/dataTimeResampling2" |
| 1036 | }, |
| 1037 | { |
| 1038 | "$ref": "#/components/parameters/dataFormat2" |
| 1039 | }, |
| 1040 | { |
| 1041 | "$ref": "#/components/parameters/cardinalityLimit" |
| 1042 | }, |
| 1043 | { |
| 1044 | "$ref": "#/components/parameters/timeoutMS" |
| 1045 | }, |
| 1046 | { |
| 1047 | "$ref": "#/components/parameters/callback" |
| 1048 | }, |
| 1049 | { |
| 1050 | "$ref": "#/components/parameters/filename" |
| 1051 | }, |
| 1052 | { |
| 1053 | "$ref": "#/components/parameters/tqx" |
| 1054 | } |
| 1055 | ], |
| 1056 | "responses": { |
| 1057 | "200": { |
| 1058 | "description": "The call was successful. The response includes the data in the format requested.\n", |
| 1059 | "content": { |
| 1060 | "application/json": { |
| 1061 | "schema": { |
| 1062 | "oneOf": [ |
| 1063 | { |
| 1064 | "$ref": "#/components/schemas/jsonwrap2" |
| 1065 | }, |
| 1066 | { |
| 1067 | "$ref": "#/components/schemas/data_json_formats2" |
| 1068 | } |
| 1069 | ] |
| 1070 | } |
| 1071 | }, |
| 1072 | "text/plain": { |
| 1073 | "schema": { |
| 1074 | "type": "string", |
| 1075 | "format": "according to the format requested." |
| 1076 | } |
| 1077 | }, |
| 1078 | "text/html": { |
| 1079 | "schema": { |
| 1080 | "type": "string", |
| 1081 | "format": "html" |
| 1082 | } |
| 1083 | }, |
| 1084 | "application/x-javascript": { |
| 1085 | "schema": { |
| 1086 | "type": "string", |
| 1087 | "format": "javascript" |
| 1088 | } |
| 1089 | } |
| 1090 | } |
| 1091 | }, |
| 1092 | "400": { |
| 1093 | "description": "Bad request - the body will include a message stating what is wrong.\n" |
| 1094 | }, |
| 1095 | "500": { |
| 1096 | "description": "Internal server error. This usually means the server is out of memory.\n" |
| 1097 | } |
| 1098 | } |
| 1099 | } |
| 1100 | }, |
| 1101 | "/api/v3/data": { |
| 1102 | "get": { |
| 1103 | "operationId": "dataQuery3", |
| 1104 | "tags": [ |
| 1105 | "data" |
| 1106 | ], |
| 1107 | "summary": "Data Query v3", |
| 1108 | "description": "Multi-node, multi-context, multi-instance, multi-dimension data queries, with time and metric aggregation.\n\n**Security & Access Control:**\n- 📊 **Public Data API** - Bearer token optional, IP-based ACL restrictions apply\n- **Default Access:** Public (no authentication required)\n- **Bearer Protection:** When enabled via `/api/v3/bearer_protection`, requires bearer token\n- **IP Restrictions:** Subject to `allow dashboard from` in netdata.conf\n- **Access Methods:** Direct HTTP/HTTPS, Netdata Cloud, external tools\n", |
| 1109 | "security": [ |
| 1110 | {}, |
| 1111 | { |
| 1112 | "bearerAuth": [] |
| 1113 | } |
| 1114 | ], |
| 1115 | "parameters": [ |
| 1116 | { |
| 1117 | "name": "group_by", |
| 1118 | "in": "query", |
| 1119 | "description": "A comma separated list of the groupings required.\nAll possible values can be combined together, except `selected`. If `selected` is given in the list, all others are ignored.\nThe order they are placed in the list is currently ignored.\nThis parameter is also accepted as `group_by[0]` and `group_by[1]` when multiple grouping passes are required.\n", |
| 1120 | "required": false, |
| 1121 | "schema": { |
| 1122 | "type": "array", |
| 1123 | "items": { |
| 1124 | "type": "string", |
| 1125 | "enum": [ |
| 1126 | "dimension", |
| 1127 | "instance", |
| 1128 | "percentage-of-instance", |
| 1129 | "label", |
| 1130 | "node", |
| 1131 | "context", |
| 1132 | "units", |
| 1133 | "selected" |
| 1134 | ] |
| 1135 | }, |
| 1136 | "default": [ |
| 1137 | "dimension" |
| 1138 | ] |
| 1139 | } |
| 1140 | }, |
| 1141 | { |
| 1142 | "name": "group_by_label", |
| 1143 | "in": "query", |
| 1144 | "description": "A comma separated list of the label keys to group by their values. The order of the labels in the list is respected.\nThis parameter is also accepted as `group_by_label[0]` and `group_by_label[1]` when multiple grouping passes are required.\n", |
| 1145 | "required": false, |
| 1146 | "schema": { |
| 1147 | "type": "string", |
| 1148 | "format": "comma separated list of label keys to group by", |
| 1149 | "default": "" |
| 1150 | } |
| 1151 | }, |
| 1152 | { |
| 1153 | "name": "aggregation", |
| 1154 | "in": "query", |
| 1155 | "description": "The aggregation function to apply when grouping metrics together.\nWhen option `raw` is given, `average` and `avg` behave like `sum` and the caller is expected to calculate the average.\nThis parameter is also accepted as `aggregation[0]` and `aggregation[1]` when multiple grouping passes are required.\n", |
| 1156 | "required": false, |
| 1157 | "schema": { |
| 1158 | "type": "string", |
| 1159 | "enum": [ |
| 1160 | "min", |
| 1161 | "max", |
| 1162 | "avg", |
| 1163 | "average", |
| 1164 | "sum", |
| 1165 | "percentage", |
| 1166 | "extremes" |
| 1167 | ], |
| 1168 | "default": "average" |
| 1169 | } |
| 1170 | }, |
| 1171 | { |
| 1172 | "$ref": "#/components/parameters/scopeNodes" |
| 1173 | }, |
| 1174 | { |
| 1175 | "$ref": "#/components/parameters/scopeContexts" |
| 1176 | }, |
| 1177 | { |
| 1178 | "$ref": "#/components/parameters/scopeInstances" |
| 1179 | }, |
| 1180 | { |
| 1181 | "$ref": "#/components/parameters/scopeLabels" |
| 1182 | }, |
| 1183 | { |
| 1184 | "$ref": "#/components/parameters/scopeDimensions" |
| 1185 | }, |
| 1186 | { |
| 1187 | "$ref": "#/components/parameters/filterNodes" |
| 1188 | }, |
| 1189 | { |
| 1190 | "$ref": "#/components/parameters/filterContexts" |
| 1191 | }, |
| 1192 | { |
| 1193 | "$ref": "#/components/parameters/filterInstances" |
| 1194 | }, |
| 1195 | { |
| 1196 | "$ref": "#/components/parameters/filterLabels" |
| 1197 | }, |
| 1198 | { |
| 1199 | "$ref": "#/components/parameters/filterAlerts" |
| 1200 | }, |
| 1201 | { |
| 1202 | "$ref": "#/components/parameters/filterDimensions" |
| 1203 | }, |
| 1204 | { |
| 1205 | "$ref": "#/components/parameters/after" |
| 1206 | }, |
| 1207 | { |
| 1208 | "$ref": "#/components/parameters/before" |
| 1209 | }, |
| 1210 | { |
| 1211 | "$ref": "#/components/parameters/points" |
| 1212 | }, |
| 1213 | { |
| 1214 | "$ref": "#/components/parameters/tier" |
| 1215 | }, |
| 1216 | { |
| 1217 | "$ref": "#/components/parameters/dataQueryOptions" |
| 1218 | }, |
| 1219 | { |
| 1220 | "$ref": "#/components/parameters/dataTimeGroup2" |
| 1221 | }, |
| 1222 | { |
| 1223 | "$ref": "#/components/parameters/dataTimeGroupOptions2" |
| 1224 | }, |
| 1225 | { |
| 1226 | "$ref": "#/components/parameters/dataTimeResampling2" |
| 1227 | }, |
| 1228 | { |
| 1229 | "$ref": "#/components/parameters/dataFormat2" |
| 1230 | }, |
| 1231 | { |
| 1232 | "$ref": "#/components/parameters/cardinalityLimit" |
| 1233 | }, |
| 1234 | { |
| 1235 | "$ref": "#/components/parameters/timeoutMS" |
| 1236 | }, |
| 1237 | { |
| 1238 | "$ref": "#/components/parameters/callback" |
| 1239 | }, |
| 1240 | { |
| 1241 | "$ref": "#/components/parameters/filename" |
| 1242 | }, |
| 1243 | { |
| 1244 | "$ref": "#/components/parameters/tqx" |
| 1245 | } |
| 1246 | ], |
| 1247 | "responses": { |
| 1248 | "200": { |
| 1249 | "description": "The call was successful. The response includes the data in the format requested.\n", |
| 1250 | "content": { |
| 1251 | "application/json": { |
| 1252 | "schema": { |
| 1253 | "oneOf": [ |
| 1254 | { |
| 1255 | "$ref": "#/components/schemas/jsonwrap2" |
| 1256 | }, |
| 1257 | { |
| 1258 | "$ref": "#/components/schemas/data_json_formats2" |
| 1259 | } |
| 1260 | ] |
| 1261 | } |
| 1262 | }, |
| 1263 | "text/plain": { |
| 1264 | "schema": { |
| 1265 | "type": "string", |
| 1266 | "format": "according to the format requested." |
| 1267 | } |
| 1268 | }, |
| 1269 | "text/html": { |
| 1270 | "schema": { |
| 1271 | "type": "string", |
| 1272 | "format": "html" |
| 1273 | } |
| 1274 | }, |
| 1275 | "application/x-javascript": { |
| 1276 | "schema": { |
| 1277 | "type": "string", |
| 1278 | "format": "javascript" |
| 1279 | } |
| 1280 | } |
| 1281 | } |
| 1282 | }, |
| 1283 | "400": { |
| 1284 | "description": "Bad request - the body will include a message stating what is wrong.\n" |
| 1285 | }, |
| 1286 | "500": { |
| 1287 | "description": "Internal server error. This usually means the server is out of memory.\n" |
| 1288 | } |
| 1289 | } |
| 1290 | } |
| 1291 | }, |
| 1292 | "/api/v1/data": { |
| 1293 | "get": { |
| 1294 | "deprecated": true, |
| 1295 | "operationId": "dataQuery1", |
| 1296 | "tags": [ |
| 1297 | "data" |
| 1298 | ], |
| 1299 | "summary": "Data Query v1 - Single node, single chart or context queries. without group-by.", |
| 1300 | "description": "Query metric data of a chart or context of a node and return a dataset having time-series data for all dimensions available.\nFor group-by functionality, use `/api/v2/data`.\nAt least a `chart` or a `context` have to be given for the data query to be executed.\n\n**Security & Access Control:**\n- 📊 **Public Data API** - Bearer token optional, IP-based ACL restrictions apply\n- **Default Access:** Public (no authentication required)\n- **Bearer Protection:** When enabled via `/api/v3/bearer_protection`, requires bearer token\n- **IP Restrictions:** Subject to `allow dashboard from` in netdata.conf\n- **Access Methods:** Direct HTTP/HTTPS, Netdata Cloud, external tools\n", |
| 1301 | "security": [ |
| 1302 | {}, |
| 1303 | { |
| 1304 | "bearerAuth": [] |
| 1305 | } |
| 1306 | ], |
| 1307 | "parameters": [ |
| 1308 | { |
| 1309 | "$ref": "#/components/parameters/chart" |
| 1310 | }, |
| 1311 | { |
| 1312 | "$ref": "#/components/parameters/context" |
| 1313 | }, |
| 1314 | { |
| 1315 | "$ref": "#/components/parameters/dimension" |
| 1316 | }, |
| 1317 | { |
| 1318 | "$ref": "#/components/parameters/chart_label_key" |
| 1319 | }, |
| 1320 | { |
| 1321 | "$ref": "#/components/parameters/chart_labels_filter" |
| 1322 | }, |
| 1323 | { |
| 1324 | "$ref": "#/components/parameters/after" |
| 1325 | }, |
| 1326 | { |
| 1327 | "$ref": "#/components/parameters/before" |
| 1328 | }, |
| 1329 | { |
| 1330 | "$ref": "#/components/parameters/points" |
| 1331 | }, |
| 1332 | { |
| 1333 | "$ref": "#/components/parameters/tier" |
| 1334 | }, |
| 1335 | { |
| 1336 | "$ref": "#/components/parameters/dataQueryOptions" |
| 1337 | }, |
| 1338 | { |
| 1339 | "$ref": "#/components/parameters/dataFormat1" |
| 1340 | }, |
| 1341 | { |
| 1342 | "$ref": "#/components/parameters/dataTimeGroup1" |
| 1343 | }, |
| 1344 | { |
| 1345 | "$ref": "#/components/parameters/dataTimeGroupOptions1" |
| 1346 | }, |
| 1347 | { |
| 1348 | "$ref": "#/components/parameters/dataTimeResampling1" |
| 1349 | }, |
| 1350 | { |
| 1351 | "$ref": "#/components/parameters/timeoutMS" |
| 1352 | }, |
| 1353 | { |
| 1354 | "$ref": "#/components/parameters/callback" |
| 1355 | }, |
| 1356 | { |
| 1357 | "$ref": "#/components/parameters/filename" |
| 1358 | }, |
| 1359 | { |
| 1360 | "$ref": "#/components/parameters/tqx" |
| 1361 | } |
| 1362 | ], |
| 1363 | "responses": { |
| 1364 | "200": { |
| 1365 | "description": "The call was successful. The response includes the data in the format requested.\n", |
| 1366 | "content": { |
| 1367 | "application/json": { |
| 1368 | "schema": { |
| 1369 | "oneOf": [ |
| 1370 | { |
| 1371 | "$ref": "#/components/schemas/jsonwrap1" |
| 1372 | }, |
| 1373 | { |
| 1374 | "$ref": "#/components/schemas/data_json_formats1" |
| 1375 | } |
| 1376 | ] |
| 1377 | } |
| 1378 | }, |
| 1379 | "text/plain": { |
| 1380 | "schema": { |
| 1381 | "type": "string", |
| 1382 | "format": "according to the format requested." |
| 1383 | } |
| 1384 | }, |
| 1385 | "text/html": { |
| 1386 | "schema": { |
| 1387 | "type": "string", |
| 1388 | "format": "html" |
| 1389 | } |
| 1390 | }, |
| 1391 | "application/x-javascript": { |
| 1392 | "schema": { |
| 1393 | "type": "string", |
| 1394 | "format": "javascript" |
| 1395 | } |
| 1396 | } |
| 1397 | } |
| 1398 | }, |
| 1399 | "400": { |
| 1400 | "description": "Bad request - the body will include a message stating what is wrong." |
| 1401 | }, |
| 1402 | "404": { |
| 1403 | "description": "Chart or context is not found. The supplied chart or context will be reported." |
| 1404 | }, |
| 1405 | "500": { |
| 1406 | "description": "Internal server error. This usually means the server is out of memory." |
| 1407 | } |
| 1408 | } |
| 1409 | } |
| 1410 | }, |
| 1411 | "/api/v1/allmetrics": { |
| 1412 | "get": { |
| 1413 | "deprecated": true, |
| 1414 | "operationId": "allMetrics1", |
| 1415 | "tags": [ |
| 1416 | "data" |
| 1417 | ], |
| 1418 | "summary": "All Metrics v1 - Fetch latest value for all metrics", |
| 1419 | "description": "The `allmetrics` endpoint returns the latest value of all metrics maintained for a netdata node.\n\n**Security & Access Control:**\n- 📊 **Public Data API** - Bearer token optional, IP-based ACL restrictions apply\n- **Default Access:** Public (no authentication required)\n- **Bearer Protection:** When enabled via `/api/v3/bearer_protection`, requires bearer token\n- **IP Restrictions:** Subject to `allow dashboard from` in netdata.conf\n- **Access Methods:** Direct HTTP/HTTPS, Netdata Cloud, external tools\n", |
| 1420 | "security": [ |
| 1421 | {}, |
| 1422 | { |
| 1423 | "bearerAuth": [] |
| 1424 | } |
| 1425 | ], |
| 1426 | "parameters": [ |
| 1427 | { |
| 1428 | "name": "format", |
| 1429 | "in": "query", |
| 1430 | "description": "The format of the response to be returned.", |
| 1431 | "required": true, |
| 1432 | "schema": { |
| 1433 | "type": "string", |
| 1434 | "enum": [ |
| 1435 | "shell", |
| 1436 | "prometheus", |
| 1437 | "prometheus_all_hosts", |
| 1438 | "json" |
| 1439 | ], |
| 1440 | "default": "shell" |
| 1441 | } |
| 1442 | }, |
| 1443 | { |
| 1444 | "name": "filter", |
| 1445 | "in": "query", |
| 1446 | "description": "Allows to filter charts out using simple patterns.", |
| 1447 | "required": false, |
| 1448 | "schema": { |
| 1449 | "type": "string", |
| 1450 | "format": "any text" |
| 1451 | } |
| 1452 | }, |
| 1453 | { |
| 1454 | "name": "variables", |
| 1455 | "in": "query", |
| 1456 | "description": "When enabled, netdata will expose various system configuration variables.\n", |
| 1457 | "required": false, |
| 1458 | "schema": { |
| 1459 | "type": "string", |
| 1460 | "enum": [ |
| 1461 | "yes", |
| 1462 | "no" |
| 1463 | ], |
| 1464 | "default": "no" |
| 1465 | } |
| 1466 | }, |
| 1467 | { |
| 1468 | "name": "timestamps", |
| 1469 | "in": "query", |
| 1470 | "description": "Enable or disable timestamps in prometheus output.\n", |
| 1471 | "required": false, |
| 1472 | "schema": { |
| 1473 | "type": "string", |
| 1474 | "enum": [ |
| 1475 | "yes", |
| 1476 | "no" |
| 1477 | ], |
| 1478 | "default": "yes" |
| 1479 | } |
| 1480 | }, |
| 1481 | { |
| 1482 | "name": "names", |
| 1483 | "in": "query", |
| 1484 | "description": "When enabled netdata will report dimension names. When disabled netdata will report dimension IDs. The default is controlled in netdata.conf.\n", |
| 1485 | "required": false, |
| 1486 | "schema": { |
| 1487 | "type": "string", |
| 1488 | "enum": [ |
| 1489 | "yes", |
| 1490 | "no" |
| 1491 | ], |
| 1492 | "default": "yes" |
| 1493 | } |
| 1494 | }, |
| 1495 | { |
| 1496 | "name": "oldunits", |
| 1497 | "in": "query", |
| 1498 | "description": "When enabled, netdata will show metric names for the default `source=average` as they appeared before 1.12, by using the legacy unit naming conventions.\n", |
| 1499 | "required": false, |
| 1500 | "schema": { |
| 1501 | "type": "string", |
| 1502 | "enum": [ |
| 1503 | "yes", |
| 1504 | "no" |
| 1505 | ], |
| 1506 | "default": "yes" |
| 1507 | } |
| 1508 | }, |
| 1509 | { |
| 1510 | "name": "hideunits", |
| 1511 | "in": "query", |
| 1512 | "description": "When enabled, netdata will not include the units in the metric names, for the default `source=average`.\n", |
| 1513 | "required": false, |
| 1514 | "schema": { |
| 1515 | "type": "string", |
| 1516 | "enum": [ |
| 1517 | "yes", |
| 1518 | "no" |
| 1519 | ], |
| 1520 | "default": "yes" |
| 1521 | } |
| 1522 | }, |
| 1523 | { |
| 1524 | "name": "server", |
| 1525 | "in": "query", |
| 1526 | "description": "Set a distinct name of the client querying prometheus metrics. Netdata will use the client IP if this is not set.\n", |
| 1527 | "required": false, |
| 1528 | "schema": { |
| 1529 | "type": "string", |
| 1530 | "format": "any text" |
| 1531 | } |
| 1532 | }, |
| 1533 | { |
| 1534 | "name": "prefix", |
| 1535 | "in": "query", |
| 1536 | "description": "Prefix all prometheus metrics with this string.\n", |
| 1537 | "required": false, |
| 1538 | "schema": { |
| 1539 | "type": "string", |
| 1540 | "format": "any text" |
| 1541 | } |
| 1542 | }, |
| 1543 | { |
| 1544 | "name": "data", |
| 1545 | "in": "query", |
| 1546 | "description": "Select the prometheus response data source. There is a setting in netdata.conf for the default.\n", |
| 1547 | "required": false, |
| 1548 | "schema": { |
| 1549 | "type": "string", |
| 1550 | "enum": [ |
| 1551 | "as-collected", |
| 1552 | "average", |
| 1553 | "sum" |
| 1554 | ], |
| 1555 | "default": "average" |
| 1556 | } |
| 1557 | } |
| 1558 | ], |
| 1559 | "responses": { |
| 1560 | "200": { |
| 1561 | "description": "All the metrics returned in the format requested." |
| 1562 | }, |
| 1563 | "400": { |
| 1564 | "description": "The format requested is not supported." |
| 1565 | } |
| 1566 | } |
| 1567 | } |
| 1568 | }, |
| 1569 | "/api/v1/badge.svg": { |
| 1570 | "get": { |
| 1571 | "deprecated": true, |
| 1572 | "operationId": "badge1", |
| 1573 | "tags": [ |
| 1574 | "badges" |
| 1575 | ], |
| 1576 | "summary": "Generate a badge in form of SVG image for a chart (or dimension)", |
| 1577 | "description": "Successful responses are SVG images.\n**Security & Access Control:** - 📊 **Public Data API** - Bearer token optional, IP-based ACL restrictions apply - **Default Access:** Public (no authentication required) - **Bearer Protection:** When enabled via `/api/v3/bearer_protection`, requires bearer token - **IP Restrictions:** Subject to `allow badges from` in netdata.conf - **Access Methods:** Direct HTTP/HTTPS, Netdata Cloud, external tools", |
| 1578 | "security": [ |
| 1579 | {}, |
| 1580 | { |
| 1581 | "bearerAuth": [] |
| 1582 | } |
| 1583 | ], |
| 1584 | "parameters": [ |
| 1585 | { |
| 1586 | "$ref": "#/components/parameters/chart" |
| 1587 | }, |
| 1588 | { |
| 1589 | "$ref": "#/components/parameters/dimension" |
| 1590 | }, |
| 1591 | { |
| 1592 | "$ref": "#/components/parameters/after" |
| 1593 | }, |
| 1594 | { |
| 1595 | "$ref": "#/components/parameters/before" |
| 1596 | }, |
| 1597 | { |
| 1598 | "$ref": "#/components/parameters/dataTimeGroup1" |
| 1599 | }, |
| 1600 | { |
| 1601 | "$ref": "#/components/parameters/dataQueryOptions" |
| 1602 | }, |
| 1603 | { |
| 1604 | "name": "alarm", |
| 1605 | "in": "query", |
| 1606 | "description": "The name of an alarm linked to the chart.", |
| 1607 | "required": false, |
| 1608 | "allowEmptyValue": true, |
| 1609 | "schema": { |
| 1610 | "type": "string", |
| 1611 | "format": "any text" |
| 1612 | } |
| 1613 | }, |
| 1614 | { |
| 1615 | "name": "label", |
| 1616 | "in": "query", |
| 1617 | "description": "A text to be used as the label.", |
| 1618 | "required": false, |
| 1619 | "allowEmptyValue": true, |
| 1620 | "schema": { |
| 1621 | "type": "string", |
| 1622 | "format": "any text" |
| 1623 | } |
| 1624 | }, |
| 1625 | { |
| 1626 | "name": "units", |
| 1627 | "in": "query", |
| 1628 | "description": "A text to be used as the units.", |
| 1629 | "required": false, |
| 1630 | "allowEmptyValue": true, |
| 1631 | "schema": { |
| 1632 | "type": "string", |
| 1633 | "format": "any text" |
| 1634 | } |
| 1635 | }, |
| 1636 | { |
| 1637 | "name": "label_color", |
| 1638 | "in": "query", |
| 1639 | "description": "A color to be used for the background of the label side(left side) of the badge. One of predefined colors or specific color in hex `RGB` or `RRGGBB` format (without preceding `#` character). If value wrong or not given default color will be used.\n", |
| 1640 | "required": false, |
| 1641 | "allowEmptyValue": true, |
| 1642 | "schema": { |
| 1643 | "oneOf": [ |
| 1644 | { |
| 1645 | "type": "string", |
| 1646 | "enum": [ |
| 1647 | "green", |
| 1648 | "brightgreen", |
| 1649 | "yellow", |
| 1650 | "yellowgreen", |
| 1651 | "orange", |
| 1652 | "red", |
| 1653 | "blue", |
| 1654 | "grey", |
| 1655 | "gray", |
| 1656 | "lightgrey", |
| 1657 | "lightgray" |
| 1658 | ] |
| 1659 | }, |
| 1660 | { |
| 1661 | "type": "string", |
| 1662 | "format": "^([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$" |
| 1663 | } |
| 1664 | ] |
| 1665 | } |
| 1666 | }, |
| 1667 | { |
| 1668 | "name": "value_color", |
| 1669 | "in": "query", |
| 1670 | "description": "A color to be used for the background of the value *(right)* part of badge. You can set multiple using a pipe with a condition each, like this: `color<value|color:null` The following operators are supported: >, <, >=, <=, =, :null (to check if no value exists). Each color can be specified in same manner as for `label_color` parameter. Currently only integers are supported as values.\n", |
| 1671 | "required": false, |
| 1672 | "allowEmptyValue": true, |
| 1673 | "schema": { |
| 1674 | "type": "string", |
| 1675 | "format": "any text" |
| 1676 | } |
| 1677 | }, |
| 1678 | { |
| 1679 | "name": "text_color_lbl", |
| 1680 | "in": "query", |
| 1681 | "description": "Font color for label *(left)* part of the badge. One of predefined colors or as HTML hexadecimal color without preceding `#` character. Formats allowed `RGB` or `RRGGBB`. If no or wrong value given default color will be used.\n", |
| 1682 | "required": false, |
| 1683 | "allowEmptyValue": true, |
| 1684 | "schema": { |
| 1685 | "oneOf": [ |
| 1686 | { |
| 1687 | "type": "string", |
| 1688 | "enum": [ |
| 1689 | "green", |
| 1690 | "brightgreen", |
| 1691 | "yellow", |
| 1692 | "yellowgreen", |
| 1693 | "orange", |
| 1694 | "red", |
| 1695 | "blue", |
| 1696 | "grey", |
| 1697 | "gray", |
| 1698 | "lightgrey", |
| 1699 | "lightgray" |
| 1700 | ] |
| 1701 | }, |
| 1702 | { |
| 1703 | "type": "string", |
| 1704 | "format": "^([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$" |
| 1705 | } |
| 1706 | ] |
| 1707 | } |
| 1708 | }, |
| 1709 | { |
| 1710 | "name": "text_color_val", |
| 1711 | "in": "query", |
| 1712 | "description": "Font color for value *(right)* part of the badge. One of predefined colors or as HTML hexadecimal color without preceding `#` character. Formats allowed `RGB` or `RRGGBB`. If no or wrong value given default color will be used.\n", |
| 1713 | "required": false, |
| 1714 | "allowEmptyValue": true, |
| 1715 | "schema": { |
| 1716 | "oneOf": [ |
| 1717 | { |
| 1718 | "type": "string", |
| 1719 | "enum": [ |
| 1720 | "green", |
| 1721 | "brightgreen", |
| 1722 | "yellow", |
| 1723 | "yellowgreen", |
| 1724 | "orange", |
| 1725 | "red", |
| 1726 | "blue", |
| 1727 | "grey", |
| 1728 | "gray", |
| 1729 | "lightgrey", |
| 1730 | "lightgray" |
| 1731 | ] |
| 1732 | }, |
| 1733 | { |
| 1734 | "type": "string", |
| 1735 | "format": "^([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$" |
| 1736 | } |
| 1737 | ] |
| 1738 | } |
| 1739 | }, |
| 1740 | { |
| 1741 | "name": "multiply", |
| 1742 | "in": "query", |
| 1743 | "description": "Multiply the value with this number for rendering it at the image (integer value required).", |
| 1744 | "required": false, |
| 1745 | "allowEmptyValue": true, |
| 1746 | "schema": { |
| 1747 | "type": "number", |
| 1748 | "format": "integer" |
| 1749 | } |
| 1750 | }, |
| 1751 | { |
| 1752 | "name": "divide", |
| 1753 | "in": "query", |
| 1754 | "description": "Divide the value with this number for rendering it at the image (integer value required).", |
| 1755 | "required": false, |
| 1756 | "allowEmptyValue": true, |
| 1757 | "schema": { |
| 1758 | "type": "number", |
| 1759 | "format": "integer" |
| 1760 | } |
| 1761 | }, |
| 1762 | { |
| 1763 | "name": "scale", |
| 1764 | "in": "query", |
| 1765 | "description": "Set the scale of the badge (greater or equal to 100).", |
| 1766 | "required": false, |
| 1767 | "allowEmptyValue": true, |
| 1768 | "schema": { |
| 1769 | "type": "number", |
| 1770 | "format": "integer" |
| 1771 | } |
| 1772 | }, |
| 1773 | { |
| 1774 | "name": "fixed_width_lbl", |
| 1775 | "in": "query", |
| 1776 | "description": "This parameter overrides auto-sizing of badge and creates it with fixed width. This parameter determines the size of the label's left side *(label/name)*. You must set this parameter together with `fixed_width_val` otherwise it will be ignored. You should set the label/value widths wide enough to provide space for all the possible values/contents of the badge you're requesting. In case the text cannot fit the space given it will be clipped. The `scale` parameter still applies on the values you give to `fixed_width_lbl` and `fixed_width_val`.\n", |
| 1777 | "required": false, |
| 1778 | "allowEmptyValue": false, |
| 1779 | "schema": { |
| 1780 | "type": "number", |
| 1781 | "format": "integer" |
| 1782 | } |
| 1783 | }, |
| 1784 | { |
| 1785 | "name": "fixed_width_val", |
| 1786 | "in": "query", |
| 1787 | "description": "This parameter overrides auto-sizing of badge and creates it with fixed width. This parameter determines the size of the label's right side *(value)*. You must set this parameter together with `fixed_width_lbl` otherwise it will be ignored. You should set the label/value widths wide enough to provide space for all the possible values/contents of the badge you're requesting. In case the text cannot fit the space given it will be clipped. The `scale` parameter still applies on the values you give to `fixed_width_lbl` and `fixed_width_val`.\n", |
| 1788 | "required": false, |
| 1789 | "allowEmptyValue": false, |
| 1790 | "schema": { |
| 1791 | "type": "number", |
| 1792 | "format": "integer" |
| 1793 | } |
| 1794 | }, |
| 1795 | { |
| 1796 | "name": "points", |
| 1797 | "in": "query", |
| 1798 | "description": "The number of points to use for the calculation. Default is 1.", |
| 1799 | "required": false, |
| 1800 | "allowEmptyValue": true, |
| 1801 | "schema": { |
| 1802 | "type": "integer", |
| 1803 | "default": 1 |
| 1804 | } |
| 1805 | }, |
| 1806 | { |
| 1807 | "name": "group_options", |
| 1808 | "in": "query", |
| 1809 | "description": "Additional options for the grouping function.", |
| 1810 | "required": false, |
| 1811 | "allowEmptyValue": true, |
| 1812 | "schema": { |
| 1813 | "type": "string" |
| 1814 | } |
| 1815 | }, |
| 1816 | { |
| 1817 | "name": "precision", |
| 1818 | "in": "query", |
| 1819 | "description": "Number of decimal places to show in the value. Default is -1 (automatic).", |
| 1820 | "required": false, |
| 1821 | "allowEmptyValue": true, |
| 1822 | "schema": { |
| 1823 | "type": "integer", |
| 1824 | "default": -1 |
| 1825 | } |
| 1826 | }, |
| 1827 | { |
| 1828 | "name": "refresh", |
| 1829 | "in": "query", |
| 1830 | "description": "Auto-refresh interval in seconds. Use \"auto\" to automatically determine refresh interval based on the time range or alarm update frequency. For alarms, defaults to the alarm's update_every. For charts with RRDR_OPTION_NOT_ALIGNED, defaults to the chart's update_every. Otherwise calculated from the time range (before - after).\n", |
| 1831 | "required": false, |
| 1832 | "allowEmptyValue": true, |
| 1833 | "schema": { |
| 1834 | "oneOf": [ |
| 1835 | { |
| 1836 | "type": "string", |
| 1837 | "enum": [ |
| 1838 | "auto" |
| 1839 | ] |
| 1840 | }, |
| 1841 | { |
| 1842 | "type": "integer", |
| 1843 | "minimum": 0 |
| 1844 | } |
| 1845 | ] |
| 1846 | } |
| 1847 | } |
| 1848 | ], |
| 1849 | "responses": { |
| 1850 | "200": { |
| 1851 | "description": "The call was successful. The response should be an SVG image." |
| 1852 | }, |
| 1853 | "400": { |
| 1854 | "description": "Bad request - the body will include a message stating what is wrong." |
| 1855 | }, |
| 1856 | "404": { |
| 1857 | "description": "No chart with the given id is found." |
| 1858 | }, |
| 1859 | "500": { |
| 1860 | "description": "Internal server error. This usually means the server is out of memory." |
| 1861 | } |
| 1862 | } |
| 1863 | } |
| 1864 | }, |
| 1865 | "/api/v3/badge.svg": { |
| 1866 | "get": { |
| 1867 | "operationId": "badge3", |
| 1868 | "tags": [ |
| 1869 | "badges" |
| 1870 | ], |
| 1871 | "summary": "Generate a badge in form of SVG image for a chart (or dimension) - Latest API", |
| 1872 | "description": "Generates an SVG badge displaying real-time metric values from Netdata charts or alarms.\nThis is the latest version (v3) of the badge API. It provides the same functionality as v1 but may include additional features in the future.\n\nThe badge can display:\n- Current value of a chart dimension\n- Current status and value of an alarm\n- Custom labels and units\n- Dynamic colors based on value thresholds or alarm status\n\nSuccessful responses are SVG images that can be embedded in web pages or documentation.\n\n**Security & Access Control:**\n- 📊 **Public Data API** - Bearer token optional, IP-based ACL restrictions apply\n- **Default Access:** Public (no authentication required)\n- **Bearer Protection:** When enabled via `/api/v3/bearer_protection`, requires bearer token\n- **IP Restrictions:** Subject to `allow badges from` in netdata.conf\n- **Access Methods:** Direct HTTP/HTTPS, Netdata Cloud, external tools\n", |
| 1873 | "security": [ |
| 1874 | {}, |
| 1875 | { |
| 1876 | "bearerAuth": [] |
| 1877 | } |
| 1878 | ], |
| 1879 | "parameters": [ |
| 1880 | { |
| 1881 | "$ref": "#/components/parameters/chart" |
| 1882 | }, |
| 1883 | { |
| 1884 | "$ref": "#/components/parameters/dimension" |
| 1885 | }, |
| 1886 | { |
| 1887 | "$ref": "#/components/parameters/after" |
| 1888 | }, |
| 1889 | { |
| 1890 | "$ref": "#/components/parameters/before" |
| 1891 | }, |
| 1892 | { |
| 1893 | "$ref": "#/components/parameters/dataTimeGroup1" |
| 1894 | }, |
| 1895 | { |
| 1896 | "$ref": "#/components/parameters/dataQueryOptions" |
| 1897 | }, |
| 1898 | { |
| 1899 | "name": "alarm", |
| 1900 | "in": "query", |
| 1901 | "description": "The name of an alarm linked to the chart. When specified, the badge will display the alarm's current value and use alarm status for color selection.", |
| 1902 | "required": false, |
| 1903 | "allowEmptyValue": true, |
| 1904 | "schema": { |
| 1905 | "type": "string" |
| 1906 | } |
| 1907 | }, |
| 1908 | { |
| 1909 | "name": "label", |
| 1910 | "in": "query", |
| 1911 | "description": "Custom text to use as the badge label (left side). If not specified:\n- For alarms: uses the alarm name (with underscores replaced by spaces)\n- For dimensions: uses the dimension name\n- Otherwise: uses the chart name\n", |
| 1912 | "required": false, |
| 1913 | "allowEmptyValue": true, |
| 1914 | "schema": { |
| 1915 | "type": "string" |
| 1916 | } |
| 1917 | }, |
| 1918 | { |
| 1919 | "name": "units", |
| 1920 | "in": "query", |
| 1921 | "description": "Custom text to use as the units suffix. If not specified:\n- For alarms: uses the alarm's configured units or empty string\n- For percentage queries: uses \"%\"\n- Otherwise: uses the chart's units\n", |
| 1922 | "required": false, |
| 1923 | "allowEmptyValue": true, |
| 1924 | "schema": { |
| 1925 | "type": "string" |
| 1926 | } |
| 1927 | }, |
| 1928 | { |
| 1929 | "name": "label_color", |
| 1930 | "in": "query", |
| 1931 | "description": "Background color for the label (left) side of the badge. Can be:\n- One of the predefined color names\n- Hex RGB format (3 digits): e.g., \"f00\" for red\n- Hex RRGGBB format (6 digits): e.g., \"ff0000\" for red\nNote: Do not include the '#' character. If value is invalid, default color will be used.\n", |
| 1932 | "required": false, |
| 1933 | "allowEmptyValue": true, |
| 1934 | "schema": { |
| 1935 | "oneOf": [ |
| 1936 | { |
| 1937 | "type": "string", |
| 1938 | "enum": [ |
| 1939 | "green", |
| 1940 | "brightgreen", |
| 1941 | "yellow", |
| 1942 | "yellowgreen", |
| 1943 | "orange", |
| 1944 | "red", |
| 1945 | "blue", |
| 1946 | "grey", |
| 1947 | "gray", |
| 1948 | "lightgrey", |
| 1949 | "lightgray" |
| 1950 | ] |
| 1951 | }, |
| 1952 | { |
| 1953 | "type": "string", |
| 1954 | "format": "^([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$" |
| 1955 | } |
| 1956 | ] |
| 1957 | } |
| 1958 | }, |
| 1959 | { |
| 1960 | "name": "value_color", |
| 1961 | "in": "query", |
| 1962 | "description": "Background color for the value (right) side of the badge. Supports conditional coloring based on the value.\n\nCan be specified as:\n- Simple color: Same format as label_color\n- Conditional: Multiple color rules separated by pipe (|), each with format: `color<operator>value`\n\nSupported operators:\n- `>`: greater than\n- `<`: less than\n- `>=`: greater than or equal\n- `<=`: less than or equal\n- `=`: equal to\n- `:null`: true when no value exists\n\nExample: `green<80|yellow<95|red` (green if value < 80, yellow if < 95, otherwise red)\n\nNote: Currently only integers are supported as values. Colors follow same format as label_color.\n", |
| 1963 | "required": false, |
| 1964 | "allowEmptyValue": true, |
| 1965 | "schema": { |
| 1966 | "type": "string" |
| 1967 | } |
| 1968 | }, |
| 1969 | { |
| 1970 | "name": "text_color_lbl", |
| 1971 | "in": "query", |
| 1972 | "description": "Font color for the label (left) side text. Can be:\n- One of the predefined color names\n- Hex RGB or RRGGBB format without '#' character\nIf not specified or invalid, default color will be used.\n", |
| 1973 | "required": false, |
| 1974 | "allowEmptyValue": true, |
| 1975 | "schema": { |
| 1976 | "oneOf": [ |
| 1977 | { |
| 1978 | "type": "string", |
| 1979 | "enum": [ |
| 1980 | "green", |
| 1981 | "brightgreen", |
| 1982 | "yellow", |
| 1983 | "yellowgreen", |
| 1984 | "orange", |
| 1985 | "red", |
| 1986 | "blue", |
| 1987 | "grey", |
| 1988 | "gray", |
| 1989 | "lightgrey", |
| 1990 | "lightgray" |
| 1991 | ] |
| 1992 | }, |
| 1993 | { |
| 1994 | "type": "string", |
| 1995 | "format": "^([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$" |
| 1996 | } |
| 1997 | ] |
| 1998 | } |
| 1999 | }, |
| 2000 | { |
| 2001 | "name": "text_color_val", |
| 2002 | "in": "query", |
| 2003 | "description": "Font color for the value (right) side text. Can be:\n- One of the predefined color names\n- Hex RGB or RRGGBB format without '#' character\nIf not specified or invalid, default color will be used.\n", |
| 2004 | "required": false, |
| 2005 | "allowEmptyValue": true, |
| 2006 | "schema": { |
| 2007 | "oneOf": [ |
| 2008 | { |
| 2009 | "type": "string", |
| 2010 | "enum": [ |
| 2011 | "green", |
| 2012 | "brightgreen", |
| 2013 | "yellow", |
| 2014 | "yellowgreen", |
| 2015 | "orange", |
| 2016 | "red", |
| 2017 | "blue", |
| 2018 | "grey", |
| 2019 | "gray", |
| 2020 | "lightgrey", |
| 2021 | "lightgray" |
| 2022 | ] |
| 2023 | }, |
| 2024 | { |
| 2025 | "type": "string", |
| 2026 | "format": "^([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$" |
| 2027 | } |
| 2028 | ] |
| 2029 | } |
| 2030 | }, |
| 2031 | { |
| 2032 | "name": "multiply", |
| 2033 | "in": "query", |
| 2034 | "description": "Multiply the displayed value by this number before rendering. Integer value required.\nUseful for unit conversions or scaling. Default is 1.\n", |
| 2035 | "required": false, |
| 2036 | "allowEmptyValue": true, |
| 2037 | "schema": { |
| 2038 | "type": "integer", |
| 2039 | "default": 1 |
| 2040 | } |
| 2041 | }, |
| 2042 | { |
| 2043 | "name": "divide", |
| 2044 | "in": "query", |
| 2045 | "description": "Divide the displayed value by this number before rendering. Integer value required.\nUseful for unit conversions or scaling. Default is 1.\n", |
| 2046 | "required": false, |
| 2047 | "allowEmptyValue": true, |
| 2048 | "schema": { |
| 2049 | "type": "integer", |
| 2050 | "default": 1 |
| 2051 | } |
| 2052 | }, |
| 2053 | { |
| 2054 | "name": "scale", |
| 2055 | "in": "query", |
| 2056 | "description": "Scale factor for the badge size as a percentage. Must be >= 100.\n- 100 = normal size (default)\n- 150 = 1.5x larger\n- 200 = 2x larger\n", |
| 2057 | "required": false, |
| 2058 | "allowEmptyValue": true, |
| 2059 | "schema": { |
| 2060 | "type": "integer", |
| 2061 | "minimum": 100, |
| 2062 | "default": 100 |
| 2063 | } |
| 2064 | }, |
| 2065 | { |
| 2066 | "name": "fixed_width_lbl", |
| 2067 | "in": "query", |
| 2068 | "description": "Fixed width for the label (left) side in pixels. Must be used together with `fixed_width_val`.\n\nThis overrides automatic sizing and creates a badge with fixed dimensions. Ensure the width is sufficient for your content - text that doesn't fit will be clipped.\n\nThe `scale` parameter still applies to these fixed width values.\n", |
| 2069 | "required": false, |
| 2070 | "allowEmptyValue": false, |
| 2071 | "schema": { |
| 2072 | "type": "integer" |
| 2073 | } |
| 2074 | }, |
| 2075 | { |
| 2076 | "name": "fixed_width_val", |
| 2077 | "in": "query", |
| 2078 | "description": "Fixed width for the value (right) side in pixels. Must be used together with `fixed_width_lbl`.\n\nThis overrides automatic sizing and creates a badge with fixed dimensions. Ensure the width is sufficient for your content - text that doesn't fit will be clipped.\n\nThe `scale` parameter still applies to these fixed width values.\n", |
| 2079 | "required": false, |
| 2080 | "allowEmptyValue": false, |
| 2081 | "schema": { |
| 2082 | "type": "integer" |
| 2083 | } |
| 2084 | }, |
| 2085 | { |
| 2086 | "name": "points", |
| 2087 | "in": "query", |
| 2088 | "description": "Number of data points to use for the calculation. Default is 1.\nHigher values provide averaging over more samples.\n", |
| 2089 | "required": false, |
| 2090 | "allowEmptyValue": true, |
| 2091 | "schema": { |
| 2092 | "type": "integer", |
| 2093 | "default": 1 |
| 2094 | } |
| 2095 | }, |
| 2096 | { |
| 2097 | "name": "group_options", |
| 2098 | "in": "query", |
| 2099 | "description": "Additional options for the time-series grouping function. Format depends on the selected group method.", |
| 2100 | "required": false, |
| 2101 | "allowEmptyValue": true, |
| 2102 | "schema": { |
| 2103 | "type": "string" |
| 2104 | } |
| 2105 | }, |
| 2106 | { |
| 2107 | "name": "precision", |
| 2108 | "in": "query", |
| 2109 | "description": "Number of decimal places to display in the value.\n- Positive number: exact decimal places (e.g., 2 = \"12.34\")\n- -1 (default): automatic precision based on value magnitude\n", |
| 2110 | "required": false, |
| 2111 | "allowEmptyValue": true, |
| 2112 | "schema": { |
| 2113 | "type": "integer", |
| 2114 | "default": -1 |
| 2115 | } |
| 2116 | }, |
| 2117 | { |
| 2118 | "name": "refresh", |
| 2119 | "in": "query", |
| 2120 | "description": "Auto-refresh interval for the badge. Can be:\n- \"auto\": Automatically determine refresh based on context\n - For alarms: uses the alarm's update_every interval\n - For non-aligned charts: uses the chart's update_every\n - For time-range queries: uses the query time span\n- Integer: Specific refresh interval in seconds\n\nWhen refresh is set, the response includes a Refresh HTTP header.\n", |
| 2121 | "required": false, |
| 2122 | "allowEmptyValue": true, |
| 2123 | "schema": { |
| 2124 | "oneOf": [ |
| 2125 | { |
| 2126 | "type": "string", |
| 2127 | "enum": [ |
| 2128 | "auto" |
| 2129 | ] |
| 2130 | }, |
| 2131 | { |
| 2132 | "type": "integer", |
| 2133 | "minimum": 0 |
| 2134 | } |
| 2135 | ] |
| 2136 | } |
| 2137 | } |
| 2138 | ], |
| 2139 | "responses": { |
| 2140 | "200": { |
| 2141 | "description": "Success. The response is an SVG image that can be embedded in HTML or Markdown.\n\nWhen refresh parameter is set, the response includes:\n- Refresh header with the interval\n- Appropriate Cache-Control headers\n", |
| 2142 | "content": { |
| 2143 | "image/svg+xml": { |
| 2144 | "schema": { |
| 2145 | "type": "string", |
| 2146 | "format": "binary" |
| 2147 | } |
| 2148 | } |
| 2149 | } |
| 2150 | }, |
| 2151 | "400": { |
| 2152 | "description": "Bad request. The response body contains an error message explaining what is wrong.\nCommon causes:\n- Missing required 'chart' parameter\n- Invalid parameter values\n" |
| 2153 | }, |
| 2154 | "404": { |
| 2155 | "description": "Not found. Possible causes:\n- Chart with the specified ID does not exist\n- Specified alarm does not exist on the chart\n" |
| 2156 | }, |
| 2157 | "500": { |
| 2158 | "description": "Internal server error. Usually indicates the server is out of memory." |
| 2159 | } |
| 2160 | } |
| 2161 | } |
| 2162 | }, |
| 2163 | "/api/v3/allmetrics": { |
| 2164 | "get": { |
| 2165 | "operationId": "allMetrics3", |
| 2166 | "tags": [ |
| 2167 | "data" |
| 2168 | ], |
| 2169 | "summary": "All Metrics v3 - Export all metrics in various formats - Latest API", |
| 2170 | "description": "The `allmetrics` endpoint exports the latest values of all metrics collected by Netdata in various formats suitable for integration with external monitoring systems, shell scripts, or APIs.\n\nThis is the latest version (v3) of the allmetrics API. It provides the same functionality as v1 but may include additional features in the future.\n\n**Supported Export Formats:**\n- **shell**: Bash-compatible variable assignments for scripting (NETDATA_CHARTNAME_DIMENSIONNAME=\"value\")\n- **prometheus**: Prometheus exposition format for a single host\n- **prometheus_all_hosts**: Prometheus format including metrics from all child nodes\n- **json**: JSON format with full chart and dimension metadata\n\n**Use Cases:**\n- Integration with Prometheus or other metric collectors\n- Shell script automation and monitoring\n- Custom metric exporters\n- Multi-host metric aggregation\n\n**Security & Access Control:**\n- 📊 **Public Data API** - Bearer token optional, IP-based ACL restrictions apply\n- **Default Access:** Public (no authentication required)\n- **Bearer Protection:** When enabled via `/api/v3/bearer_protection`, requires bearer token\n- **IP Restrictions:** Subject to `allow dashboard from` in netdata.conf\n- **Access Methods:** Direct HTTP/HTTPS, Netdata Cloud, external tools\n", |
| 2171 | "security": [ |
| 2172 | {}, |
| 2173 | { |
| 2174 | "bearerAuth": [] |
| 2175 | } |
| 2176 | ], |
| 2177 | "parameters": [ |
| 2178 | { |
| 2179 | "name": "format", |
| 2180 | "in": "query", |
| 2181 | "description": "The export format for the metrics. Required parameter.\n\n**Formats:**\n- `shell`: Bash variables (default) - Exports as NETDATA_CHARTNAME_DIMENSIONNAME=\"value\"\n- `prometheus`: Prometheus format (single host) - Compatible with Prometheus scraping\n- `prometheus_all_hosts`: Prometheus format (all hosts) - Includes metrics from child nodes with host labels\n- `json`: JSON format - Full metadata including chart names, families, contexts, units, and timestamps\n\n**Format Details:**\n- Shell format includes alarm status variables (NETDATA_ALARM_CHART_ALARM_STATUS, NETDATA_ALARM_CHART_ALARM_VALUE)\n- Prometheus formats respect Prometheus metric naming conventions\n- JSON format provides complete chart and dimension information\n", |
| 2182 | "required": true, |
| 2183 | "schema": { |
| 2184 | "type": "string", |
| 2185 | "enum": [ |
| 2186 | "shell", |
| 2187 | "prometheus", |
| 2188 | "prometheus_all_hosts", |
| 2189 | "json" |
| 2190 | ], |
| 2191 | "default": "shell" |
| 2192 | } |
| 2193 | }, |
| 2194 | { |
| 2195 | "name": "filter", |
| 2196 | "in": "query", |
| 2197 | "description": "Simple pattern filter to include only specific charts. Uses Netdata simple pattern matching.\n\n**Pattern Syntax:**\n- Exact match: `system.cpu`\n- Wildcard: `system.*` (all system charts)\n- Multiple patterns: `system.* disk.*` (space-separated)\n- Negation: `!system.cpu` (exclude specific chart)\n\nWhen not specified, all charts are exported.\n\n**Examples:**\n- `system.*` - Export only system charts\n- `disk.* net.*` - Export disk and network charts\n- `* !*.mdstat` - Export all except mdstat charts\n", |
| 2198 | "required": false, |
| 2199 | "schema": { |
| 2200 | "type": "string" |
| 2201 | } |
| 2202 | }, |
| 2203 | { |
| 2204 | "name": "variables", |
| 2205 | "in": "query", |
| 2206 | "description": "**Prometheus format only**: Include or exclude system configuration variables in the output.\n\nWhen enabled (yes/1/true), Netdata exposes various system configuration variables as Prometheus metrics. This includes:\n- Netdata configuration parameters\n- System environment information\n- Collection plugin states\n\nNote: Only affects Prometheus format output. Ignored for shell and json formats.\n", |
| 2207 | "required": false, |
| 2208 | "schema": { |
| 2209 | "type": "string", |
| 2210 | "enum": [ |
| 2211 | "yes", |
| 2212 | "no", |
| 2213 | "1", |
| 2214 | "0", |
| 2215 | "true", |
| 2216 | "false" |
| 2217 | ], |
| 2218 | "default": "no" |
| 2219 | } |
| 2220 | }, |
| 2221 | { |
| 2222 | "name": "timestamps", |
| 2223 | "in": "query", |
| 2224 | "description": "**Prometheus format only**: Include or exclude timestamps in Prometheus metrics.\n\nWhen enabled (default), each metric includes a timestamp of when it was collected.\nWhen disabled, metrics are exported without timestamps (Prometheus will use scrape time).\n\nNote: Only affects Prometheus format output. Ignored for shell and json formats.\n", |
| 2225 | "required": false, |
| 2226 | "schema": { |
| 2227 | "type": "string", |
| 2228 | "enum": [ |
| 2229 | "yes", |
| 2230 | "no", |
| 2231 | "1", |
| 2232 | "0", |
| 2233 | "true", |
| 2234 | "false" |
| 2235 | ], |
| 2236 | "default": "yes" |
| 2237 | } |
| 2238 | }, |
| 2239 | { |
| 2240 | "name": "names", |
| 2241 | "in": "query", |
| 2242 | "description": "**Prometheus format only**: Use dimension names vs IDs in metric names.\n\nWhen enabled (default), Prometheus metrics use human-readable dimension names.\nWhen disabled, metrics use dimension IDs (which never change).\n\n**Example:**\n- names=yes: `netdata_system_cpu_percentage_average{dimension=\"user\"}`\n- names=no: `netdata_system_cpu_percentage_average{dimension=\"user\"}`\n\nThe default is controlled by the global Netdata configuration. This parameter allows per-request override.\n\nNote: Only affects Prometheus format output.\n", |
| 2243 | "required": false, |
| 2244 | "schema": { |
| 2245 | "type": "string", |
| 2246 | "enum": [ |
| 2247 | "yes", |
| 2248 | "no", |
| 2249 | "1", |
| 2250 | "0", |
| 2251 | "true", |
| 2252 | "false" |
| 2253 | ] |
| 2254 | } |
| 2255 | }, |
| 2256 | { |
| 2257 | "name": "oldunits", |
| 2258 | "in": "query", |
| 2259 | "description": "**Prometheus format only**: Use legacy unit naming conventions (pre-1.12 format).\n\nWhen enabled, metric names for `source=average` use the old unit naming conventions as they appeared before Netdata version 1.12.\n\nThis is provided for backward compatibility with existing Prometheus configurations.\n\nNote: Only affects Prometheus format with source=average.\n", |
| 2260 | "required": false, |
| 2261 | "schema": { |
| 2262 | "type": "string", |
| 2263 | "enum": [ |
| 2264 | "yes", |
| 2265 | "no", |
| 2266 | "1", |
| 2267 | "0", |
| 2268 | "true", |
| 2269 | "false" |
| 2270 | ], |
| 2271 | "default": "no" |
| 2272 | } |
| 2273 | }, |
| 2274 | { |
| 2275 | "name": "hideunits", |
| 2276 | "in": "query", |
| 2277 | "description": "**Prometheus format only**: Exclude units from metric names for source=average.\n\nWhen enabled, units are not included in the Prometheus metric names for the default `source=average` data.\n\n**Example:**\n- hideunits=no: `netdata_system_cpu_percentage_average`\n- hideunits=yes: `netdata_system_cpu_average`\n\nNote: Only affects Prometheus format with source=average.\n", |
| 2278 | "required": false, |
| 2279 | "schema": { |
| 2280 | "type": "string", |
| 2281 | "enum": [ |
| 2282 | "yes", |
| 2283 | "no", |
| 2284 | "1", |
| 2285 | "0", |
| 2286 | "true", |
| 2287 | "false" |
| 2288 | ], |
| 2289 | "default": "no" |
| 2290 | } |
| 2291 | }, |
| 2292 | { |
| 2293 | "name": "server", |
| 2294 | "in": "query", |
| 2295 | "description": "**Prometheus format only**: Set a custom identifier for the client scraping the metrics.\n\nThis parameter is used to identify the client in Prometheus metric labels. If not specified, Netdata uses the client's IP address.\n\nUseful when multiple Prometheus instances scrape the same Netdata agent, or when scraping through a proxy.\n\n**Example:** `server=prometheus-prod-1`\n\nNote: Only affects Prometheus format output. This value appears in metric labels to distinguish scraping sources.\n", |
| 2296 | "required": false, |
| 2297 | "schema": { |
| 2298 | "type": "string" |
| 2299 | } |
| 2300 | }, |
| 2301 | { |
| 2302 | "name": "prefix", |
| 2303 | "in": "query", |
| 2304 | "description": "**Prometheus format only**: Prefix all Prometheus metric names with a custom string.\n\nUseful for namespacing metrics when aggregating from multiple sources or to comply with organizational metric naming conventions.\n\n**Example:** `prefix=mycompany_` produces metrics like `mycompany_system_cpu_percentage_average`\n\nThe default prefix is controlled by the global Netdata configuration. This parameter allows per-request override.\n\nNote: Only affects Prometheus format output.\n", |
| 2305 | "required": false, |
| 2306 | "schema": { |
| 2307 | "type": "string" |
| 2308 | } |
| 2309 | }, |
| 2310 | { |
| 2311 | "name": "data", |
| 2312 | "in": "query", |
| 2313 | "description": "**Prometheus format only**: Select the data source/aggregation method for Prometheus metrics.\n\n**Options:**\n- `as-collected`: Raw values as collected by data collection plugins (no aggregation)\n- `average`: Average values over the collection interval (default)\n- `sum`: Sum of values over the collection interval\n\nThe `as-collected` source provides the most recent raw sample, while `average` and `sum` provide values aggregated over the chart's update interval.\n\nThe default is controlled by the global Netdata exporting configuration. This parameter allows per-request override.\n\n**Use Cases:**\n- `as-collected`: For counter metrics that Prometheus will rate()\n- `average`: For gauge metrics showing typical values\n- `sum`: For accumulating metrics\n\nAliases: `source`, `data source`, `data-source`, `data_source`, `datasource`\n\nNote: Only affects Prometheus format output.\n", |
| 2314 | "required": false, |
| 2315 | "schema": { |
| 2316 | "type": "string", |
| 2317 | "enum": [ |
| 2318 | "as-collected", |
| 2319 | "average", |
| 2320 | "sum" |
| 2321 | ], |
| 2322 | "default": "average" |
| 2323 | } |
| 2324 | } |
| 2325 | ], |
| 2326 | "responses": { |
| 2327 | "200": { |
| 2328 | "description": "Success. Metrics exported in the requested format.\n\n**Content Types:**\n- shell: text/plain\n- json: application/json\n- prometheus/prometheus_all_hosts: application/openmetrics-text (Prometheus format)\n\n**Response Characteristics:**\n- Shell format: Variables ready for sourcing in bash scripts\n- JSON format: Complete chart metadata with current values\n- Prometheus format: Ready for Prometheus scraping\n\nThe response is not cacheable as it contains current metric values.\n", |
| 2329 | "content": { |
| 2330 | "text/plain": { |
| 2331 | "schema": { |
| 2332 | "type": "string", |
| 2333 | "description": "Shell format output (when format=shell)" |
| 2334 | } |
| 2335 | }, |
| 2336 | "application/json": { |
| 2337 | "schema": { |
| 2338 | "type": "object", |
| 2339 | "description": "JSON format output (when format=json)" |
| 2340 | } |
| 2341 | }, |
| 2342 | "application/openmetrics-text": { |
| 2343 | "schema": { |
| 2344 | "type": "string", |
| 2345 | "description": "Prometheus format output (when format=prometheus or prometheus_all_hosts)" |
| 2346 | } |
| 2347 | } |
| 2348 | } |
| 2349 | }, |
| 2350 | "400": { |
| 2351 | "description": "Bad request. The response body contains an error message.\n\nCommon causes:\n- Invalid or missing 'format' parameter\n- Unsupported format value\n- Invalid filter pattern syntax\n" |
| 2352 | }, |
| 2353 | "500": { |
| 2354 | "description": "Internal server error. Usually indicates the server is out of memory or a collection plugin has crashed." |
| 2355 | } |
| 2356 | } |
| 2357 | } |
| 2358 | }, |
| 2359 | "/api/v3/alerts": { |
| 2360 | "get": { |
| 2361 | "operationId": "alerts3", |
| 2362 | "tags": [ |
| 2363 | "alerts" |
| 2364 | ], |
| 2365 | "summary": "Current Alert Status - Multi-node Alert Information - Latest API", |
| 2366 | "description": "Returns the current status of all alerts across all nodes monitored by this Netdata agent.\n\nThis is the latest version (v3) of the alerts API. It provides the same functionality as v2 but may include additional features in the future.\n\n**What This API Provides:**\n- Current state of all active, warning, and critical alerts\n- Alert values and thresholds\n- Alert configuration summaries\n- Multi-node alert aggregation\n- Filtering by alert name, context, node, or status\n\n**Use Cases:**\n- Dashboard alert widgets showing current system health\n- Alert management interfaces\n- Integration with external alerting systems\n- Monitoring alert coverage across infrastructure\n- Finding all alerts in specific states (warning/critical)\n\n**Response Content:**\nThe response includes comprehensive information about alerts including their current values, configured thresholds, time in current state, and associated context/chart information.\n\n**Security & Access Control:**\n- 📊 **Public Data API** - Bearer token optional, IP-based ACL restrictions apply\n- **Default Access:** Public (no authentication required)\n- **Bearer Protection:** When enabled via `/api/v3/bearer_protection`, requires bearer token\n- **IP Restrictions:** Subject to `allow dashboard from` in netdata.conf\n- **Access Methods:** Direct HTTP/HTTPS, Netdata Cloud, external tools\n", |
| 2367 | "security": [ |
| 2368 | {}, |
| 2369 | { |
| 2370 | "bearerAuth": [] |
| 2371 | } |
| 2372 | ], |
| 2373 | "parameters": [ |
| 2374 | { |
| 2375 | "$ref": "#/components/parameters/scopeNodes" |
| 2376 | }, |
| 2377 | { |
| 2378 | "$ref": "#/components/parameters/scopeContexts" |
| 2379 | }, |
| 2380 | { |
| 2381 | "$ref": "#/components/parameters/filterNodes" |
| 2382 | }, |
| 2383 | { |
| 2384 | "$ref": "#/components/parameters/filterContexts" |
| 2385 | }, |
| 2386 | { |
| 2387 | "name": "alert", |
| 2388 | "in": "query", |
| 2389 | "description": "Filter alerts by alert name pattern. Uses Netdata simple pattern matching.\n\n**Pattern Syntax:**\n- Exact match: `cpu_usage`\n- Wildcard: `cpu_*` (all CPU-related alerts)\n- Multiple patterns: `cpu_* ram_*` (space-separated)\n- Negation: `!cpu_usage` (all except this alert)\n\n**Common Alert Names:**\n- `ram_in_use` - RAM utilization\n- `disk_space_usage` - Disk space\n- `10min_cpu_usage` - CPU usage over 10 minutes\n- `tcp_listen_overflows` - TCP connection queue overflows\n- `disk_backlog` - Disk I/O backlog\n\nWhen not specified, all alerts are included.\n\n**Examples:**\n- `alert=ram_in_use` - Only RAM usage alert\n- `alert=*cpu*` - All CPU-related alerts\n- `alert=* !*_critical` - All alerts except those ending with _critical\n", |
| 2390 | "required": false, |
| 2391 | "schema": { |
| 2392 | "type": "string" |
| 2393 | }, |
| 2394 | "examples": { |
| 2395 | "single": { |
| 2396 | "value": "ram_in_use", |
| 2397 | "summary": "Single alert" |
| 2398 | }, |
| 2399 | "pattern": { |
| 2400 | "value": "*cpu*", |
| 2401 | "summary": "All CPU alerts" |
| 2402 | } |
| 2403 | } |
| 2404 | }, |
| 2405 | { |
| 2406 | "name": "status", |
| 2407 | "in": "query", |
| 2408 | "description": "Filter alerts by their current status. Can specify multiple statuses.\n\n**Alert Statuses:**\n- `CRITICAL` - Alert is in critical state (highest severity)\n- `WARNING` - Alert is in warning state\n- `CLEAR` - Alert is in normal state (not triggered)\n- `UNDEFINED` - Alert could not be evaluated (e.g., division by zero, missing data)\n- `UNINITIALIZED` - Alert has not been evaluated yet (no data collected)\n\n**Multiple Statuses:**\nTo show multiple statuses, separate them with commas: `status=CRITICAL,WARNING`\n\n**Use Cases:**\n- `status=CRITICAL` - Show only critical alerts requiring immediate attention\n- `status=CRITICAL,WARNING` - Show all alerts that need attention\n- `status=CLEAR` - Show alerts that are currently in normal state\n- Not specified - Show alerts in all states\n\n**Default:** When not specified, typically returns only alerts in WARNING or CRITICAL state (this depends on options parameter).\n", |
| 2409 | "required": false, |
| 2410 | "schema": { |
| 2411 | "type": "string" |
| 2412 | }, |
| 2413 | "examples": { |
| 2414 | "critical_only": { |
| 2415 | "value": "CRITICAL", |
| 2416 | "summary": "Only critical alerts" |
| 2417 | }, |
| 2418 | "needs_attention": { |
| 2419 | "value": "CRITICAL,WARNING", |
| 2420 | "summary": "All alerts needing attention" |
| 2421 | }, |
| 2422 | "all_states": { |
| 2423 | "value": "CRITICAL,WARNING,CLEAR,UNDEFINED,UNINITIALIZED", |
| 2424 | "summary": "All alert states" |
| 2425 | } |
| 2426 | } |
| 2427 | }, |
| 2428 | { |
| 2429 | "name": "options", |
| 2430 | "in": "query", |
| 2431 | "description": "Comma or pipe-separated list of options to control response content.\n\n**Alert-Specific Options:**\n- `summary` - Include summary counters (total alerts, by status, by type)\n\n**General Options:**\n- `contexts` - Include context information\n- `instances` - Include alert instance details\n- `values` - Include current alert values\n- `configurations` - Include alert configuration details\n\n**Examples:**\n- `options=summary` - Include alert count summaries\n- `options=summary,values` - Summaries and current values\n- `options=summary|configurations` - Summaries and configs (pipe separator)\n\nWhen not specified, returns basic alert information without detailed configs or summaries.\n", |
| 2432 | "required": false, |
| 2433 | "schema": { |
| 2434 | "type": "string" |
| 2435 | }, |
| 2436 | "examples": { |
| 2437 | "basic": { |
| 2438 | "value": "summary", |
| 2439 | "summary": "With summary counters" |
| 2440 | }, |
| 2441 | "detailed": { |
| 2442 | "value": "summary,values,configurations", |
| 2443 | "summary": "Complete alert information" |
| 2444 | } |
| 2445 | } |
| 2446 | }, |
| 2447 | { |
| 2448 | "$ref": "#/components/parameters/after" |
| 2449 | }, |
| 2450 | { |
| 2451 | "$ref": "#/components/parameters/before" |
| 2452 | }, |
| 2453 | { |
| 2454 | "name": "timeout", |
| 2455 | "in": "query", |
| 2456 | "description": "Maximum time in milliseconds to wait for the query to complete.\n\nThis is useful for preventing long-running queries from blocking when querying large infrastructures with many nodes and alerts.\n\n**Format:** Integer (milliseconds)\n\n**Default:** Server default timeout (typically 30000ms = 30 seconds)\n\n**Examples:**\n- `timeout=5000` - 5 second timeout\n- `timeout=60000` - 60 second timeout\n\nWhen the timeout is exceeded, the server returns a partial result with whatever data was collected before the timeout.\n", |
| 2457 | "required": false, |
| 2458 | "schema": { |
| 2459 | "type": "integer", |
| 2460 | "format": "int64", |
| 2461 | "minimum": 1000 |
| 2462 | }, |
| 2463 | "example": 30000 |
| 2464 | }, |
| 2465 | { |
| 2466 | "name": "cardinality", |
| 2467 | "in": "query", |
| 2468 | "description": "Limit the number of alert instances returned to prevent response explosion.\n\nWhen monitoring large infrastructures, some alert types may have hundreds or thousands of instances (e.g., disk space alerts for every disk on every node).\n\nThis parameter limits the number of unique alert instances in the response.\n\n**Format:** Integer (maximum number of alert instances)\n\n**Default:** No limit\n\n**Use Cases:**\n- Preventing huge responses when there are many alert instances\n- Getting a sample of alerts rather than complete list\n- Dashboard widgets with limited display space\n\n**Example:**\n- `cardinality=100` - Return at most 100 alert instances\n\n**Alias:** Can also be specified as `cardinality_limit`\n\nWhen the limit is exceeded, the response may indicate how many alerts were omitted.\n", |
| 2469 | "required": false, |
| 2470 | "schema": { |
| 2471 | "type": "integer", |
| 2472 | "minimum": 1 |
| 2473 | }, |
| 2474 | "example": 100 |
| 2475 | } |
| 2476 | ], |
| 2477 | "responses": { |
| 2478 | "200": { |
| 2479 | "description": "Success. Returns current alert status information.\n\n**Response Structure:**\n- Summary counters (when options=summary): counts by status, type, classification\n- Alert instances with their current states\n- Alert values and thresholds (when options=values)\n- Alert configurations (when options=configurations)\n- Node and context associations\n\nThe response is grouped by contexts and includes metadata about each alert including its current status, value, time in current state, and associated chart/dimension.\n\n**Response Characteristics:**\n- JSON format\n- Not cacheable (alerts change frequently)\n- May include partial results if timeout is exceeded\n- Cardinality-limited if specified\n", |
| 2480 | "content": { |
| 2481 | "application/json": { |
| 2482 | "schema": { |
| 2483 | "type": "object", |
| 2484 | "description": "Multi-node alert status information" |
| 2485 | } |
| 2486 | } |
| 2487 | } |
| 2488 | }, |
| 2489 | "400": { |
| 2490 | "description": "Bad request. Common causes:\n- Invalid parameter values\n- Malformed filter patterns\n- Invalid status values\n- Invalid timeout or cardinality values\n" |
| 2491 | }, |
| 2492 | "500": { |
| 2493 | "description": "Internal server error. Usually indicates the server is out of memory." |
| 2494 | } |
| 2495 | } |
| 2496 | } |
| 2497 | }, |
| 2498 | "/api/v3/alert_transitions": { |
| 2499 | "get": { |
| 2500 | "operationId": "alert_transitions_v3", |
| 2501 | "tags": [ |
| 2502 | "alerts" |
| 2503 | ], |
| 2504 | "summary": "Retrieve alert state transition history across all nodes with advanced filtering", |
| 2505 | "description": "Returns the historical record of alert state changes (transitions) across the monitored infrastructure. This endpoint provides detailed information about when alerts changed state (e.g., from CLEAR to WARNING to CRITICAL), allowing you to analyze alert patterns, investigate incidents, and understand system behavior over time.\n\n**What is an Alert Transition?**\nAn alert transition is a record of an alert changing from one state to another. Each transition includes:\n- Previous and new alert status (CLEAR, WARNING, CRITICAL, etc.)\n- When the transition occurred\n- How long the alert stayed in the previous state (duration)\n- Alert value at the time of transition\n- Complete alert metadata (name, context, node, etc.)\n\n**Key Features:**\n- **Multi-Node Support:** Query transitions across entire infrastructure\n- **Advanced Filtering:** Filter by status, type, component, role, node, alert name, context\n- **Faceted Search:** Use multiple filter facets simultaneously (e.g., \"CRITICAL status on database nodes\")\n- **Pagination:** Navigate through large result sets using anchor_gi\n- **Time Range:** Specify exact time windows for historical analysis\n\n**Use Cases:**\n- Incident investigation: \"What alerts fired during the outage?\"\n- Alert pattern analysis: \"How often does this alert transition to CRITICAL?\"\n- Alert tuning: \"Which alerts flap between states most frequently?\"\n- Compliance reporting: \"Show all CRITICAL alerts in the last 30 days\"\n- Root cause analysis: \"What changed before this alert fired?\"\n\n**Faceted Filtering:**\nThis endpoint supports 9 different facets for precise filtering:\n- f_status: Filter by alert status (CRITICAL, WARNING, etc.)\n- f_type: Filter by alert type (e.g., \"System\", \"Database\", \"Network\")\n- f_role: Filter by recipient role (who should be notified)\n- f_class: Filter by alert classification\n- f_component: Filter by system component\n- f_node: Filter by specific node hostname\n- f_alert: Filter by alert name\n- f_instance: Filter by chart instance name\n- f_context: Filter by metric context\n\n**Examples:**\n1. Recent critical transitions: `?last=100&f_status=CRITICAL`\n2. Database alerts: `?f_component=Database&after=-86400`\n3. Specific alert history: `?f_alert=disk_space_usage&last=50`\n4. Node-specific transitions: `?f_node=web-server-01&after=-604800`\n\n**Response Format:**\nReturns a JSON array of transition records, ordered by time (newest first by default). Each record includes complete transition metadata, alert details, and timing information.\n\n**Performance Considerations:**\n- Use time ranges (after/before) to limit query scope\n- Use cardinality limits for large result sets\n- Timeout parameter prevents long-running queries\n- Pagination via anchor_gi for processing large datasets\n\n**Security & Access Control:**\n- 📊 **Public Data API** - Bearer token optional, IP-based ACL restrictions apply\n- **Default Access:** Public (no authentication required)\n- **Bearer Protection:** When enabled via `/api/v3/bearer_protection`, requires bearer token\n- **IP Restrictions:** Subject to `allow dashboard from` in netdata.conf\n- **Access Methods:** Direct HTTP/HTTPS, Netdata Cloud, external tools\n", |
| 2506 | "security": [ |
| 2507 | {}, |
| 2508 | { |
| 2509 | "bearerAuth": [] |
| 2510 | } |
| 2511 | ], |
| 2512 | "parameters": [ |
| 2513 | { |
| 2514 | "name": "scope_nodes", |
| 2515 | "in": "query", |
| 2516 | "description": "Filter transitions to only include specific nodes using simple pattern matching.\n\nThis parameter defines which nodes to include in the search using Netdata's simple pattern syntax (not regex).\n\n**Pattern Syntax:**\n- `*` matches any number of characters (including none)\n- `node1 node2` space-separated list matches any of the nodes\n- `!node3` exclude specific nodes (prefix with !)\n- Can combine inclusion and exclusion: `web* !web-test*`\n\n**Examples:**\n- `scope_nodes=web*` - All nodes starting with \"web\"\n- `scope_nodes=web* db*` - All web and database nodes\n- `scope_nodes=* !test*` - All nodes except test nodes\n- `scope_nodes=prod-web-01` - Specific node only\n\n**Use Cases:**\n- Focus on specific node groups (production vs staging)\n- Exclude test/development nodes from analysis\n- Investigate issues on specific infrastructure tiers\n\nWhen not specified, transitions from all nodes are included.\n", |
| 2517 | "required": false, |
| 2518 | "schema": { |
| 2519 | "type": "string" |
| 2520 | }, |
| 2521 | "examples": { |
| 2522 | "all_web_nodes": { |
| 2523 | "value": "web*", |
| 2524 | "summary": "All web servers" |
| 2525 | }, |
| 2526 | "prod_only": { |
| 2527 | "value": "* !test* !dev*", |
| 2528 | "summary": "Production nodes only" |
| 2529 | } |
| 2530 | } |
| 2531 | }, |
| 2532 | { |
| 2533 | "name": "nodes", |
| 2534 | "in": "query", |
| 2535 | "description": "Filter transitions to specific nodes by their exact names.\n\nUnlike `scope_nodes` which supports patterns, this parameter requires exact node names. Multiple nodes are separated by comma or pipe.\n\n**Format:** Comma or pipe-separated list of exact node names\n\n**Examples:**\n- `nodes=web-server-01` - Single specific node\n- `nodes=web-server-01,web-server-02,db-server-01` - Multiple specific nodes\n- `nodes=web-server-01|web-server-02` - Pipe separator also works\n\n**Difference from scope_nodes:**\n- `scope_nodes`: Pattern matching, filters at query time\n- `nodes`: Exact names, more efficient for known node names\n\n**Best Practice:** Use `nodes` when you know exact node names, use `scope_nodes` for pattern-based filtering.\n\nWhen not specified, transitions from all nodes matching scope_nodes (or all nodes if scope_nodes is also not specified) are included.\n", |
| 2536 | "required": false, |
| 2537 | "schema": { |
| 2538 | "type": "string" |
| 2539 | }, |
| 2540 | "example": "web-server-01,db-server-01" |
| 2541 | }, |
| 2542 | { |
| 2543 | "name": "scope_contexts", |
| 2544 | "in": "query", |
| 2545 | "description": "Filter transitions to only include alerts from specific metric contexts using pattern matching.\n\nContexts group similar metrics across instances (e.g., `system.cpu` groups CPU metrics from all nodes, `disk.io` groups disk I/O from all disks).\n\n**Pattern Syntax:**\n- `*` matches any number of characters\n- `context1 context2` space-separated list matches any of the contexts\n- `!context3` exclude specific contexts\n- Can combine: `system.* !system.io*`\n\n**Common Context Patterns:**\n- `system.*` - All system-level metrics\n- `disk.*` - All disk-related metrics\n- `net.*` - All network-related metrics\n- `mysql.*` - All MySQL metrics\n- `nginx.*` - All Nginx metrics\n\n**Examples:**\n- `scope_contexts=system.cpu` - Only CPU alerts\n- `scope_contexts=disk.* net.*` - All disk and network alerts\n- `scope_contexts=* !system.ip*` - All contexts except IP-related\n\n**Use Cases:**\n- Focus on specific subsystem (e.g., storage, network)\n- Exclude noisy alert types\n- Component-specific incident investigation\n\nWhen not specified, transitions from all contexts are included.\n", |
| 2546 | "required": false, |
| 2547 | "schema": { |
| 2548 | "type": "string" |
| 2549 | }, |
| 2550 | "examples": { |
| 2551 | "disk_alerts": { |
| 2552 | "value": "disk.*", |
| 2553 | "summary": "All disk-related alerts" |
| 2554 | }, |
| 2555 | "critical_systems": { |
| 2556 | "value": "system.* disk.* net.*", |
| 2557 | "summary": "System, disk, and network alerts" |
| 2558 | } |
| 2559 | } |
| 2560 | }, |
| 2561 | { |
| 2562 | "name": "contexts", |
| 2563 | "in": "query", |
| 2564 | "description": "Filter transitions to specific contexts by their exact names.\n\nUnlike `scope_contexts` which supports patterns, this parameter requires exact context names.\n\n**Format:** Comma or pipe-separated list of exact context names\n\n**Examples:**\n- `contexts=system.cpu` - Single specific context\n- `contexts=system.cpu,system.load,system.ram` - Multiple contexts\n- `contexts=disk.space|disk.inodes` - Pipe separator\n\n**Difference from scope_contexts:**\n- `scope_contexts`: Pattern matching for flexible filtering\n- `contexts`: Exact names for precise filtering\n\nWhen not specified, transitions from all contexts matching scope_contexts are included.\n", |
| 2565 | "required": false, |
| 2566 | "schema": { |
| 2567 | "type": "string" |
| 2568 | }, |
| 2569 | "example": "system.cpu,system.ram,disk.space" |
| 2570 | }, |
| 2571 | { |
| 2572 | "name": "alert", |
| 2573 | "in": "query", |
| 2574 | "description": "Filter transitions to a specific alert by its exact name.\n\nAlert names are unique identifiers for specific alert configurations.\n\n**Format:** Exact alert name (case-sensitive)\n\n**Examples:**\n- `alert=disk_space_usage` - Transitions for disk space alert\n- `alert=cpu_usage` - Transitions for CPU usage alert\n- `alert=ram_in_use` - Transitions for RAM usage alert\n\n**Use Cases:**\n- Analyze history of a specific alert\n- Tune alert thresholds based on historical behavior\n- Investigate alert flapping (rapid state changes)\n- Track alert effectiveness\n\n**Tip:** To find available alert names, query `/api/v3/alerts` first or use the `/api/v3/alert_config` endpoint.\n\nWhen not specified, transitions for all alerts are included.\n", |
| 2575 | "required": false, |
| 2576 | "schema": { |
| 2577 | "type": "string" |
| 2578 | }, |
| 2579 | "example": "disk_space_usage" |
| 2580 | }, |
| 2581 | { |
| 2582 | "name": "transition", |
| 2583 | "in": "query", |
| 2584 | "description": "Filter to a specific transition by its unique identifier.\n\nEach transition has a unique ID (UUID). This parameter is rarely used but can retrieve exact transition records.\n\n**Format:** UUID string\n\n**Use Case:** Retrieve exact transition details when you have the transition ID from another query or notification.\n\nWhen not specified, all transitions matching other filters are included.\n", |
| 2585 | "required": false, |
| 2586 | "schema": { |
| 2587 | "type": "string" |
| 2588 | }, |
| 2589 | "example": "550e8400-e29b-41d4-a716-446655440000" |
| 2590 | }, |
| 2591 | { |
| 2592 | "name": "last", |
| 2593 | "in": "query", |
| 2594 | "description": "Limit the number of transition records returned.\n\nThis controls how many transition records to include in the response, ordered by time (most recent first).\n\n**Format:** Positive integer\n\n**Default:** 1 (returns only the most recent transition)\n\n**Examples:**\n- `last=1` - Most recent transition only (default)\n- `last=100` - Last 100 transitions\n- `last=1000` - Last 1000 transitions\n\n**Use Cases:**\n- Dashboard widgets showing recent N alerts\n- API clients with pagination\n- Limiting response size for performance\n\n**Pagination:**\nFor datasets larger than `last`, use the `anchor_gi` parameter to navigate to the next page:\n1. Make request with `last=100`\n2. Note the `global_id` of the last transition in response\n3. Make next request with `last=100&anchor_gi=<global_id>`\n\n**Performance Note:** Smaller values of `last` result in faster queries and smaller responses.\n\n**IMPORTANT:** This parameter is required. If not specified, defaults to 1.\n", |
| 2595 | "required": true, |
| 2596 | "schema": { |
| 2597 | "type": "integer", |
| 2598 | "minimum": 1, |
| 2599 | "default": 1 |
| 2600 | }, |
| 2601 | "example": 100 |
| 2602 | }, |
| 2603 | { |
| 2604 | "name": "anchor_gi", |
| 2605 | "in": "query", |
| 2606 | "description": "Global ID anchor for pagination through large result sets.\n\nEach transition has a unique global_id (an incrementing number). Use this parameter to paginate through results by specifying the global_id of the last transition from the previous page.\n\n**How Pagination Works:**\n1. First request: `?last=100` - Returns first 100 transitions\n2. Extract `global_id` of the 100th (last) transition from response\n3. Next request: `?last=100&anchor_gi=<global_id>` - Returns next 100 transitions\n\n**Format:** Positive integer (global_id from previous response)\n\n**Examples:**\n- `anchor_gi=12345` - Start from transition with global_id 12345\n- Combined with last: `last=100&anchor_gi=12345` - Get 100 transitions starting after global_id 12345\n\n**Use Cases:**\n- Processing large alert history datasets\n- Implementing \"load more\" in UIs\n- Batch processing of transition records\n- Exporting complete alert history\n\n**Direction:**\n- Results are ordered by global_id (which correlates with time)\n- Anchor specifies \"start after this ID\"\n- Each page contains `last` number of records\n\nWhen not specified, pagination starts from the most recent transition.\n", |
| 2607 | "required": false, |
| 2608 | "schema": { |
| 2609 | "type": "integer", |
| 2610 | "format": "int64", |
| 2611 | "minimum": 0 |
| 2612 | }, |
| 2613 | "example": 12345678 |
| 2614 | }, |
| 2615 | { |
| 2616 | "name": "f_status", |
| 2617 | "in": "query", |
| 2618 | "description": "**Facet Filter:** Filter transitions by their NEW status (the status the alert transitioned TO).\n\n**Available Status Values:**\n- `CRITICAL` - Alert in critical state (highest severity)\n- `WARNING` - Alert in warning state\n- `CLEAR` - Alert returned to normal state\n- `UNDEFINED` - Alert evaluation failed (e.g., metric missing, division by zero)\n- `UNINITIALIZED` - Alert not yet evaluated (no data yet)\n- `REMOVED` - Alert was removed (plugin stopped, configuration changed)\n\n**Format:** Comma-separated list of status values\n\n**Examples:**\n- `f_status=CRITICAL` - Only transitions TO critical state\n- `f_status=CRITICAL,WARNING` - Transitions to critical or warning\n- `f_status=CLEAR` - When alerts cleared (returned to normal)\n\n**Use Cases:**\n- Find when alerts became critical: `f_status=CRITICAL`\n- Track alert recovery: `f_status=CLEAR`\n- Find alert failures: `f_status=UNDEFINED`\n- Incident timeline: `f_status=CRITICAL,WARNING`\n\n**Note:** This filters by the NEW status. To see transitions FROM a status to another, you'll need to examine the old_status field in the response.\n\nWhen not specified, transitions to all statuses are included.\n", |
| 2619 | "required": false, |
| 2620 | "schema": { |
| 2621 | "type": "string" |
| 2622 | }, |
| 2623 | "examples": { |
| 2624 | "critical_only": { |
| 2625 | "value": "CRITICAL", |
| 2626 | "summary": "Only critical transitions" |
| 2627 | }, |
| 2628 | "problems": { |
| 2629 | "value": "CRITICAL,WARNING", |
| 2630 | "summary": "Problem states" |
| 2631 | }, |
| 2632 | "recoveries": { |
| 2633 | "value": "CLEAR", |
| 2634 | "summary": "Alert recoveries" |
| 2635 | } |
| 2636 | } |
| 2637 | }, |
| 2638 | { |
| 2639 | "name": "f_type", |
| 2640 | "in": "query", |
| 2641 | "description": "**Facet Filter:** Filter transitions by alert type.\n\nAlert types categorize alerts by what they monitor (e.g., \"System\", \"Database\", \"Web Server\").\n\n**Format:** Comma-separated list of alert type names\n\n**Common Alert Types:**\n- `System` - System-level alerts (CPU, RAM, load)\n- `Database` - Database monitoring alerts\n- `Web Server` - Web server alerts (Nginx, Apache)\n- `Network` - Network-related alerts\n- `Storage` - Storage and disk alerts\n\n**Examples:**\n- `f_type=System` - Only system alerts\n- `f_type=Database,Web Server` - Database and web server alerts\n\n**Use Cases:**\n- Focus on specific infrastructure component types\n- Filter by technology stack (databases, web servers, etc.)\n- Team-specific alert filtering\n\n**Note:** The exact type values depend on your alert configurations. Query `/api/v3/alerts` to see available types in your installation.\n\nWhen not specified, transitions of all types are included.\n", |
| 2642 | "required": false, |
| 2643 | "schema": { |
| 2644 | "type": "string" |
| 2645 | }, |
| 2646 | "example": "System,Database" |
| 2647 | }, |
| 2648 | { |
| 2649 | "name": "f_role", |
| 2650 | "in": "query", |
| 2651 | "description": "**Facet Filter:** Filter transitions by recipient role.\n\nRoles define who should be notified about alerts (e.g., \"sysadmin\", \"dba\", \"webmaster\").\n\n**Format:** Comma-separated list of role names\n\n**Common Roles:**\n- `sysadmin` - System administrators\n- `dba` - Database administrators\n- `webmaster` - Web server administrators\n- `devops` - DevOps team\n- `security` - Security team\n\n**Examples:**\n- `f_role=sysadmin` - Alerts for sysadmin role\n- `f_role=sysadmin,dba` - Alerts for sysadmins and DBAs\n\n**Use Cases:**\n- Team-specific alert filtering\n- Role-based alert analysis\n- Notification audit trails\n\n**Note:** Roles are defined in your alert configurations. The exact role values depend on your Netdata setup.\n\nWhen not specified, transitions for all roles are included.\n", |
| 2652 | "required": false, |
| 2653 | "schema": { |
| 2654 | "type": "string" |
| 2655 | }, |
| 2656 | "example": "sysadmin,dba" |
| 2657 | }, |
| 2658 | { |
| 2659 | "name": "f_class", |
| 2660 | "in": "query", |
| 2661 | "description": "**Facet Filter:** Filter transitions by alert classification.\n\nAlert classifications categorize alerts by their nature (e.g., \"Errors\", \"Latency\", \"Utilization\").\n\n**Format:** Comma-separated list of classification names\n\n**Common Classifications:**\n- `Errors` - Error-related alerts\n- `Latency` - Performance/latency alerts\n- `Utilization` - Resource utilization alerts\n- `Availability` - Availability/uptime alerts\n- `Workload` - Workload-related alerts\n\n**Examples:**\n- `f_class=Errors` - Only error-related transitions\n- `f_class=Latency,Utilization` - Performance and utilization alerts\n\n**Use Cases:**\n- Focus on specific problem categories\n- SLA/SLO tracking by classification\n- Alert categorization analysis\n\nWhen not specified, transitions of all classifications are included.\n", |
| 2662 | "required": false, |
| 2663 | "schema": { |
| 2664 | "type": "string" |
| 2665 | }, |
| 2666 | "example": "Errors,Latency" |
| 2667 | }, |
| 2668 | { |
| 2669 | "name": "f_component", |
| 2670 | "in": "query", |
| 2671 | "description": "**Facet Filter:** Filter transitions by system component.\n\nComponents identify which part of the system the alert relates to (e.g., \"Network\", \"Disk\", \"Memory\").\n\n**Format:** Comma-separated list of component names\n\n**Common Components:**\n- `Network` - Network-related alerts\n- `Disk` - Disk/storage alerts\n- `Memory` - Memory alerts\n- `CPU` - CPU alerts\n- `Database` - Database component alerts\n\n**Examples:**\n- `f_component=Disk` - Only disk-related transitions\n- `f_component=Network,Disk` - Network and disk alerts\n\n**Use Cases:**\n- Component-specific incident investigation\n- Infrastructure subsystem analysis\n- Capacity planning by component\n\nWhen not specified, transitions for all components are included.\n", |
| 2672 | "required": false, |
| 2673 | "schema": { |
| 2674 | "type": "string" |
| 2675 | }, |
| 2676 | "example": "Disk,Network" |
| 2677 | }, |
| 2678 | { |
| 2679 | "name": "f_node", |
| 2680 | "in": "query", |
| 2681 | "description": "**Facet Filter:** Filter transitions by exact node hostname.\n\nThis is a facet filter alternative to the `nodes` parameter, typically used when you want to combine it with other facets.\n\n**Format:** Comma-separated list of exact node hostnames\n\n**Examples:**\n- `f_node=web-server-01` - Single specific node\n- `f_node=web-server-01,db-server-01` - Multiple nodes\n\n**Difference from `nodes` parameter:**\n- Both accept exact node names\n- `f_node` is a facet filter (can be combined with other f_* filters)\n- `nodes` is a direct filter parameter\n\n**Best Practice:** Use `nodes` for simple node filtering, use `f_node` when combining with other facets in complex queries.\n\nWhen not specified, all nodes are included.\n", |
| 2682 | "required": false, |
| 2683 | "schema": { |
| 2684 | "type": "string" |
| 2685 | }, |
| 2686 | "example": "web-server-01" |
| 2687 | }, |
| 2688 | { |
| 2689 | "name": "f_alert", |
| 2690 | "in": "query", |
| 2691 | "description": "**Facet Filter:** Filter transitions by exact alert name.\n\nThis is a facet filter alternative to the `alert` parameter.\n\n**Format:** Comma-separated list of exact alert names\n\n**Examples:**\n- `f_alert=disk_space_usage` - Single alert\n- `f_alert=cpu_usage,ram_in_use` - Multiple alerts\n\n**Difference from `alert` parameter:**\n- `alert`: Single alert name\n- `f_alert`: Multiple alert names, facet filter\n\nWhen not specified, all alerts are included.\n", |
| 2692 | "required": false, |
| 2693 | "schema": { |
| 2694 | "type": "string" |
| 2695 | }, |
| 2696 | "example": "disk_space_usage,ram_in_use" |
| 2697 | }, |
| 2698 | { |
| 2699 | "name": "f_instance", |
| 2700 | "in": "query", |
| 2701 | "description": "**Facet Filter:** Filter transitions by chart instance name.\n\nChart instances are specific monitored entities (e.g., \"disk_sda\", \"eth0\", \"mysql_localhost\").\n\n**Format:** Comma-separated list of instance names\n\n**Examples:**\n- `f_instance=sda` - Alerts for disk sda\n- `f_instance=eth0,eth1` - Alerts for network interfaces eth0 and eth1\n\n**Use Cases:**\n- Device-specific alert history (specific disk, NIC, etc.)\n- Instance-level troubleshooting\n- Resource-specific analysis\n\n**Note:** Instance names depend on your system configuration and what's being monitored.\n\nWhen not specified, all instances are included.\n", |
| 2702 | "required": false, |
| 2703 | "schema": { |
| 2704 | "type": "string" |
| 2705 | }, |
| 2706 | "example": "sda,sdb" |
| 2707 | }, |
| 2708 | { |
| 2709 | "name": "f_context", |
| 2710 | "in": "query", |
| 2711 | "description": "**Facet Filter:** Filter transitions by exact metric context.\n\nThis is a facet filter alternative to the `contexts` parameter.\n\n**Format:** Comma-separated list of exact context names\n\n**Examples:**\n- `f_context=system.cpu` - CPU context only\n- `f_context=disk.space,disk.inodes` - Disk space and inodes\n\n**Difference from `contexts` parameter:**\n- Both accept exact context names\n- `f_context` is a facet filter (can be combined with other f_* filters)\n- `contexts` is a direct filter parameter\n\nWhen not specified, all contexts are included.\n", |
| 2712 | "required": false, |
| 2713 | "schema": { |
| 2714 | "type": "string" |
| 2715 | }, |
| 2716 | "example": "system.cpu,system.ram" |
| 2717 | }, |
| 2718 | { |
| 2719 | "$ref": "#/components/parameters/after" |
| 2720 | }, |
| 2721 | { |
| 2722 | "$ref": "#/components/parameters/before" |
| 2723 | }, |
| 2724 | { |
| 2725 | "name": "timeout", |
| 2726 | "in": "query", |
| 2727 | "description": "Maximum time in milliseconds to wait for the query to complete.\n\nAlert transition queries can be expensive when searching large time ranges or across many nodes.\n\n**Format:** Integer (milliseconds)\n\n**Default:** Server default timeout (typically 30000ms = 30 seconds)\n\n**Examples:**\n- `timeout=5000` - 5 second timeout\n- `timeout=60000` - 60 second timeout (for large queries)\n\n**Use Cases:**\n- Prevent long-running queries from blocking\n- API clients with strict latency requirements\n- Dashboard widgets needing fast responses\n\nWhen timeout is exceeded, the server returns a partial result with whatever transitions were collected before timeout, or an error if no results were ready.\n", |
| 2728 | "required": false, |
| 2729 | "schema": { |
| 2730 | "type": "integer", |
| 2731 | "format": "int64", |
| 2732 | "minimum": 1000 |
| 2733 | }, |
| 2734 | "example": 30000 |
| 2735 | }, |
| 2736 | { |
| 2737 | "name": "cardinality", |
| 2738 | "in": "query", |
| 2739 | "description": "Limit the number of transition records returned to prevent response explosion.\n\n**Format:** Integer (maximum number of transitions)\n\n**Default:** No limit (but respects `last` parameter)\n\n**Relationship with `last`:**\n- `last`: Controls result set size (pagination)\n- `cardinality`: Hard limit on response size\n\n**Use Cases:**\n- Ensure responses stay within size limits\n- Protect against accidentally requesting huge result sets\n- API clients with memory constraints\n\n**Example:**\n- `cardinality=1000` - Never return more than 1000 transitions\n\n**Alias:** Can also be specified as `cardinality_limit`\n\n**Best Practice:** Use `last` for normal pagination, use `cardinality` as a safety limit.\n\nWhen the limit is exceeded, the response may indicate how many transitions were omitted.\n", |
| 2740 | "required": false, |
| 2741 | "schema": { |
| 2742 | "type": "integer", |
| 2743 | "minimum": 1 |
| 2744 | }, |
| 2745 | "example": 1000 |
| 2746 | } |
| 2747 | ], |
| 2748 | "responses": { |
| 2749 | "200": { |
| 2750 | "description": "Success. Returns alert transition history records.\n\n**Response Structure:**\n- Array of transition records, ordered by time (newest first by default)\n- Each record includes:\n - `global_id`: Unique transition ID for pagination\n - `transition_id`: UUID of this specific transition\n - `alert_name`: Name of the alert\n - `chart`, `chart_context`: What metric triggered the alert\n - `old_status`, `new_status`: Status change (e.g., WARNING → CRITICAL)\n - `old_value`, `new_value`: Metric values at transition\n - `when_key`: When the transition occurred (timestamp)\n - `duration`: How long the alert was in old_status\n - `non_clear_duration`: Time spent in non-CLEAR states\n - Alert metadata: type, classification, component, role, recipient\n - Execution details: exec, exec_code, exec_run_timestamp\n - Node information: machine_guid, hostname\n\n**Facets:**\nWhen not in MCP mode, the response includes facet information showing all available values for each facet filter (f_status, f_type, etc.) with counts.\n\n**Pagination:**\n- Use the `global_id` from the last record with `anchor_gi` parameter for next page\n- Response indicates if more results are available\n\n**Response Characteristics:**\n- JSON format\n- Not cacheable (new transitions constantly added)\n- May be cardinality-limited if specified\n- May be timeout-limited (partial results)\n\n**Example Usage:**\n```\nGET /api/v3/alert_transitions?last=100&f_status=CRITICAL&after=-86400\n```\nReturns last 100 transitions to CRITICAL state in the past 24 hours.\n", |
| 2751 | "content": { |
| 2752 | "application/json": { |
| 2753 | "schema": { |
| 2754 | "type": "object", |
| 2755 | "description": "Alert transition history with pagination support" |
| 2756 | } |
| 2757 | } |
| 2758 | } |
| 2759 | }, |
| 2760 | "400": { |
| 2761 | "description": "Bad request. Common causes:\n- Invalid parameter values\n- Malformed filter patterns\n- Invalid facet values\n- Invalid timeout or cardinality values\n- Invalid global_id for anchor_gi\n" |
| 2762 | }, |
| 2763 | "500": { |
| 2764 | "description": "Internal server error during transition query execution." |
| 2765 | } |
| 2766 | } |
| 2767 | } |
| 2768 | }, |
| 2769 | "/api/v3/alert_config": { |
| 2770 | "get": { |
| 2771 | "operationId": "alert_config_v3", |
| 2772 | "tags": [ |
| 2773 | "alerts" |
| 2774 | ], |
| 2775 | "summary": "Retrieve the configuration of a specific alert by its config hash ID", |
| 2776 | "description": "Returns the complete configuration of an alert identified by its unique configuration hash ID (UUID). This endpoint provides detailed information about how an alert is configured, including its thresholds, evaluation logic, notification settings, and metadata.\n\n**What is an Alert Configuration?**\nEach alert in Netdata has a unique configuration that defines:\n- Threshold values (warning and critical)\n- The metric expression being evaluated\n- Evaluation frequency and hysteresis\n- Who to notify (recipients and roles)\n- Notification settings and delays\n- Alert metadata (name, info, summary, classification)\n\n**Configuration Hash ID:**\nThe `config` parameter is a UUID that uniquely identifies an alert configuration. Multiple alert instances may share the same configuration hash if they use identical alert rules.\n\n**How to Get Config Hash IDs:**\n- From `/api/v3/alerts` response - each alert includes its `config_hash_id`\n- From `/api/v3/alert_transitions` response - transitions include `config_hash_id`\n- From alert notifications - config hash is often included in alert payloads\n\n**Use Cases:**\n- **Alert Investigation:** Understand exactly what thresholds triggered an alert\n- **Alert Tuning:** Review current configuration before making changes\n- **Documentation:** Generate documentation of alert configurations\n- **Audit Trails:** Track what alert configurations were in effect at specific times\n- **Troubleshooting:** Verify alert logic when investigating false positives/negatives\n- **Configuration Management:** Compare configurations across environments\n\n**Response Content:**\nThe endpoint returns the complete alert configuration in the format it was defined (typically the Netdata health configuration syntax), including:\n- Alert name and type\n- The metric expression (`on` clause)\n- Warning and critical threshold expressions\n- Calculation method and dimensions\n- Lookup parameters (duration, method)\n- Notification recipients and roles\n- Alert metadata (info, summary, classification, component)\n- Delay settings and hysteresis rules\n\n**Example Workflow:**\n1. Query alerts: `GET /api/v3/alerts?alert=disk_space_usage`\n2. Extract `config_hash_id` from response\n3. Get config: `GET /api/v3/alert_config?config=<uuid>`\n4. Review/analyze the alert configuration details\n\n**Note:** This endpoint requires the exact config hash UUID. Invalid or non-existent UUIDs will return a 400 Bad Request error.\n\n**Security & Access Control:**\n- 📊 **Public Data API** - Bearer token optional, IP-based ACL restrictions apply\n- **Default Access:** Public (no authentication required)\n- **Bearer Protection:** When enabled via `/api/v3/bearer_protection`, requires bearer token\n- **IP Restrictions:** Subject to `allow dashboard from` in netdata.conf\n- **Access Methods:** Direct HTTP/HTTPS, Netdata Cloud, external tools\n", |
| 2777 | "security": [ |
| 2778 | {}, |
| 2779 | { |
| 2780 | "bearerAuth": [] |
| 2781 | } |
| 2782 | ], |
| 2783 | "parameters": [ |
| 2784 | { |
| 2785 | "name": "config", |
| 2786 | "in": "query", |
| 2787 | "description": "The unique configuration hash ID (UUID) of the alert whose configuration to retrieve.\n\n**Format:** UUID string (with or without hyphens)\n\n**Where to Find Config Hash IDs:**\n1. **From /api/v3/alerts Response:**\n Each alert in the response includes a `config_hash_id` field containing the UUID\n\n2. **From /api/v3/alert_transitions Response:**\n Transition records include `config_hash_id` showing which config was active\n\n3. **From Alert Notifications:**\n Alert notifications (email, Slack, etc.) often include the config hash\n\n4. **From Logs:**\n Netdata logs may reference config hashes when loading alert configurations\n\n**UUID Format Examples:**\n- With hyphens: `550e8400-e29b-41d4-a716-446655440000`\n- Without hyphens: `550e8400e29b41d4a716446655440000`\n- Both formats are accepted\n\n**Important Notes:**\n- This parameter is **REQUIRED**\n- Must be a valid UUID format\n- Must reference an existing alert configuration\n- Case-insensitive\n\n**Common Errors:**\n- Missing config parameter → 400 Bad Request with message \"A config hash ID is required\"\n- Invalid UUID format → 400 Bad Request\n- Non-existent UUID → 404 or empty result\n\n**Example Usage:**\n```\nGET /api/v3/alert_config?config=550e8400-e29b-41d4-a716-446655440000\n```\n\n**Tip:** To find all config hash IDs for a specific alert name, query the alerts endpoint first:\n```\nGET /api/v3/alerts?alert=disk_space_usage\n```\nThen extract the `config_hash_id` from the response.\n", |
| 2788 | "required": true, |
| 2789 | "schema": { |
| 2790 | "type": "string", |
| 2791 | "format": "uuid" |
| 2792 | }, |
| 2793 | "example": "550e8400-e29b-41d4-a716-446655440000" |
| 2794 | } |
| 2795 | ], |
| 2796 | "responses": { |
| 2797 | "200": { |
| 2798 | "description": "Success. Returns the complete alert configuration.\n\n**Response Format:**\nThe response contains the alert configuration in a structured format, typically including:\n\n**Core Configuration:**\n- `name`: Alert name/identifier\n- `type`: Alert classification type\n- `on`: Metric expression being monitored\n- `class`: Alert classification category\n- `component`: System component being monitored\n- `lookup`: Metric lookup parameters (method, duration, dimensions)\n\n**Thresholds:**\n- `warn`: Warning threshold expression\n- `crit`: Critical threshold expression\n- `units`: Unit of measurement for values\n\n**Evaluation:**\n- `every`: How often the alert is evaluated\n- `green` / `red`: Hysteresis settings (when to clear/trigger)\n- `calc`: Calculation expression (if any)\n\n**Notifications:**\n- `to`: Notification recipients\n- `exec`: Script to execute on alert\n- `delay`: Notification delay settings\n- `repeat`: Repeat notification settings\n\n**Metadata:**\n- `info`: Detailed alert description\n- `summary`: Brief alert summary\n- `host_labels`: Labels for host filtering\n\n**Response Characteristics:**\n- Content-Type: Typically `text/plain` or `application/json` depending on format\n- Not cacheable (configurations may change)\n- Complete configuration as it exists in the system\n\n**Example Response Structure (JSON format):**\n```json\n{\n \"name\": \"disk_space_usage\",\n \"on\": \"disk.space\",\n \"class\": \"Utilization\",\n \"type\": \"System\",\n \"component\": \"Disk\",\n \"lookup\": \"average -1m percentage of used\",\n \"units\": \"%\",\n \"warn\": \"$this > 80\",\n \"crit\": \"$this > 95\",\n \"info\": \"Disk space utilization is high\",\n \"to\": \"sysadmin\"\n}\n```\n\nThe exact format and fields depend on the alert configuration and may vary between different alert types.\n", |
| 2799 | "content": { |
| 2800 | "application/json": { |
| 2801 | "schema": { |
| 2802 | "type": "object", |
| 2803 | "description": "Alert configuration details" |
| 2804 | } |
| 2805 | }, |
| 2806 | "text/plain": { |
| 2807 | "schema": { |
| 2808 | "type": "string", |
| 2809 | "description": "Alert configuration in text format" |
| 2810 | } |
| 2811 | } |
| 2812 | } |
| 2813 | }, |
| 2814 | "400": { |
| 2815 | "description": "Bad request. Common causes:\n- Missing `config` parameter (error: \"A config hash ID is required. Add ?config=UUID query param\")\n- Invalid UUID format\n- Malformed request\n\n**Error Response:**\nReturns plain text error message explaining what went wrong.\n" |
| 2816 | }, |
| 2817 | "404": { |
| 2818 | "description": "Configuration not found. The specified config hash ID does not exist or has been removed.\n\n**Common Reasons:**\n- Alert configuration was deleted\n- Alert configuration was modified (gets a new hash)\n- UUID was mistyped\n- Configuration is from a different Netdata instance\n" |
| 2819 | }, |
| 2820 | "500": { |
| 2821 | "description": "Internal server error during configuration retrieval." |
| 2822 | } |
| 2823 | } |
| 2824 | } |
| 2825 | }, |
| 2826 | "/api/v3/variable": { |
| 2827 | "get": { |
| 2828 | "operationId": "variable_v3", |
| 2829 | "tags": [ |
| 2830 | "variables" |
| 2831 | ], |
| 2832 | "summary": "Retrieve the value of a specific chart variable used in alert expressions", |
| 2833 | "description": "Returns the current value of a variable associated with a specific chart. Variables are used in alert expressions for dynamic threshold calculations, data transformations, and alert logic evaluation.\n\n**What are Chart Variables?**\nVariables in Netdata are named values that can be:\n- **Chart-specific metrics:** Current values from dimensions (e.g., `$used`, `$total`)\n- **Calculated values:** Derived from chart data (e.g., percentages, ratios)\n- **Statistical values:** Min, max, average values over time windows\n- **Alert-related values:** Previous alert states, thresholds\n- **System variables:** Host labels, node information\n\n**Common Use Cases:**\n- **Alert Threshold Debugging:** Understand what value triggered an alert\n- **Alert Expression Development:** Test variable values while writing alert expressions\n- **Troubleshooting:** Verify variable calculations are correct\n- **Dynamic Configuration:** Check runtime values used in alert logic\n\n**Variable Types:**\n1. **Dimension Variables:** Direct dimension values (e.g., `used`, `free`, `cached`)\n2. **Lookup Variables:** Result of lookup operations over time ranges\n3. **Calculated Variables:** Custom calculations defined in alert configs\n4. **Chart Variables:** Chart-level metadata (family, units, etc.)\n5. **Host Variables:** Host-specific values and labels\n\n**Example Variables:**\n- `$this` - The current calculated value\n- `$used` - Value of \"used\" dimension\n- `$total` - Value of \"total\" dimension\n- `$1hour_cpu_usage` - CPU usage over last hour (lookup variable)\n- `$ram_percentage` - Calculated RAM usage percentage\n\n**How Variables Work in Alerts:**\nAlert expressions like `$this > 80` use variables to dynamically evaluate conditions. This endpoint lets you see the actual runtime values of these variables.\n\n**Workflow for Alert Development:**\n1. Identify the chart: `GET /api/v1/charts` or `GET /api/v3/contexts`\n2. Get variable value: `GET /api/v3/variable?chart=system.ram&variable=$used`\n3. Test alert expression with actual values\n4. Refine alert thresholds based on variable behavior\n\n**Response Format:**\nReturns JSON with the variable value and metadata about how it was calculated, including:\n- Current value\n- Calculation trace (how the value was computed)\n- Source dimensions\n- Any transformations applied\n\n**Note:** This is a specialized endpoint primarily used for alert development and troubleshooting. For general metric values, use `/api/v3/data` instead.\n\n**Security & Access Control:**\n- 📊 **Public Data API** - Bearer token optional, IP-based ACL restrictions apply\n- **Default Access:** Public (no authentication required)\n- **Bearer Protection:** When enabled via `/api/v3/bearer_protection`, requires bearer token\n- **IP Restrictions:** Subject to `allow dashboard from` in netdata.conf\n- **Access Methods:** Direct HTTP/HTTPS, Netdata Cloud, external tools\n", |
| 2834 | "security": [ |
| 2835 | {}, |
| 2836 | { |
| 2837 | "bearerAuth": [] |
| 2838 | } |
| 2839 | ], |
| 2840 | "parameters": [ |
| 2841 | { |
| 2842 | "name": "chart", |
| 2843 | "in": "query", |
| 2844 | "description": "The chart identifier (ID or name) where the variable is defined.\n\n**Chart Identifier Format:**\nCharts can be specified by either their unique ID or their name.\n\n**Chart ID Format:**\n- Format: `type.name` (e.g., `system.cpu`, `disk.sda_io`, `mysql.queries`)\n- This is the canonical identifier shown in chart metadata\n- Case-sensitive\n- More reliable as it doesn't change\n\n**Chart Name Format:**\n- Human-readable name (e.g., \"System CPU\")\n- May contain spaces\n- Less reliable as it can change\n- The API will try to find by name if ID lookup fails\n\n**How to Find Chart IDs:**\n1. **From /api/v1/charts:**\n ```\n GET /api/v1/charts\n ```\n Response includes all chart IDs in the system\n\n2. **From /api/v3/contexts:**\n ```\n GET /api/v3/contexts\n ```\n Lists contexts and their chart instances\n\n3. **From Alert Configuration:**\n Alert configs reference charts in their `on` clause\n\n4. **From Netdata Dashboard:**\n Chart IDs are shown in chart metadata\n\n**Examples:**\n- `chart=system.cpu` - System CPU chart\n- `chart=system.ram` - System RAM chart\n- `chart=disk.sda_io` - Disk sda I/O chart\n- `chart=mysql.queries` - MySQL queries chart\n\n**Common Chart IDs by Category:**\n- **System:** `system.cpu`, `system.load`, `system.ram`, `system.io`\n- **Disk:** `disk.space`, `disk.io`, `disk.inodes`\n- **Network:** `net.eth0`, `net.packets`\n- **Databases:** `mysql.queries`, `postgres.connections`, `redis.memory`\n\n**Important Notes:**\n- This parameter is **REQUIRED**\n- Must reference an existing chart on the specified host\n- Chart must be actively collecting data\n- Case-sensitive\n\n**Error Handling:**\n- Missing parameter → 400 Bad Request: \"A chart= and a variable= are required.\"\n- Invalid/non-existent chart → 404 Not Found: \"Chart is not found: <chart>\"\n", |
| 2845 | "required": true, |
| 2846 | "schema": { |
| 2847 | "type": "string" |
| 2848 | }, |
| 2849 | "examples": { |
| 2850 | "system_ram": { |
| 2851 | "value": "system.ram", |
| 2852 | "summary": "System RAM chart" |
| 2853 | }, |
| 2854 | "disk_space": { |
| 2855 | "value": "disk.space", |
| 2856 | "summary": "Disk space chart" |
| 2857 | }, |
| 2858 | "mysql": { |
| 2859 | "value": "mysql.queries", |
| 2860 | "summary": "MySQL queries chart" |
| 2861 | } |
| 2862 | } |
| 2863 | }, |
| 2864 | { |
| 2865 | "name": "variable", |
| 2866 | "in": "query", |
| 2867 | "description": "The variable name to look up within the specified chart.\n\n**Variable Name Format:**\nVariable names typically follow these conventions:\n- Start with `$` in alert expressions, but the `$` is optional in this parameter\n- Names are case-sensitive\n- Can reference dimensions, calculated values, or lookups\n\n**Variable Name Categories:**\n\n**1. Dimension Variables (most common):**\nDirect references to chart dimensions:\n- `used` - Value of \"used\" dimension\n- `free` - Value of \"free\" dimension\n- `cached` - Value of \"cached\" dimension\n- `buffers` - Value of \"buffers\" dimension\n- `read` - Read operations/bytes\n- `write` - Write operations/bytes\n\n**2. Special Variables:**\n- `this` - The calculated/evaluated value from alert expression\n- `status` - Current alert status\n- `value` - Current metric value\n\n**3. Lookup Variables:**\nVariables created via lookup operations:\n- Format: `<duration>_<dimension>_<method>`\n- Example: `1hour_cpu_avg` - Average CPU over last hour\n- Example: `5min_disk_used_max` - Max disk used in last 5 minutes\n\n**4. Calculated Variables:**\nCustom variables defined in alert configurations:\n- `ram_percentage` - (used / total) * 100\n- `disk_usage_ratio` - used / total\n- `error_rate` - errors / total_requests\n\n**5. Chart Metadata Variables:**\n- `family` - Chart family/category\n- `units` - Chart units\n- `chart_type` - Chart type\n\n**How to Discover Available Variables:**\n1. **From Alert Configuration:**\n Alert expressions reveal which variables are available\n ```\n GET /api/v3/alert_config?config=<uuid>\n ```\n\n2. **From /api/v1/alarm_variables:**\n Lists all variables for a chart\n ```\n GET /api/v1/alarm_variables?chart=system.ram\n ```\n\n3. **From Chart Dimensions:**\n Dimension names are typically available as variables\n ```\n GET /api/v1/chart?chart=system.ram\n ```\n\n**Common Variable Examples by Chart:**\n\n**For system.ram:**\n- `used`, `free`, `cached`, `buffers`\n\n**For system.cpu:**\n- `user`, `system`, `nice`, `idle`, `iowait`\n\n**For disk.space:**\n- `used`, `avail` (available), `reserved`\n\n**For disk.io:**\n- `read`, `write`\n\n**For mysql.queries:**\n- `select`, `insert`, `update`, `delete`\n\n**Important Notes:**\n- This parameter is **REQUIRED**\n- Variable name must exist in the chart's variable set\n- Case-sensitive\n- The `$` prefix is optional (both `$used` and `used` work)\n\n**Error Handling:**\n- Missing parameter → 400 Bad Request: \"A chart= and a variable= are required.\"\n- Non-existent variable → Returns trace showing variable not found\n", |
| 2868 | "required": true, |
| 2869 | "schema": { |
| 2870 | "type": "string" |
| 2871 | }, |
| 2872 | "examples": { |
| 2873 | "dimension_value": { |
| 2874 | "value": "used", |
| 2875 | "summary": "Get 'used' dimension value" |
| 2876 | }, |
| 2877 | "with_dollar": { |
| 2878 | "value": "$used", |
| 2879 | "summary": "Variable with $ prefix (equivalent)" |
| 2880 | }, |
| 2881 | "special_variable": { |
| 2882 | "value": "this", |
| 2883 | "summary": "Current calculated value" |
| 2884 | } |
| 2885 | } |
| 2886 | } |
| 2887 | ], |
| 2888 | "responses": { |
| 2889 | "200": { |
| 2890 | "description": "Success. Returns the variable value and calculation trace.\n\n**Response Structure:**\nThe response is a JSON object containing:\n\n**Variable Lookup Trace:**\nShows the step-by-step process of how the variable value was calculated:\n- Variable name being looked up\n- Source dimensions queried\n- Calculation methods applied\n- Intermediate values\n- Final calculated value\n\n**Example Response:**\n```json\n{\n \"variable\": \"$used\",\n \"chart\": \"system.ram\",\n \"value\": 8589934592,\n \"units\": \"B\",\n \"trace\": [\n {\n \"step\": \"lookup_dimension\",\n \"dimension\": \"used\",\n \"raw_value\": 8589934592\n },\n {\n \"step\": \"final_value\",\n \"value\": 8589934592,\n \"units\": \"B\"\n }\n ]\n}\n```\n\n**Response Fields:**\n- `variable`: The requested variable name\n- `chart`: The chart ID where variable was found\n- `value`: Current numeric value of the variable\n- `units`: Unit of measurement\n- `trace`: Array of calculation steps showing how value was derived\n\n**Trace Information:**\nThe trace provides transparency into variable evaluation, showing:\n- Dimension lookups performed\n- Data aggregation methods used\n- Time ranges evaluated\n- Transformations applied\n- Why certain values were selected\n\n**Use Cases for Trace:**\n- **Debugging Alerts:** Understand why an alert triggered\n- **Validating Logic:** Verify alert expressions evaluate correctly\n- **Performance Analysis:** See which dimensions contribute to variable\n- **Education:** Learn how alert variables are calculated\n\n**Response Characteristics:**\n- Content-Type: application/json\n- Not cacheable (values change constantly)\n- Real-time evaluation at query time\n- Includes calculation metadata\n\n**Note:** The exact trace format depends on the complexity of the variable lookup. Simple dimension variables have short traces, while complex calculated variables or lookups have detailed multi-step traces.\n", |
| 2891 | "content": { |
| 2892 | "application/json": { |
| 2893 | "schema": { |
| 2894 | "type": "object", |
| 2895 | "description": "Variable value and calculation trace" |
| 2896 | } |
| 2897 | } |
| 2898 | } |
| 2899 | }, |
| 2900 | "400": { |
| 2901 | "description": "Bad request. Common causes:\n- Missing `chart` parameter (error: \"A chart= and a variable= are required.\")\n- Missing `variable` parameter (error: \"A chart= and a variable= are required.\")\n- Empty parameter values\n- Malformed request\n\n**Error Response:**\nReturns plain text error message explaining what went wrong.\n\n**Example Error:**\n```\nA chart= and a variable= are required.\n```\n" |
| 2902 | }, |
| 2903 | "404": { |
| 2904 | "description": "Chart not found. The specified chart ID or name does not exist.\n\n**Error Response:**\nReturns plain text message indicating chart was not found.\n\n**Example Error:**\n```\nChart is not found: system.nonexistent\n```\n\n**Common Reasons:**\n- Chart ID was mistyped\n- Chart doesn't exist on this host\n- Chart was removed (plugin stopped collecting)\n- Chart is on a different node (check node parameter if in multi-node setup)\n\n**Troubleshooting:**\n1. List available charts: `GET /api/v1/charts`\n2. Verify chart ID spelling and capitalization\n3. Check if chart is actively collecting data\n4. Ensure you're querying the correct node\n" |
| 2905 | }, |
| 2906 | "500": { |
| 2907 | "description": "Internal server error during variable lookup." |
| 2908 | } |
| 2909 | } |
| 2910 | } |
| 2911 | }, |
| 2912 | "/api/v3/info": { |
| 2913 | "get": { |
| 2914 | "operationId": "info_v3", |
| 2915 | "tags": [ |
| 2916 | "nodes" |
| 2917 | ], |
| 2918 | "summary": "Retrieve detailed Netdata agent information across all nodes", |
| 2919 | "description": "Returns comprehensive information about Netdata agents running across the monitored infrastructure. This endpoint provides detailed metadata about each agent including version information, capabilities, collection status, and system configuration.\n\n**What is Netdata Agent Information?**\nThe `info` endpoint provides detailed metadata about the Netdata monitoring agent itself, including:\n- Agent version and build information\n- System capabilities and features enabled\n- Collection status and health\n- Host configuration and labels\n- Database information (storage, retention)\n- Plugin and collector status\n- Operating system details\n- Hardware information\n\n**Difference from /api/v3/nodes:**\n- **`/api/v3/nodes`:** Returns lightweight node list with basic identification\n- **`/api/v3/info`:** Returns comprehensive agent details with full capabilities and configuration\n\n**Multi-Node Support:**\nWhen queried on a Netdata Parent, this endpoint can return information for:\n- The parent agent itself\n- All child agents (streaming to the parent)\n- Filtered subsets using scope_nodes/nodes parameters\n\n**Use Cases:**\n- **Infrastructure Inventory:** Complete catalog of all Netdata installations\n- **Version Audits:** Find agents that need updates\n- **Capability Discovery:** What features are available on each node\n- **Health Monitoring:** Verify agent collection status\n- **Configuration Management:** Understand how agents are configured\n- **Troubleshooting:** Diagnose agent-specific issues\n- **License/Compliance:** Track Netdata deployments\n\n**Information Categories:**\n\n**1. Agent Identity:**\n- Unique agent ID (machine_guid)\n- Hostname\n- Agent version and commit\n- Build information\n\n**2. System Information:**\n- Operating system and kernel\n- CPU architecture\n- Virtualization platform\n- Container runtime (if applicable)\n\n**3. Database & Storage:**\n- Database mode (dbengine, ram, alloc)\n- Retention period\n- Storage capacity\n- Disk space usage\n\n**4. Features & Capabilities:**\n- ML/anomaly detection status\n- ACLK (cloud connection) status\n- Streaming capabilities\n- Available collectors\n\n**5. Collection Status:**\n- Number of charts collecting\n- Number of dimensions\n- Collection frequency\n- Last collection timestamp\n\n**6. Host Labels:**\n- Custom labels assigned to the host\n- Automatic labels (OS, architecture, etc.)\n- Cloud provider information (if detected)\n\n**Performance Characteristics:**\n- Fast query (primarily metadata lookups)\n- No time-series data processing\n- Results can be cached for reasonable duration\n- Supports filtering by node patterns\n\n**Example Usage:**\n```\n# Get info for all nodes\nGET /api/v3/info\n\n# Get info for specific nodes\nGET /api/v3/info?nodes=web-server-01,db-server-01\n\n# Get info for nodes matching pattern\nGET /api/v3/info?scope_nodes=prod-*\n\n# Include specific options\nGET /api/v3/info?options=full\n```\n\n**Response Format:**\nReturns JSON with agent information grouped by node, including complete details about each agent's capabilities, configuration, and current status.\n\n**Security & Access Control:**\n- 🔓 **Always Public API** - This endpoint is always accessible without authentication\n- **No Restrictions:** Not subject to bearer protection or IP-based ACL restrictions\n- **No Authentication:** Cannot be restricted by any configuration\n- **Access:** Available to anyone who can reach the agent's HTTP endpoint\n", |
| 2920 | "parameters": [ |
| 2921 | { |
| 2922 | "name": "scope_nodes", |
| 2923 | "in": "query", |
| 2924 | "description": "Filter to specific nodes using simple pattern matching.\n\n**Pattern Syntax:**\n- `*` matches any characters\n- Space-separated list for multiple patterns\n- `!` prefix to exclude\n- Combine with: `web* !web-test*`\n\n**Examples:**\n- `scope_nodes=web*` - All web servers\n- `scope_nodes=prod-*` - All production nodes\n- `scope_nodes=* !test*` - All except test nodes\n\n**Use Cases:**\n- Focus on specific infrastructure tiers\n- Exclude development/test environments\n- Group by naming conventions\n\nWhen not specified, returns info for all nodes.\n", |
| 2925 | "required": false, |
| 2926 | "schema": { |
| 2927 | "type": "string" |
| 2928 | }, |
| 2929 | "example": "prod-*" |
| 2930 | }, |
| 2931 | { |
| 2932 | "name": "nodes", |
| 2933 | "in": "query", |
| 2934 | "description": "Filter to specific nodes by exact names.\n\nUnlike `scope_nodes`, this requires exact node names (no patterns).\n\n**Format:** Comma or pipe-separated list\n\n**Examples:**\n- `nodes=web-server-01` - Single node\n- `nodes=web-server-01,db-server-01` - Multiple nodes\n- `nodes=web-01|web-02` - Pipe separator\n\n**Best Practice:**\n- Use `nodes` when you know exact names\n- Use `scope_nodes` for pattern-based filtering\n\nWhen not specified, returns info for all nodes matching scope_nodes.\n", |
| 2935 | "required": false, |
| 2936 | "schema": { |
| 2937 | "type": "string" |
| 2938 | }, |
| 2939 | "example": "web-server-01,db-server-01" |
| 2940 | }, |
| 2941 | { |
| 2942 | "name": "options", |
| 2943 | "in": "query", |
| 2944 | "description": "Control the level of detail and what information to include in the response.\n\n**Available Options:**\n- `full` or `all` - Include all available information\n- `labels` - Include host labels\n- `uuids` - Include UUIDs and identifiers\n- `deleted` - Include information about deleted/offline nodes\n- `hidden` - Include hidden agents\n\n**Examples:**\n- `options=full` - Complete information\n- `options=labels,uuids` - Labels and identifiers\n- `options=labels|uuids` - Pipe separator also works\n\n**Default Behavior:**\nWhen not specified, returns standard information without deleted/hidden nodes and without excessive detail.\n\n**Use Cases:**\n- Inventory systems need `full` detail\n- Label-based filtering needs `labels`\n- Historical analysis may need `deleted`\n", |
| 2945 | "required": false, |
| 2946 | "schema": { |
| 2947 | "type": "string" |
| 2948 | }, |
| 2949 | "example": "full,labels" |
| 2950 | }, |
| 2951 | { |
| 2952 | "$ref": "#/components/parameters/after" |
| 2953 | }, |
| 2954 | { |
| 2955 | "$ref": "#/components/parameters/before" |
| 2956 | }, |
| 2957 | { |
| 2958 | "name": "timeout", |
| 2959 | "in": "query", |
| 2960 | "description": "Maximum time in milliseconds to wait for the query to complete.\n\n**Format:** Integer (milliseconds)\n\n**Default:** Server default timeout\n\n**Example:**\n- `timeout=30000` - 30 second timeout\n\nFor agent info queries, timeouts are rarely needed as this is a fast metadata-only operation. However, on very large multi-node setups, you may want to limit query time.\n", |
| 2961 | "required": false, |
| 2962 | "schema": { |
| 2963 | "type": "integer", |
| 2964 | "format": "int64", |
| 2965 | "minimum": 1000 |
| 2966 | }, |
| 2967 | "example": 30000 |
| 2968 | }, |
| 2969 | { |
| 2970 | "name": "cardinality", |
| 2971 | "in": "query", |
| 2972 | "description": "Limit the number of nodes returned.\n\n**Format:** Integer (maximum nodes)\n\n**Default:** No limit\n\n**Example:**\n- `cardinality=100` - Return at most 100 nodes\n\n**Use Cases:**\n- Prevent huge responses in very large infrastructures\n- Get a sample of nodes for testing\n- Dashboard widgets with limited display space\n\nWhen exceeded, response indicates how many nodes were omitted.\n", |
| 2973 | "required": false, |
| 2974 | "schema": { |
| 2975 | "type": "integer", |
| 2976 | "minimum": 1 |
| 2977 | }, |
| 2978 | "example": 100 |
| 2979 | } |
| 2980 | ], |
| 2981 | "responses": { |
| 2982 | "200": { |
| 2983 | "description": "Success. Returns detailed Netdata agent information.\n\n**Response Structure:**\nThe response is a JSON object containing comprehensive agent information grouped by node.\n\n**Top-Level Structure:**\n- `agents`: Array of agent information objects, one per node\n\n**Per-Agent Information Includes:**\n\n**1. Identity:**\n- `machine_guid`: Unique agent identifier (UUID)\n- `hostname`: Node hostname\n- `agent_version`: Netdata version string\n- `agent_commit`: Git commit hash of build\n\n**2. System Information:**\n- `os_name`: Operating system name\n- `os_version`: OS version\n- `kernel_name`: Kernel name\n- `kernel_version`: Kernel version\n- `architecture`: CPU architecture (x86_64, aarch64, etc.)\n- `virtualization`: Virtualization platform (if any)\n- `container`: Container runtime (Docker, LXC, etc.)\n- `container_detection`: How container was detected\n\n**3. Database & Storage:**\n- `database_mode`: Storage mode (dbengine, ram, alloc, none)\n- `database_retention`: Data retention period in seconds\n- `database_size`: Current database size in bytes\n- `page_cache_size`: Page cache size\n- `metrics_stored`: Number of unique metrics\n\n**4. Features & Capabilities:**\n- `ml_enabled`: Machine learning / anomaly detection enabled\n- `ml_models_running`: Number of ML models active\n- `aclk_available`: Cloud connectivity available\n- `aclk_status`: Cloud connection status\n- `stream_compression`: Streaming compression supported\n- `web_enabled`: Web server enabled\n\n**5. Collection Status:**\n- `charts_count`: Number of charts being collected\n- `dimensions_count`: Number of dimensions (time-series)\n- `collectors_count`: Number of active collectors\n- `update_every`: Collection frequency in seconds\n- `history`: Retention in seconds\n- `memory_mode`: Memory storage mode\n\n**6. Host Labels:**\n- `host_labels`: Object containing all host labels\n - Includes automatic labels (_os_name, _architecture, etc.)\n - Includes custom labels assigned by user\n - May include cloud provider labels\n\n**7. Timestamps:**\n- `first_time_t`: Timestamp of oldest data point\n- `last_time_t`: Timestamp of newest data point\n- `now`: Current server time\n\n**8. Streaming Information (if applicable):**\n- `stream_status`: Streaming status (parent/child)\n- `stream_parents`: Parent nodes (if child)\n- `stream_children`: Child nodes (if parent)\n\n**Example Response Structure:**\n```json\n{\n \"agents\": [\n {\n \"machine_guid\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"hostname\": \"web-server-01\",\n \"agent_version\": \"v1.40.0\",\n \"os_name\": \"ubuntu\",\n \"os_version\": \"22.04\",\n \"kernel_version\": \"5.15.0\",\n \"architecture\": \"x86_64\",\n \"database_mode\": \"dbengine\",\n \"database_retention\": 86400,\n \"ml_enabled\": true,\n \"charts_count\": 425,\n \"dimensions_count\": 2850,\n \"update_every\": 1,\n \"host_labels\": {\n \"_os_name\": \"ubuntu\",\n \"_architecture\": \"x86_64\",\n \"environment\": \"production\",\n \"tier\": \"web\"\n }\n }\n ]\n}\n```\n\n**Response Characteristics:**\n- Content-Type: application/json\n- Can be cached (agent info changes infrequently)\n- Complete metadata without time-series data\n- Lightweight and fast to generate\n\n**Filtering:**\nResponse respects scope_nodes/nodes filters and cardinality limits.\n", |
| 2984 | "content": { |
| 2985 | "application/json": { |
| 2986 | "schema": { |
| 2987 | "type": "object", |
| 2988 | "description": "Comprehensive Netdata agent information" |
| 2989 | } |
| 2990 | } |
| 2991 | } |
| 2992 | }, |
| 2993 | "400": { |
| 2994 | "description": "Bad request. Common causes:\n- Invalid parameter values\n- Malformed filter patterns\n" |
| 2995 | }, |
| 2996 | "500": { |
| 2997 | "description": "Internal server error during info retrieval." |
| 2998 | } |
| 2999 | } |
| 3000 | } |
| 3001 | }, |
| 3002 | "/api/v3/node_instances": { |
| 3003 | "get": { |
| 3004 | "operationId": "node_instances_v3", |
| 3005 | "tags": [ |
| 3006 | "nodes" |
| 3007 | ], |
| 3008 | "summary": "Retrieve chart instances organized by node across the infrastructure", |
| 3009 | "description": "Returns information about all chart instances grouped by node. This endpoint provides a comprehensive view of what metrics are being collected on each node, organized by chart instances.\n\n**What are Node Instances?**\nNode instances represent the specific chart instances (individual monitoring targets) on each node:\n- Each node may have multiple instances of the same chart type\n- Examples: Multiple disks (sda, sdb, sdc), multiple network interfaces (eth0, eth1)\n- Instances represent the specific entities being monitored\n\n**Example:**\nFor disk monitoring:\n- Node: `web-server-01`\n - Instances: `disk.sda`, `disk.sdb`, `disk.nvme0n1`\n- Node: `db-server-01`\n - Instances: `disk.sda`, `disk.sdb`\n\n**Difference from Other Endpoints:**\n- **`/api/v3/nodes`:** Returns lightweight node list\n- **`/api/v3/info`:** Returns detailed agent information\n- **`/api/v3/node_instances`:** Returns what chart instances each node has (what's being monitored)\n- **`/api/v3/contexts`:** Returns contexts aggregated across all nodes\n\n**Use Cases:**\n- **Infrastructure Discovery:** What devices/services are monitored on each node\n- **Capacity Planning:** Understand monitoring coverage per node\n- **Configuration Verification:** Verify expected charts are collecting\n- **Collector Status:** See which collectors are active per node\n- **Instance Inventory:** Complete catalog of monitored entities\n- **Troubleshooting:** Find which nodes monitor specific instances\n\n**Response Organization:**\nResults are organized hierarchically:\n1. **By Node:** Top-level grouping by node hostname\n2. **By Context:** Charts grouped by their context (e.g., disk.space)\n3. **By Instance:** Individual chart instances within each context\n\n**Performance Characteristics:**\n- Medium query cost (metadata aggregation across nodes)\n- Response size grows with number of nodes and instances\n- Can be filtered to reduce response size\n- Results can be cached (instances change infrequently)\n\n**Example Query Patterns:**\n```\n# Get all instances across all nodes\nGET /api/v3/node_instances\n\n# Get instances for specific nodes\nGET /api/v3/node_instances?nodes=web-server-01,db-server-01\n\n# Get instances for nodes matching pattern\nGET /api/v3/node_instances?scope_nodes=prod-*\n\n# Limit response size\nGET /api/v3/node_instances?cardinality=100\n```\n\n**Response Includes:**\n- Node identification (hostname, machine_guid)\n- Agent information (version, capabilities)\n- All chart instances organized by context\n- Instance-specific metadata (labels, units, dimensions)\n- Instance collection status\n\n**Security & Access Control:**\n- 📊 **Public Data API** - Bearer token optional, IP-based ACL restrictions apply\n- **Default Access:** Public (no authentication required)\n- **Bearer Protection:** When enabled via `/api/v3/bearer_protection`, requires bearer token\n- **IP Restrictions:** Subject to `allow dashboard from` in netdata.conf\n- **Access Methods:** Direct HTTP/HTTPS, Netdata Cloud, external tools\n", |
| 3010 | "security": [ |
| 3011 | {}, |
| 3012 | { |
| 3013 | "bearerAuth": [] |
| 3014 | } |
| 3015 | ], |
| 3016 | "parameters": [ |
| 3017 | { |
| 3018 | "name": "scope_nodes", |
| 3019 | "in": "query", |
| 3020 | "description": "Filter to specific nodes using pattern matching.\n\n**Pattern Syntax:**\n- `*` matches any characters\n- Space-separated for multiple patterns\n- `!` prefix excludes\n- Example: `prod-* !prod-test*`\n\n**Examples:**\n- `scope_nodes=web*` - All web servers\n- `scope_nodes=db-* cache-*` - Database and cache nodes\n- `scope_nodes=* !test*` - All except test nodes\n\nWhen not specified, returns instances from all nodes.\n", |
| 3021 | "required": false, |
| 3022 | "schema": { |
| 3023 | "type": "string" |
| 3024 | }, |
| 3025 | "example": "prod-*" |
| 3026 | }, |
| 3027 | { |
| 3028 | "name": "nodes", |
| 3029 | "in": "query", |
| 3030 | "description": "Filter to specific nodes by exact names.\n\n**Format:** Comma or pipe-separated exact names\n\n**Examples:**\n- `nodes=web-server-01` - Single node\n- `nodes=web-01,db-01` - Multiple nodes\n\n**Best Practice:** Use `nodes` for exact names, `scope_nodes` for patterns.\n\nWhen not specified, returns instances from all nodes.\n", |
| 3031 | "required": false, |
| 3032 | "schema": { |
| 3033 | "type": "string" |
| 3034 | }, |
| 3035 | "example": "web-server-01,db-server-01" |
| 3036 | }, |
| 3037 | { |
| 3038 | "name": "options", |
| 3039 | "in": "query", |
| 3040 | "description": "Control response detail level and included information.\n\n**Available Options:**\n- `full` or `all` - Complete instance information\n- `labels` - Include instance labels\n- `uuids` - Include UUIDs and identifiers\n- `deleted` - Include deleted/offline instances\n- `hidden` - Include hidden instances\n- `instances` or `charts` - Include chart instances (default)\n- `metrics` or `dimensions` - Include dimension details\n\n**Examples:**\n- `options=full` - All information\n- `options=labels,dimensions` - Labels and dimension details\n- `options=labels|uuids` - Pipe separator\n\n**Default:** Returns basic instance information without excessive detail.\n", |
| 3041 | "required": false, |
| 3042 | "schema": { |
| 3043 | "type": "string" |
| 3044 | }, |
| 3045 | "example": "full,labels,dimensions" |
| 3046 | }, |
| 3047 | { |
| 3048 | "$ref": "#/components/parameters/after" |
| 3049 | }, |
| 3050 | { |
| 3051 | "$ref": "#/components/parameters/before" |
| 3052 | }, |
| 3053 | { |
| 3054 | "name": "timeout", |
| 3055 | "in": "query", |
| 3056 | "description": "Maximum time in milliseconds to wait for query completion.\n\n**Format:** Integer (milliseconds)\n\n**Default:** Server default timeout\n\n**Example:** `timeout=30000` (30 seconds)\n\nFor large multi-node infrastructures, you may need to increase timeout to allow complete instance enumeration.\n", |
| 3057 | "required": false, |
| 3058 | "schema": { |
| 3059 | "type": "integer", |
| 3060 | "format": "int64", |
| 3061 | "minimum": 1000 |
| 3062 | }, |
| 3063 | "example": 30000 |
| 3064 | }, |
| 3065 | { |
| 3066 | "name": "cardinality", |
| 3067 | "in": "query", |
| 3068 | "description": "Limit the number of instances returned per node.\n\n**Format:** Integer (max instances per node)\n\n**Default:** No limit\n\n**Example:** `cardinality=500` - At most 500 instances per node\n\n**Use Cases:**\n- Prevent huge responses from nodes with many instances\n- Sample instances for testing\n- Dashboard widgets with limited space\n\nWhen exceeded, response indicates how many instances were omitted per node.\n", |
| 3069 | "required": false, |
| 3070 | "schema": { |
| 3071 | "type": "integer", |
| 3072 | "minimum": 1 |
| 3073 | }, |
| 3074 | "example": 500 |
| 3075 | } |
| 3076 | ], |
| 3077 | "responses": { |
| 3078 | "200": { |
| 3079 | "description": "Success. Returns chart instances organized by node.\n\n**Response Structure:**\n```json\n{\n \"nodes\": [\n {\n \"machine_guid\": \"uuid\",\n \"hostname\": \"web-server-01\",\n \"agent_version\": \"v1.40.0\",\n \"contexts\": [\n {\n \"context\": \"disk.space\",\n \"instances\": [\n {\n \"id\": \"disk.sda\",\n \"name\": \"disk sda\",\n \"family\": \"sda\",\n \"labels\": {...},\n \"dimensions\": [...],\n \"status\": \"active\"\n },\n {\n \"id\": \"disk.sdb\",\n \"name\": \"disk sdb\",\n \"family\": \"sdb\",\n \"labels\": {...},\n \"dimensions\": [...],\n \"status\": \"active\"\n }\n ]\n },\n {\n \"context\": \"net.net\",\n \"instances\": [\n {\n \"id\": \"net.eth0\",\n \"name\": \"eth0\",\n \"family\": \"eth0\",\n \"labels\": {...},\n \"dimensions\": [...],\n \"status\": \"active\"\n }\n ]\n }\n ]\n }\n ]\n}\n```\n\n**Response Fields:**\n\n**Node Level:**\n- `machine_guid`: Unique node identifier\n- `hostname`: Node hostname\n- `agent_version`: Netdata version on this node\n- `contexts`: Array of contexts with their instances\n\n**Context Level:**\n- `context`: Context name (e.g., \"disk.space\", \"system.cpu\")\n- `instances`: Array of chart instances for this context\n\n**Instance Level:**\n- `id`: Chart instance ID (e.g., \"disk.sda\")\n- `name`: Human-readable instance name\n- `family`: Chart family/grouping\n- `labels`: Instance-specific labels\n- `dimensions`: Array of dimensions (metrics) collected\n- `status`: Collection status (active, stale, offline)\n- `units`: Unit of measurement\n- `chart_type`: Chart visualization type\n- `priority`: Display priority\n\n**Dimension Information (when options=dimensions):**\n- `id`: Dimension identifier\n- `name`: Dimension display name\n- `algorithm`: Aggregation algorithm\n- `multiplier`, `divisor`: Value transformation\n\n**Label Information (when options=labels):**\n- Instance labels provide additional metadata\n- Examples: disk_type=ssd, interface_speed=1000, mount_point=/\n\n**Response Characteristics:**\n- Content-Type: application/json\n- Cacheable (instances change infrequently)\n- Size grows with number of nodes and instances\n- Organized hierarchically for easy navigation\n\n**Filtering:**\nResponse respects scope_nodes/nodes filters and cardinality limits.\n", |
| 3080 | "content": { |
| 3081 | "application/json": { |
| 3082 | "schema": { |
| 3083 | "type": "object", |
| 3084 | "description": "Chart instances organized by node" |
| 3085 | } |
| 3086 | } |
| 3087 | } |
| 3088 | }, |
| 3089 | "400": { |
| 3090 | "description": "Bad request. Common causes:\n- Invalid parameter values\n- Malformed filter patterns\n" |
| 3091 | }, |
| 3092 | "500": { |
| 3093 | "description": "Internal server error during instance enumeration." |
| 3094 | } |
| 3095 | } |
| 3096 | } |
| 3097 | }, |
| 3098 | "/api/v3/stream_path": { |
| 3099 | "get": { |
| 3100 | "operationId": "stream_path", |
| 3101 | "tags": [ |
| 3102 | "nodes" |
| 3103 | ], |
| 3104 | "summary": "Retrieve streaming topology path for nodes", |
| 3105 | "description": "**V3 SPECIFIC ENDPOINT**\n\nReturns the streaming path and topology showing how nodes are connected in the Netdata infrastructure.\nThis endpoint reveals the parent-child relationships between nodes, showing which nodes stream data\nto which parents, creating a hierarchical view of the monitoring infrastructure.\n\n**Streaming Topology:**\n- **Parent nodes**: Nodes that receive streaming data from child nodes\n- **Child nodes**: Nodes that send their metrics to parent nodes for centralization\n- **Streaming path**: The complete chain from child → parent → grandparent (if any)\n\n**Use Cases:**\n- Understand infrastructure hierarchy and data flow\n- Identify parent nodes that aggregate data from multiple children\n- Debug streaming connectivity issues\n- Plan infrastructure changes and reorganization\n- Visualize the complete monitoring topology\n\n**Common Usage Patterns:**\n\n1. **Get complete streaming topology:**\n ```\n /api/v3/stream_path\n ```\n\n2. **Filter by specific nodes:**\n ```\n /api/v3/stream_path?nodes=child-node-1|child-node-2\n ```\n\n3. **Scope to nodes matching pattern:**\n ```\n /api/v3/stream_path?scope_nodes=prod-*\n ```\n\n**Response Structure:**\nThe response includes nodes organized by their streaming relationships, showing:\n- Node hostnames and machine GUIDs\n- Parent-child relationships\n- Streaming connection status (live/stale/offline)\n- Complete path from each child to root parent\n\n**Security & Access Control:**\n- 📊 **Public Data API** - Bearer token optional, IP-based ACL restrictions apply\n- **Default Access:** Public (no authentication required)\n- **Bearer Protection:** When enabled via `/api/v3/bearer_protection`, requires bearer token\n- **IP Restrictions:** Subject to `allow dashboard from` in netdata.conf\n- **Access Methods:** Direct HTTP/HTTPS, Netdata Cloud, external tools\n", |
| 3106 | "security": [ |
| 3107 | {}, |
| 3108 | { |
| 3109 | "bearerAuth": [] |
| 3110 | } |
| 3111 | ], |
| 3112 | "parameters": [ |
| 3113 | { |
| 3114 | "name": "scope_nodes", |
| 3115 | "in": "query", |
| 3116 | "required": false, |
| 3117 | "description": "Simple pattern to match node hostnames for scope filtering. Uses Netdata's simple pattern\nmatching (not regex). Matched nodes define the scope for topology analysis.\n\n**Pattern Syntax:**\n- `*` matches any number of characters\n- Use `|` to separate multiple patterns (OR logic)\n- Matches are case-insensitive\n- No regex support - only simple wildcards\n\n**Examples:**\n- `prod-*` - All production nodes\n- `*-web-*` - All web server nodes\n- `db-*|cache-*` - All database or cache nodes\n- `*` - All nodes (default)\n", |
| 3118 | "schema": { |
| 3119 | "type": "string", |
| 3120 | "default": "*" |
| 3121 | }, |
| 3122 | "example": "prod-*" |
| 3123 | }, |
| 3124 | { |
| 3125 | "name": "nodes", |
| 3126 | "in": "query", |
| 3127 | "required": false, |
| 3128 | "description": "Simple pattern to filter which nodes to include in the streaming path response.\nAfter scope is determined, this filters the results. Uses the same pattern syntax as scope_nodes.\n\n**Difference from scope_nodes:**\n- `scope_nodes` defines what nodes to analyze for relationships\n- `nodes` filters which nodes to include in the output\n\n**Examples:**\n- `web-*` - Only show web server nodes in output\n- `parent-*` - Only show parent nodes\n- Specific hostnames: `node1|node2|node3`\n", |
| 3129 | "schema": { |
| 3130 | "type": "string", |
| 3131 | "default": "*" |
| 3132 | }, |
| 3133 | "example": "web-*" |
| 3134 | }, |
| 3135 | { |
| 3136 | "name": "options", |
| 3137 | "in": "query", |
| 3138 | "required": false, |
| 3139 | "description": "Comma-separated list of options to control response content and format.\n\n**Available Options:**\n- `minify` - Minimize JSON output (no pretty-printing)\n- `debug` - Include debug information about streaming connections\n- `raw` - Include raw streaming metadata\n\n**Examples:**\n- `minify` - Compact JSON response\n- `debug,raw` - Debug mode with raw metadata\n", |
| 3140 | "schema": { |
| 3141 | "type": "string" |
| 3142 | }, |
| 3143 | "example": "debug" |
| 3144 | }, |
| 3145 | { |
| 3146 | "name": "timeout", |
| 3147 | "in": "query", |
| 3148 | "required": false, |
| 3149 | "description": "Maximum time in seconds to wait for the query to complete before timing out.\n\n**Guidelines:**\n- Recommended: 30-60 seconds for most queries\n- Large infrastructures may need longer timeouts\n- Queries timeout if streaming metadata collection takes too long\n", |
| 3150 | "schema": { |
| 3151 | "type": "integer", |
| 3152 | "minimum": 1, |
| 3153 | "default": 60 |
| 3154 | }, |
| 3155 | "example": 30 |
| 3156 | }, |
| 3157 | { |
| 3158 | "name": "cardinality", |
| 3159 | "in": "query", |
| 3160 | "required": false, |
| 3161 | "description": "Maximum number of nodes to include in the response to prevent overwhelming large responses.\nWhen this limit is exceeded, the response will indicate how many nodes were omitted.\n\n**Purpose:**\n- Prevent memory exhaustion from very large infrastructures\n- Control response size for performance\n- Useful when exploring large node hierarchies incrementally\n\n**Recommendations:**\n- Small infrastructures (< 50 nodes): Use default or increase\n- Medium infrastructures (50-500 nodes): 200-500\n- Large infrastructures (> 500 nodes): Use filtering or increase limit carefully\n", |
| 3162 | "schema": { |
| 3163 | "type": "integer", |
| 3164 | "minimum": 1, |
| 3165 | "maximum": 10000, |
| 3166 | "default": 1000 |
| 3167 | }, |
| 3168 | "example": 500 |
| 3169 | } |
| 3170 | ], |
| 3171 | "responses": { |
| 3172 | "200": { |
| 3173 | "description": "Successfully retrieved streaming topology path information.\n\nReturns nodes with their streaming relationships, showing parent-child hierarchy,\nconnection status, and complete paths from children to root parents.\n", |
| 3174 | "content": { |
| 3175 | "application/json": { |
| 3176 | "schema": { |
| 3177 | "type": "object", |
| 3178 | "properties": { |
| 3179 | "nodes": { |
| 3180 | "type": "array", |
| 3181 | "description": "Array of nodes with streaming path information", |
| 3182 | "items": { |
| 3183 | "type": "object", |
| 3184 | "properties": { |
| 3185 | "hostname": { |
| 3186 | "type": "string", |
| 3187 | "description": "Node hostname" |
| 3188 | }, |
| 3189 | "machine_guid": { |
| 3190 | "type": "string", |
| 3191 | "description": "Unique node identifier" |
| 3192 | }, |
| 3193 | "parent": { |
| 3194 | "type": "string", |
| 3195 | "description": "Hostname of parent node (if any)" |
| 3196 | }, |
| 3197 | "parent_guid": { |
| 3198 | "type": "string", |
| 3199 | "description": "Machine GUID of parent node" |
| 3200 | }, |
| 3201 | "streaming_status": { |
| 3202 | "type": "string", |
| 3203 | "enum": [ |
| 3204 | "live", |
| 3205 | "stale", |
| 3206 | "offline" |
| 3207 | ], |
| 3208 | "description": "Current streaming connection status" |
| 3209 | }, |
| 3210 | "path": { |
| 3211 | "type": "array", |
| 3212 | "description": "Complete path from this node to root parent", |
| 3213 | "items": { |
| 3214 | "type": "string" |
| 3215 | } |
| 3216 | } |
| 3217 | } |
| 3218 | } |
| 3219 | }, |
| 3220 | "omitted": { |
| 3221 | "type": "integer", |
| 3222 | "description": "Number of nodes omitted due to cardinality limit" |
| 3223 | } |
| 3224 | } |
| 3225 | } |
| 3226 | } |
| 3227 | } |
| 3228 | }, |
| 3229 | "400": { |
| 3230 | "description": "Invalid parameters provided (e.g., invalid pattern syntax)." |
| 3231 | }, |
| 3232 | "500": { |
| 3233 | "description": "Internal server error during streaming topology retrieval." |
| 3234 | }, |
| 3235 | "504": { |
| 3236 | "description": "Query timeout - streaming topology collection took too long." |
| 3237 | } |
| 3238 | } |
| 3239 | } |
| 3240 | }, |
| 3241 | "/api/v3/versions": { |
| 3242 | "get": { |
| 3243 | "operationId": "versions3", |
| 3244 | "tags": [ |
| 3245 | "versions" |
| 3246 | ], |
| 3247 | "summary": "Retrieve Netdata agent version information across nodes", |
| 3248 | "description": "Returns version information for Netdata agents running on monitored nodes.\nThis endpoint provides visibility into the software versions deployed across your infrastructure,\nhelping identify version mismatches, outdated agents, and upgrade planning.\n\n**Version Information Includes:**\n- Netdata agent version string (e.g., \"v1.40.0\")\n- Build information and commit hash\n- Protocol versions supported\n- Feature capabilities based on version\n\n**Use Cases:**\n- **Version audit**: Identify which nodes run which versions\n- **Upgrade planning**: Find nodes that need updates\n- **Compatibility checking**: Ensure version compatibility across infrastructure\n- **Feature availability**: Determine which features are available on which nodes\n- **Security compliance**: Identify nodes running vulnerable versions\n\n**Common Usage Patterns:**\n\n1. **Get versions of all nodes:**\n ```\n /api/v3/versions\n ```\n\n2. **Check versions of specific nodes:**\n ```\n /api/v3/versions?nodes=prod-*\n ```\n\n3. **Scope to production infrastructure:**\n ```\n /api/v3/versions?scope_nodes=prod-*\n ```\n\n**Response Structure:**\nReturns version information grouped by node, showing:\n- Agent version string\n- Build timestamp\n- Git commit hash\n- Protocol versions\n- Feature flags and capabilities\n\n**Security & Access Control:**\n- 🔓 **Always Public API** - This endpoint is always accessible without authentication\n- **No Restrictions:** Not subject to bearer protection or IP-based ACL restrictions\n- **No Authentication:** Cannot be restricted by any configuration\n- **Access:** Available to anyone who can reach the agent's HTTP endpoint\n", |
| 3249 | "parameters": [ |
| 3250 | { |
| 3251 | "name": "scope_nodes", |
| 3252 | "in": "query", |
| 3253 | "required": false, |
| 3254 | "description": "Simple pattern to match node hostnames for scope filtering. Uses Netdata's simple pattern\nmatching (not regex). Matched nodes define the scope for version information retrieval.\n\n**Pattern Syntax:**\n- `*` matches any number of characters\n- Use `|` to separate multiple patterns (OR logic)\n- Matches are case-insensitive\n- No regex support - only simple wildcards\n\n**Examples:**\n- `prod-*` - All production nodes\n- `*-db-*` - All database nodes\n- `web-*|app-*` - All web or application nodes\n- `*` - All nodes (default)\n", |
| 3255 | "schema": { |
| 3256 | "type": "string", |
| 3257 | "default": "*" |
| 3258 | }, |
| 3259 | "example": "prod-*" |
| 3260 | }, |
| 3261 | { |
| 3262 | "name": "nodes", |
| 3263 | "in": "query", |
| 3264 | "required": false, |
| 3265 | "description": "Simple pattern to filter which nodes to include in the version information response.\nAfter scope is determined, this filters the results. Uses the same pattern syntax as scope_nodes.\n\n**Difference from scope_nodes:**\n- `scope_nodes` defines what nodes to analyze\n- `nodes` filters which nodes appear in the output\n\n**Examples:**\n- `old-*` - Only show nodes matching \"old-*\" pattern\n- Specific hostnames: `node1|node2|node3`\n", |
| 3266 | "schema": { |
| 3267 | "type": "string", |
| 3268 | "default": "*" |
| 3269 | }, |
| 3270 | "example": "*" |
| 3271 | }, |
| 3272 | { |
| 3273 | "name": "options", |
| 3274 | "in": "query", |
| 3275 | "required": false, |
| 3276 | "description": "Comma-separated list of options to control response content and format.\n\n**Available Options:**\n- `minify` - Minimize JSON output (no pretty-printing)\n- `debug` - Include additional debug information\n- `raw` - Include raw version metadata\n\n**Examples:**\n- `minify` - Compact JSON response\n- `debug,raw` - Debug mode with raw metadata\n", |
| 3277 | "schema": { |
| 3278 | "type": "string" |
| 3279 | }, |
| 3280 | "example": "debug" |
| 3281 | }, |
| 3282 | { |
| 3283 | "name": "timeout", |
| 3284 | "in": "query", |
| 3285 | "required": false, |
| 3286 | "description": "Maximum time in seconds to wait for the query to complete before timing out.\n\n**Guidelines:**\n- Recommended: 10-30 seconds for most queries\n- Version information is usually quick to retrieve\n- Timeout mainly applies to very large infrastructures\n", |
| 3287 | "schema": { |
| 3288 | "type": "integer", |
| 3289 | "minimum": 1, |
| 3290 | "default": 60 |
| 3291 | }, |
| 3292 | "example": 10 |
| 3293 | }, |
| 3294 | { |
| 3295 | "name": "cardinality", |
| 3296 | "in": "query", |
| 3297 | "required": false, |
| 3298 | "description": "Maximum number of nodes to include in the response to prevent overwhelming large responses.\nWhen this limit is exceeded, the response will indicate how many nodes were omitted.\n\n**Purpose:**\n- Prevent memory exhaustion from very large infrastructures\n- Control response size for performance\n- Useful when exploring large node sets incrementally\n\n**Recommendations:**\n- Small infrastructures (< 100 nodes): Use default\n- Medium infrastructures (100-1000 nodes): 500-1000\n- Large infrastructures (> 1000 nodes): Use filtering or increase limit carefully\n", |
| 3299 | "schema": { |
| 3300 | "type": "integer", |
| 3301 | "minimum": 1, |
| 3302 | "maximum": 10000, |
| 3303 | "default": 1000 |
| 3304 | }, |
| 3305 | "example": 500 |
| 3306 | } |
| 3307 | ], |
| 3308 | "responses": { |
| 3309 | "200": { |
| 3310 | "description": "Successfully retrieved version information.\n\nReturns version data for each node including agent version, build info,\nprotocol versions, and feature capabilities.\n", |
| 3311 | "content": { |
| 3312 | "application/json": { |
| 3313 | "schema": { |
| 3314 | "type": "object", |
| 3315 | "properties": { |
| 3316 | "versions": { |
| 3317 | "type": "array", |
| 3318 | "description": "Array of version information per node", |
| 3319 | "items": { |
| 3320 | "type": "object", |
| 3321 | "properties": { |
| 3322 | "hostname": { |
| 3323 | "type": "string", |
| 3324 | "description": "Node hostname" |
| 3325 | }, |
| 3326 | "machine_guid": { |
| 3327 | "type": "string", |
| 3328 | "description": "Unique node identifier" |
| 3329 | }, |
| 3330 | "version": { |
| 3331 | "type": "string", |
| 3332 | "description": "Netdata agent version string", |
| 3333 | "example": "v1.40.0" |
| 3334 | }, |
| 3335 | "build_info": { |
| 3336 | "type": "string", |
| 3337 | "description": "Build information and timestamp" |
| 3338 | }, |
| 3339 | "commit_hash": { |
| 3340 | "type": "string", |
| 3341 | "description": "Git commit hash of the build" |
| 3342 | }, |
| 3343 | "protocol_version": { |
| 3344 | "type": "integer", |
| 3345 | "description": "Streaming protocol version supported" |
| 3346 | }, |
| 3347 | "features": { |
| 3348 | "type": "array", |
| 3349 | "description": "Feature flags and capabilities", |
| 3350 | "items": { |
| 3351 | "type": "string" |
| 3352 | } |
| 3353 | } |
| 3354 | } |
| 3355 | } |
| 3356 | }, |
| 3357 | "omitted": { |
| 3358 | "type": "integer", |
| 3359 | "description": "Number of nodes omitted due to cardinality limit" |
| 3360 | } |
| 3361 | } |
| 3362 | } |
| 3363 | } |
| 3364 | } |
| 3365 | }, |
| 3366 | "400": { |
| 3367 | "description": "Invalid parameters provided (e.g., invalid pattern syntax)." |
| 3368 | }, |
| 3369 | "500": { |
| 3370 | "description": "Internal server error during version information retrieval." |
| 3371 | }, |
| 3372 | "504": { |
| 3373 | "description": "Query timeout - version collection took too long." |
| 3374 | } |
| 3375 | } |
| 3376 | } |
| 3377 | }, |
| 3378 | "/api/v3/progress": { |
| 3379 | "get": { |
| 3380 | "operationId": "progress3", |
| 3381 | "tags": [ |
| 3382 | "functions" |
| 3383 | ], |
| 3384 | "summary": "Track progress of long-running function executions", |
| 3385 | "description": "Monitors the progress of long-running Netdata function executions identified by a transaction ID.\nWhen executing functions that may take significant time (e.g., data collection, analysis, exports),\nthis endpoint allows clients to poll for progress updates and track completion status.\n\n**Function Execution Flow:**\n1. Client initiates a function execution (e.g., via `/api/v3/function`)\n2. Function returns immediately with a transaction ID\n3. Client polls `/api/v3/progress?transaction=<id>` for status updates\n4. Progress endpoint returns completion percentage and status\n5. When complete, client retrieves final results\n\n**Progress Information Includes:**\n- **Percentage complete**: 0-100% progress indicator\n- **Status**: running, completed, failed, cancelled\n- **Message**: Human-readable status description\n- **Remaining time estimate**: If available\n\n**Use Cases:**\n- **Long data exports**: Track progress of large data export operations\n- **Analysis functions**: Monitor CPU-intensive analysis tasks\n- **Batch operations**: Track multi-step batch processing\n- **User experience**: Provide progress feedback in UI applications\n\n**Polling Best Practices:**\n- Poll every 1-2 seconds for responsive updates\n- Implement exponential backoff for completed/failed states\n- Set reasonable timeouts (functions may take minutes)\n- Handle cancellation gracefully\n\n**Common Usage Patterns:**\n\n1. **Poll for function progress:**\n ```\n /api/v3/progress?transaction=550e8400-e29b-41d4-a716-446655440000\n ```\n\n2. **Integration with function execution:**\n ```javascript\n // 1. Start function\n const response = await fetch('/api/v3/function?...');\n const { transaction } = await response.json();\n\n // 2. Poll for progress\n const interval = setInterval(async () => {\n const progress = await fetch(`/api/v3/progress?transaction=${transaction}`);\n const { percentage, status } = await progress.json();\n\n if (status === 'completed') {\n clearInterval(interval);\n // Fetch final results\n }\n }, 1000);\n ```\n\n**Transaction ID Format:**\n- UUID v4 format: `xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx`\n- Returned by function execution endpoints\n- Valid for the lifetime of the function execution\n- Expires after completion or timeout\n\n**Security & Access Control:**\n- 🔓 **Always Public API** - This endpoint is always accessible without authentication\n- **No Restrictions:** Not subject to bearer protection or IP-based ACL restrictions\n- **No Authentication:** Cannot be restricted by any configuration\n- **Access:** Available to anyone who can reach the agent's HTTP endpoint\n", |
| 3386 | "parameters": [ |
| 3387 | { |
| 3388 | "name": "transaction", |
| 3389 | "in": "query", |
| 3390 | "required": true, |
| 3391 | "description": "Transaction ID (UUID) of the function execution to track. This ID is returned\nwhen initiating a function execution via `/api/v3/function` or similar endpoints.\n\n**UUID Format:**\n- Standard UUID v4 format\n- Example: `550e8400-e29b-41d4-a716-446655440000`\n- Case-insensitive\n\n**Transaction Lifecycle:**\n- **Created**: When function execution starts\n- **Active**: While function is running\n- **Expired**: After completion, failure, or timeout\n- **Retention**: Transaction state kept briefly after completion for final status retrieval\n\n**Invalid Transaction Handling:**\n- Missing transaction: Returns 400 Bad Request\n- Malformed UUID: Returns 400 Bad Request\n- Expired transaction: Returns 404 Not Found\n- Unknown transaction: Returns 404 Not Found\n", |
| 3392 | "schema": { |
| 3393 | "type": "string", |
| 3394 | "format": "uuid" |
| 3395 | }, |
| 3396 | "example": "550e8400-e29b-41d4-a716-446655440000" |
| 3397 | } |
| 3398 | ], |
| 3399 | "responses": { |
| 3400 | "200": { |
| 3401 | "description": "Successfully retrieved progress information for the transaction.\n\nReturns current progress status including percentage complete, state, and optional message.\n", |
| 3402 | "content": { |
| 3403 | "application/json": { |
| 3404 | "schema": { |
| 3405 | "type": "object", |
| 3406 | "properties": { |
| 3407 | "transaction": { |
| 3408 | "type": "string", |
| 3409 | "format": "uuid", |
| 3410 | "description": "The transaction ID being tracked" |
| 3411 | }, |
| 3412 | "status": { |
| 3413 | "type": "string", |
| 3414 | "enum": [ |
| 3415 | "running", |
| 3416 | "completed", |
| 3417 | "failed", |
| 3418 | "cancelled" |
| 3419 | ], |
| 3420 | "description": "Current status of the function execution" |
| 3421 | }, |
| 3422 | "percentage": { |
| 3423 | "type": "integer", |
| 3424 | "minimum": 0, |
| 3425 | "maximum": 100, |
| 3426 | "description": "Completion percentage (0-100)" |
| 3427 | }, |
| 3428 | "message": { |
| 3429 | "type": "string", |
| 3430 | "description": "Human-readable status message or error description" |
| 3431 | }, |
| 3432 | "done": { |
| 3433 | "type": "integer", |
| 3434 | "description": "Number of items processed (if applicable)" |
| 3435 | }, |
| 3436 | "all": { |
| 3437 | "type": "integer", |
| 3438 | "description": "Total number of items to process (if applicable)" |
| 3439 | }, |
| 3440 | "eta_seconds": { |
| 3441 | "type": "integer", |
| 3442 | "description": "Estimated time remaining in seconds (if available)" |
| 3443 | } |
| 3444 | } |
| 3445 | }, |
| 3446 | "examples": { |
| 3447 | "running": { |
| 3448 | "value": { |
| 3449 | "transaction": "550e8400-e29b-41d4-a716-446655440000", |
| 3450 | "status": "running", |
| 3451 | "percentage": 45, |
| 3452 | "message": "Processing data...", |
| 3453 | "done": 450, |
| 3454 | "all": 1000, |
| 3455 | "eta_seconds": 30 |
| 3456 | } |
| 3457 | }, |
| 3458 | "completed": { |
| 3459 | "value": { |
| 3460 | "transaction": "550e8400-e29b-41d4-a716-446655440000", |
| 3461 | "status": "completed", |
| 3462 | "percentage": 100, |
| 3463 | "message": "Function execution completed successfully" |
| 3464 | } |
| 3465 | }, |
| 3466 | "failed": { |
| 3467 | "value": { |
| 3468 | "transaction": "550e8400-e29b-41d4-a716-446655440000", |
| 3469 | "status": "failed", |
| 3470 | "percentage": 67, |
| 3471 | "message": "Error: timeout during data collection" |
| 3472 | } |
| 3473 | } |
| 3474 | } |
| 3475 | } |
| 3476 | } |
| 3477 | }, |
| 3478 | "400": { |
| 3479 | "description": "Bad request. Common causes:\n- Missing transaction parameter\n- Malformed UUID format\n- Invalid transaction ID format\n" |
| 3480 | }, |
| 3481 | "404": { |
| 3482 | "description": "Transaction not found. Possible reasons:\n- Transaction ID does not exist\n- Transaction has expired (completed/failed long ago)\n- Transaction was never created\n" |
| 3483 | }, |
| 3484 | "500": { |
| 3485 | "description": "Internal server error during progress tracking." |
| 3486 | } |
| 3487 | } |
| 3488 | } |
| 3489 | }, |
| 3490 | "/api/v3/function": { |
| 3491 | "get": { |
| 3492 | "operationId": "function3", |
| 3493 | "tags": [ |
| 3494 | "functions" |
| 3495 | ], |
| 3496 | "summary": "Execute a Netdata function on a specific node", |
| 3497 | "description": "Executes a named function on a Netdata agent to retrieve live information or trigger actions.\nFunctions are plugin-provided operations that can query system state, collect real-time data,\nor perform administrative tasks.\n\n**What are Netdata Functions?**\nFunctions extend Netdata beyond passive metric collection by allowing:\n- **Live data queries**: Get current system state (processes, connections, services)\n- **Interactive diagnostics**: Run on-demand checks and analysis\n- **Administrative operations**: Trigger actions like cache clearing or config reloading\n- **Plugin-specific features**: Access specialized capabilities provided by plugins\n\n**Common Functions Include:**\n- `systemd-list-units` - List systemd services and their status\n- `processes` - List currently running processes with resource usage\n- `network-connections` - Show active network connections\n- `mount-points` - Display mounted filesystems\n- `docker-containers` - List Docker containers (if Docker plugin enabled)\n- Many more plugin-specific functions\n\n**Function Discovery:**\nUse `/api/v3/functions` to discover available functions on each node.\n\n**Execution Model:**\n- Functions execute on the target node's agent\n- Results are collected and returned in real-time\n- Long-running functions return a transaction ID for progress tracking\n- Functions may require specific permissions or capabilities\n\n**Use Cases:**\n- **System diagnostics**: Query live system state for troubleshooting\n- **Capacity planning**: Get current resource utilization details\n- **Security auditing**: List processes, connections, open ports\n- **Service management**: Check service status across infrastructure\n- **Interactive dashboards**: Provide drill-down capabilities\n\n**Common Usage Patterns:**\n\n1. **List running processes:**\n ```\n /api/v3/function?function=processes\n ```\n\n2. **List systemd services:**\n ```\n /api/v3/function?function=systemd-list-units&timeout=30\n ```\n\n3. **Get network connections:**\n ```\n /api/v3/function?function=network-connections\n ```\n\n4. **Execute with custom timeout for slow operations:**\n ```\n /api/v3/function?function=docker-containers&timeout=60\n ```\n\n**Function Response Formats:**\n- Most functions return JSON data\n- Some may return plain text or formatted output\n- Check Content-Type header for response format\n- Long operations may return transaction ID for `/api/v3/progress` polling\n\n**Security Considerations:**\n- Functions respect user authentication and authorization\n- Some functions may require elevated permissions\n- Function execution is subject to ACL checks\n- Sensitive operations may be restricted by configuration\n\n**Security & Access Control:**\n- 📊 **Public Data API** - Bearer token optional, IP-based ACL restrictions apply\n- **Default Access:** Public (no authentication required)\n- **Bearer Protection:** When enabled via `/api/v3/bearer_protection`, requires bearer token\n- **IP Restrictions:** Subject to `allow dashboard from` in netdata.conf\n- **Access Methods:** Direct HTTP/HTTPS, Netdata Cloud, external tools\n", |
| 3498 | "security": [ |
| 3499 | {}, |
| 3500 | { |
| 3501 | "bearerAuth": [] |
| 3502 | } |
| 3503 | ], |
| 3504 | "parameters": [ |
| 3505 | { |
| 3506 | "name": "function", |
| 3507 | "in": "query", |
| 3508 | "required": true, |
| 3509 | "description": "Name of the function to execute. Each Netdata plugin can provide multiple functions\nwith different capabilities.\n\n**Function Names:**\n- Kebab-case naming: `function-name-here`\n- Provided by plugins: different plugins provide different functions\n- Discoverable via `/api/v3/functions` endpoint\n- Case-sensitive\n\n**Common Built-in Functions:**\n- `systemd-list-units` - List systemd services\n- `processes` - Running processes with CPU/memory usage\n- `network-connections` - Active network connections and sockets\n- `mount-points` - Mounted filesystems and usage\n- `ipmi-sensors` - IPMI hardware sensors (if available)\n\n**Plugin-Specific Functions:**\n- Docker plugin: `docker-containers`, `docker-images`\n- Apps plugin: `apps-processes`\n- Logs plugin: `logs-query`\n- And many more depending on enabled plugins\n\n**Invalid Function Names:**\n- Missing function: Returns 400 Bad Request\n- Unknown function: Returns 404 Not Found or function-specific error\n- Disabled function: Returns 403 Forbidden\n", |
| 3510 | "schema": { |
| 3511 | "type": "string" |
| 3512 | }, |
| 3513 | "example": "processes" |
| 3514 | }, |
| 3515 | { |
| 3516 | "name": "timeout", |
| 3517 | "in": "query", |
| 3518 | "required": false, |
| 3519 | "description": "Maximum time in seconds to wait for function execution before timing out.\nDifferent functions have different execution times.\n\n**Timeout Guidelines by Function Type:**\n- **Fast queries** (< 1s): processes, mount-points\n Recommended: 10-30 seconds\n- **Medium queries** (1-5s): systemd-list-units, network-connections\n Recommended: 30-60 seconds\n- **Slow operations** (5-30s): docker operations, log queries\n Recommended: 60-300 seconds\n\n**Timeout Behavior:**\n- If execution completes before timeout: Returns results immediately\n- If timeout expires: Function is cancelled and error returned\n- For async functions: Returns transaction ID immediately, timeout applies to overall operation\n\n**Best Practices:**\n- Set conservative timeouts for production systems\n- Consider network latency for remote nodes\n- Monitor timeout errors and adjust accordingly\n", |
| 3520 | "schema": { |
| 3521 | "type": "integer", |
| 3522 | "minimum": 1, |
| 3523 | "maximum": 3600, |
| 3524 | "default": 60 |
| 3525 | }, |
| 3526 | "example": 30 |
| 3527 | } |
| 3528 | ], |
| 3529 | "responses": { |
| 3530 | "200": { |
| 3531 | "description": "Function executed successfully and returned results.\n\nThe response format depends on the specific function:\n- Most functions return JSON data\n- Some return plain text or formatted output\n- Check Content-Type header\n", |
| 3532 | "content": { |
| 3533 | "application/json": { |
| 3534 | "schema": { |
| 3535 | "type": "object", |
| 3536 | "description": "Function-specific response data" |
| 3537 | }, |
| 3538 | "examples": { |
| 3539 | "processes": { |
| 3540 | "value": { |
| 3541 | "processes": [ |
| 3542 | { |
| 3543 | "pid": 1234, |
| 3544 | "name": "nginx", |
| 3545 | "cpu": 2.5, |
| 3546 | "memory": 45678 |
| 3547 | }, |
| 3548 | { |
| 3549 | "pid": 5678, |
| 3550 | "name": "postgres", |
| 3551 | "cpu": 15.3, |
| 3552 | "memory": 234567 |
| 3553 | } |
| 3554 | ] |
| 3555 | } |
| 3556 | }, |
| 3557 | "systemd_units": { |
| 3558 | "value": { |
| 3559 | "units": [ |
| 3560 | { |
| 3561 | "name": "nginx.service", |
| 3562 | "state": "active", |
| 3563 | "substate": "running" |
| 3564 | }, |
| 3565 | { |
| 3566 | "name": "postgresql.service", |
| 3567 | "state": "active", |
| 3568 | "substate": "running" |
| 3569 | } |
| 3570 | ] |
| 3571 | } |
| 3572 | } |
| 3573 | } |
| 3574 | }, |
| 3575 | "text/plain": { |
| 3576 | "schema": { |
| 3577 | "type": "string", |
| 3578 | "description": "Plain text response from function" |
| 3579 | } |
| 3580 | } |
| 3581 | } |
| 3582 | }, |
| 3583 | "202": { |
| 3584 | "description": "Function execution started asynchronously. Use the returned transaction ID\nto poll `/api/v3/progress` for status and results.\n", |
| 3585 | "content": { |
| 3586 | "application/json": { |
| 3587 | "schema": { |
| 3588 | "type": "object", |
| 3589 | "properties": { |
| 3590 | "transaction": { |
| 3591 | "type": "string", |
| 3592 | "format": "uuid", |
| 3593 | "description": "Transaction ID for progress tracking" |
| 3594 | }, |
| 3595 | "message": { |
| 3596 | "type": "string", |
| 3597 | "description": "Status message" |
| 3598 | } |
| 3599 | } |
| 3600 | } |
| 3601 | } |
| 3602 | } |
| 3603 | }, |
| 3604 | "400": { |
| 3605 | "description": "Bad request. Common causes:\n- Missing required `function` parameter\n- Invalid function name format\n- Invalid request body for the function\n" |
| 3606 | }, |
| 3607 | "403": { |
| 3608 | "description": "Forbidden. Possible reasons:\n- Function requires higher permissions than current user has\n- Function is disabled in configuration\n- ACL restrictions prevent execution\n" |
| 3609 | }, |
| 3610 | "404": { |
| 3611 | "description": "Function not found. The specified function does not exist or is not available on this node.\n" |
| 3612 | }, |
| 3613 | "500": { |
| 3614 | "description": "Internal server error during function execution." |
| 3615 | }, |
| 3616 | "503": { |
| 3617 | "description": "Service unavailable. Netdata agent is not ready or function execution system is overloaded.\n" |
| 3618 | }, |
| 3619 | "504": { |
| 3620 | "description": "Function execution timeout - operation took longer than specified timeout." |
| 3621 | } |
| 3622 | } |
| 3623 | }, |
| 3624 | "post": { |
| 3625 | "operationId": "function3_post", |
| 3626 | "tags": [ |
| 3627 | "functions" |
| 3628 | ], |
| 3629 | "summary": "Execute a Netdata function with request body parameters", |
| 3630 | "description": "Same as GET /api/v3/function, but allows passing parameters via request body for functions\nthat require complex input or configuration data.\n\nUse this method when:\n- Function requires complex parameters that don't fit in query string\n- Passing sensitive data that shouldn't be in URL\n- Function accepts JSON configuration or structured data\n\nSee GET /api/v3/function for complete documentation on functions, timeouts, and responses.\n", |
| 3631 | "security": [ |
| 3632 | {}, |
| 3633 | { |
| 3634 | "bearerAuth": [] |
| 3635 | } |
| 3636 | ], |
| 3637 | "parameters": [ |
| 3638 | { |
| 3639 | "name": "function", |
| 3640 | "in": "query", |
| 3641 | "required": true, |
| 3642 | "description": "Name of the function to execute (see GET method for details)", |
| 3643 | "schema": { |
| 3644 | "type": "string" |
| 3645 | }, |
| 3646 | "example": "processes" |
| 3647 | }, |
| 3648 | { |
| 3649 | "name": "timeout", |
| 3650 | "in": "query", |
| 3651 | "required": false, |
| 3652 | "description": "Maximum time in seconds to wait for function execution (see GET method for details)", |
| 3653 | "schema": { |
| 3654 | "type": "integer", |
| 3655 | "minimum": 1, |
| 3656 | "maximum": 3600, |
| 3657 | "default": 60 |
| 3658 | }, |
| 3659 | "example": 30 |
| 3660 | } |
| 3661 | ], |
| 3662 | "requestBody": { |
| 3663 | "description": "Optional request body for functions that accept parameters or configuration.\nThe format and content depend on the specific function being executed.\n\n**When to Use Request Body:**\n- Functions that accept filtering parameters\n- Functions that need configuration data\n- Functions with complex input requirements\n\n**Common Patterns:**\n- JSON object with function-specific parameters\n- Plain text for simple commands\n- Format specified by function documentation\n\n**Example for logs-query function:**\n```json\n{\n \"after\": -3600,\n \"before\": 0,\n \"filter\": \"error\",\n \"limit\": 100\n}\n```\n", |
| 3664 | "required": false, |
| 3665 | "content": { |
| 3666 | "application/json": { |
| 3667 | "schema": { |
| 3668 | "type": "object", |
| 3669 | "description": "Function-specific parameters (varies by function)" |
| 3670 | } |
| 3671 | }, |
| 3672 | "text/plain": { |
| 3673 | "schema": { |
| 3674 | "type": "string", |
| 3675 | "description": "Plain text parameters for simple functions" |
| 3676 | } |
| 3677 | } |
| 3678 | } |
| 3679 | }, |
| 3680 | "responses": { |
| 3681 | "200": { |
| 3682 | "description": "Function executed successfully (see GET method for response details)", |
| 3683 | "content": { |
| 3684 | "application/json": { |
| 3685 | "schema": { |
| 3686 | "type": "object" |
| 3687 | } |
| 3688 | }, |
| 3689 | "text/plain": { |
| 3690 | "schema": { |
| 3691 | "type": "string" |
| 3692 | } |
| 3693 | } |
| 3694 | } |
| 3695 | }, |
| 3696 | "202": { |
| 3697 | "description": "Function execution started asynchronously (see GET method for details)" |
| 3698 | }, |
| 3699 | "400": { |
| 3700 | "description": "Bad request (see GET method for details)" |
| 3701 | }, |
| 3702 | "403": { |
| 3703 | "description": "Forbidden (see GET method for details)" |
| 3704 | }, |
| 3705 | "404": { |
| 3706 | "description": "Function not found (see GET method for details)" |
| 3707 | }, |
| 3708 | "500": { |
| 3709 | "description": "Internal server error (see GET method for details)" |
| 3710 | }, |
| 3711 | "503": { |
| 3712 | "description": "Service unavailable (see GET method for details)" |
| 3713 | }, |
| 3714 | "504": { |
| 3715 | "description": "Function execution timeout (see GET method for details)" |
| 3716 | } |
| 3717 | } |
| 3718 | } |
| 3719 | }, |
| 3720 | "/api/v3/functions": { |
| 3721 | "get": { |
| 3722 | "operationId": "functions3", |
| 3723 | "tags": [ |
| 3724 | "functions" |
| 3725 | ], |
| 3726 | "summary": "List available functions across all nodes", |
| 3727 | "description": "Retrieves a catalog of available functions across the monitored infrastructure.\nFunctions are plugin-provided operations that extend Netdata's capabilities beyond\npassive metric collection, allowing live queries, diagnostics, and administrative actions.\n\n**What This Endpoint Returns:**\n- **Function inventory**: All functions available across your nodes\n- **Per-node availability**: Which functions each node supports\n- **Function metadata**: Descriptions, parameters, requirements\n- **Plugin information**: Which plugin provides each function\n\n**Function Categories:**\n- **System queries**: processes, mount-points, network-connections\n- **Service management**: systemd-list-units, docker-containers\n- **Hardware**: ipmi-sensors, smart-disk-info\n- **Application-specific**: mysql-queries, redis-info, nginx-status\n- **Diagnostics**: performance-analysis, log-queries\n- **Administrative**: config-reload, cache-clear\n\n**Use Cases:**\n- **Capability discovery**: Determine what operations are available\n- **Multi-node comparison**: See which nodes support which functions\n- **Plugin verification**: Confirm plugins are loaded and functional\n- **UI generation**: Build dynamic interfaces based on available functions\n- **Documentation**: Generate function reference for your infrastructure\n\n**Common Usage Patterns:**\n\n1. **List all functions across all nodes:**\n ```\n /api/v3/functions\n ```\n\n2. **Functions for specific nodes:**\n ```\n /api/v3/functions?nodes=web-*\n ```\n\n3. **Scope to production infrastructure:**\n ```\n /api/v3/functions?scope_nodes=prod-*\n ```\n\n4. **Get detailed function information:**\n ```\n /api/v3/functions?options=debug\n ```\n\n**Response Organization:**\nResults grouped by:\n- **Node**: Functions available on each node\n- **Function name**: Unique identifier\n- **Plugin**: Source plugin providing the function\n- **Capabilities**: What the function can do\n\n**Integration with /api/v3/function:**\n1. Use `/api/v3/functions` to discover available functions\n2. Use `/api/v3/function?function=<name>` to execute specific functions\n3. Results tell you which nodes support which operations\n\n**Security & Access Control:**\n- 📊 **Public Data API** - Bearer token optional, IP-based ACL restrictions apply\n- **Default Access:** Public (no authentication required)\n- **Bearer Protection:** When enabled via `/api/v3/bearer_protection`, requires bearer token\n- **IP Restrictions:** Subject to `allow dashboard from` in netdata.conf\n- **Access Methods:** Direct HTTP/HTTPS, Netdata Cloud, external tools\n", |
| 3728 | "security": [ |
| 3729 | {}, |
| 3730 | { |
| 3731 | "bearerAuth": [] |
| 3732 | } |
| 3733 | ], |
| 3734 | "parameters": [ |
| 3735 | { |
| 3736 | "name": "scope_nodes", |
| 3737 | "in": "query", |
| 3738 | "required": false, |
| 3739 | "description": "Simple pattern to match node hostnames for scope filtering. Uses Netdata's simple pattern\nmatching (not regex). Matched nodes define the scope for function discovery.\n\n**Pattern Syntax:**\n- `*` matches any number of characters\n- Use `|` to separate multiple patterns (OR logic)\n- Matches are case-insensitive\n- No regex support - only simple wildcards\n\n**Examples:**\n- `prod-*` - All production nodes\n- `*-web-*` - All web server nodes\n- `db-*|cache-*` - All database or cache nodes\n- `*` - All nodes (default)\n", |
| 3740 | "schema": { |
| 3741 | "type": "string", |
| 3742 | "default": "*" |
| 3743 | }, |
| 3744 | "example": "prod-*" |
| 3745 | }, |
| 3746 | { |
| 3747 | "name": "nodes", |
| 3748 | "in": "query", |
| 3749 | "required": false, |
| 3750 | "description": "Simple pattern to filter which nodes to include in the functions list.\nAfter scope is determined, this filters the results. Uses the same pattern syntax as scope_nodes.\n\n**Difference from scope_nodes:**\n- `scope_nodes` defines what nodes to query for functions\n- `nodes` filters which nodes appear in the output\n\n**Examples:**\n- `web-*` - Only show functions from web servers\n- Specific hostnames: `node1|node2|node3`\n", |
| 3751 | "schema": { |
| 3752 | "type": "string", |
| 3753 | "default": "*" |
| 3754 | }, |
| 3755 | "example": "*" |
| 3756 | }, |
| 3757 | { |
| 3758 | "name": "options", |
| 3759 | "in": "query", |
| 3760 | "required": false, |
| 3761 | "description": "Comma-separated list of options to control response content and format.\n\n**Available Options:**\n- `minify` - Minimize JSON output (no pretty-printing)\n- `debug` - Include detailed function metadata and plugin information\n- `raw` - Include raw function definitions\n\n**Examples:**\n- `minify` - Compact JSON response\n- `debug,raw` - Full debug information\n", |
| 3762 | "schema": { |
| 3763 | "type": "string" |
| 3764 | }, |
| 3765 | "example": "debug" |
| 3766 | }, |
| 3767 | { |
| 3768 | "name": "timeout", |
| 3769 | "in": "query", |
| 3770 | "required": false, |
| 3771 | "description": "Maximum time in seconds to wait for the query to complete before timing out.\n\n**Guidelines:**\n- Recommended: 10-30 seconds for most queries\n- Function listing is usually fast\n- Timeout mainly applies to very large infrastructures\n", |
| 3772 | "schema": { |
| 3773 | "type": "integer", |
| 3774 | "minimum": 1, |
| 3775 | "default": 60 |
| 3776 | }, |
| 3777 | "example": 10 |
| 3778 | }, |
| 3779 | { |
| 3780 | "name": "cardinality", |
| 3781 | "in": "query", |
| 3782 | "required": false, |
| 3783 | "description": "Maximum number of nodes to include in the response to prevent overwhelming large responses.\nWhen this limit is exceeded, the response will indicate how many nodes were omitted.\n\n**Purpose:**\n- Prevent memory exhaustion from very large infrastructures\n- Control response size for performance\n- Useful when exploring large node sets incrementally\n\n**Recommendations:**\n- Small infrastructures (< 100 nodes): Use default\n- Medium infrastructures (100-1000 nodes): 500-1000\n- Large infrastructures (> 1000 nodes): Use filtering or increase limit carefully\n", |
| 3784 | "schema": { |
| 3785 | "type": "integer", |
| 3786 | "minimum": 1, |
| 3787 | "maximum": 10000, |
| 3788 | "default": 1000 |
| 3789 | }, |
| 3790 | "example": 500 |
| 3791 | } |
| 3792 | ], |
| 3793 | "responses": { |
| 3794 | "200": { |
| 3795 | "description": "Successfully retrieved functions catalog.\n\nReturns available functions organized by node, with metadata about each function\nincluding name, description, plugin source, and parameter requirements.\n", |
| 3796 | "content": { |
| 3797 | "application/json": { |
| 3798 | "schema": { |
| 3799 | "type": "object", |
| 3800 | "properties": { |
| 3801 | "nodes": { |
| 3802 | "type": "array", |
| 3803 | "description": "Array of nodes with their available functions", |
| 3804 | "items": { |
| 3805 | "type": "object", |
| 3806 | "properties": { |
| 3807 | "hostname": { |
| 3808 | "type": "string", |
| 3809 | "description": "Node hostname" |
| 3810 | }, |
| 3811 | "machine_guid": { |
| 3812 | "type": "string", |
| 3813 | "description": "Unique node identifier" |
| 3814 | }, |
| 3815 | "functions": { |
| 3816 | "type": "array", |
| 3817 | "description": "Functions available on this node", |
| 3818 | "items": { |
| 3819 | "type": "object", |
| 3820 | "properties": { |
| 3821 | "name": { |
| 3822 | "type": "string", |
| 3823 | "description": "Function name", |
| 3824 | "example": "processes" |
| 3825 | }, |
| 3826 | "plugin": { |
| 3827 | "type": "string", |
| 3828 | "description": "Plugin providing this function", |
| 3829 | "example": "apps.plugin" |
| 3830 | }, |
| 3831 | "description": { |
| 3832 | "type": "string", |
| 3833 | "description": "Human-readable function description" |
| 3834 | }, |
| 3835 | "parameters": { |
| 3836 | "type": "array", |
| 3837 | "description": "Required or optional parameters", |
| 3838 | "items": { |
| 3839 | "type": "object", |
| 3840 | "properties": { |
| 3841 | "name": { |
| 3842 | "type": "string" |
| 3843 | }, |
| 3844 | "required": { |
| 3845 | "type": "boolean" |
| 3846 | }, |
| 3847 | "description": { |
| 3848 | "type": "string" |
| 3849 | } |
| 3850 | } |
| 3851 | } |
| 3852 | } |
| 3853 | } |
| 3854 | } |
| 3855 | } |
| 3856 | } |
| 3857 | } |
| 3858 | }, |
| 3859 | "omitted": { |
| 3860 | "type": "integer", |
| 3861 | "description": "Number of nodes omitted due to cardinality limit" |
| 3862 | } |
| 3863 | } |
| 3864 | }, |
| 3865 | "examples": { |
| 3866 | "functions_list": { |
| 3867 | "value": { |
| 3868 | "nodes": [ |
| 3869 | { |
| 3870 | "hostname": "web-server-1", |
| 3871 | "machine_guid": "12345678-1234-1234-1234-123456789012", |
| 3872 | "functions": [ |
| 3873 | { |
| 3874 | "name": "processes", |
| 3875 | "plugin": "apps.plugin", |
| 3876 | "description": "List running processes with resource usage" |
| 3877 | }, |
| 3878 | { |
| 3879 | "name": "systemd-list-units", |
| 3880 | "plugin": "systemd.plugin", |
| 3881 | "description": "List systemd services and their status" |
| 3882 | }, |
| 3883 | { |
| 3884 | "name": "network-connections", |
| 3885 | "plugin": "network.plugin", |
| 3886 | "description": "Show active network connections" |
| 3887 | } |
| 3888 | ] |
| 3889 | } |
| 3890 | ] |
| 3891 | } |
| 3892 | } |
| 3893 | } |
| 3894 | } |
| 3895 | } |
| 3896 | }, |
| 3897 | "400": { |
| 3898 | "description": "Invalid parameters provided (e.g., invalid pattern syntax)." |
| 3899 | }, |
| 3900 | "500": { |
| 3901 | "description": "Internal server error during functions listing." |
| 3902 | }, |
| 3903 | "504": { |
| 3904 | "description": "Query timeout - functions collection took too long." |
| 3905 | } |
| 3906 | } |
| 3907 | } |
| 3908 | }, |
| 3909 | "/api/v3/config": { |
| 3910 | "get": { |
| 3911 | "operationId": "config3", |
| 3912 | "tags": [ |
| 3913 | "config" |
| 3914 | ], |
| 3915 | "summary": "Manage Netdata dynamic configuration", |
| 3916 | "description": "Provides access to Netdata's dynamic configuration system, allowing retrieval, modification,\nand management of configuration across plugins and data collectors.\n\n**Dynamic Configuration System:**\nNetdata's dyncfg system allows runtime configuration management without restarting the agent:\n- **View configuration tree**: Browse all configurable components\n- **Get current config**: Retrieve active configuration for any component\n- **Update configuration**: Modify settings on-the-fly\n- **Add/remove jobs**: Manage data collection jobs dynamically\n- **Enable/disable**: Toggle components without editing files\n- **Test configuration**: Validate changes before applying\n\n**Configuration Hierarchy:**\n```\n/ (root)\n├── collectors/\n│ ├── plugins.d/\n│ ├── python.d/\n│ ├── go.d/\n│ └── ...\n├── health/\n└── streaming/\n```\n\n**Common Actions:**\n- `tree` - Browse configuration hierarchy\n- `get` - Retrieve current configuration\n- `schema` - Get configuration schema/template\n- `update` - Modify existing configuration\n- `add` - Create new job/instance\n- `remove` - Delete job/instance\n- `enable` - Activate disabled component\n- `disable` - Deactivate component\n- `test` - Validate configuration without applying\n- `restart` - Restart component with new config\n- `userconfig` - Get user-editable configuration\n\n**Use Cases:**\n- **Configuration management**: Centrally manage agent configuration\n- **Job provisioning**: Add new data collection jobs without restart\n- **A/B testing**: Test configuration changes before deployment\n- **Automation**: Integrate with configuration management tools\n- **Troubleshooting**: View and modify settings for debugging\n\n**Common Usage Patterns:**\n\n1. **Browse configuration tree:**\n ```\n /api/v3/config?action=tree&path=/\n ```\n\n2. **Get configuration for a specific component:**\n ```\n /api/v3/config?action=get&id=collectors:go.d:prometheus\n ```\n\n3. **Get configuration schema:**\n ```\n /api/v3/config?action=schema&id=collectors:go.d:prometheus\n ```\n\n4. **Add new data collection job:**\n ```\n POST /api/v3/config?action=add&id=collectors:go.d:prometheus&name=my-app\n Content-Type: application/json\n\n {\n \"url\": \"http://my-app:9090/metrics\",\n \"update_every\": 10\n }\n ```\n\n5. **Update existing configuration:**\n ```\n POST /api/v3/config?action=update&id=collectors:go.d:prometheus:my-app\n Content-Type: application/json\n\n {\n \"update_every\": 5\n }\n ```\n\n6. **Test configuration before applying:**\n ```\n POST /api/v3/config?action=test&id=collectors:go.d:prometheus&name=test-job\n [configuration JSON]\n ```\n\n**ID Format:**\nConfiguration IDs use colon-separated hierarchical paths:\n- `collectors:go.d:prometheus` - Plugin/collector level\n- `collectors:go.d:prometheus:job-name` - Specific job/instance\n- `health:notifications` - Health alert notifications\n\n**Request Body:**\nFor `update`, `add`, and `test` actions, provide configuration as JSON in request body.\nUse `schema` action to get the expected configuration structure.\n\n**Security:**\n- Configuration changes require appropriate permissions\n- Some actions may be restricted by ACL\n- Changes are logged for audit trail\n\n**Security & Access Control:**\n- 📊 **Public Data API** - Bearer token optional, IP-based ACL restrictions apply\n- **Default Access:** Public (no authentication required)\n- **Bearer Protection:** When enabled via `/api/v3/bearer_protection`, requires bearer token\n- **IP Restrictions:** Subject to `allow dashboard from` in netdata.conf\n- **Access Methods:** Direct HTTP/HTTPS, Netdata Cloud, external tools\n", |
| 3917 | "security": [ |
| 3918 | {}, |
| 3919 | { |
| 3920 | "bearerAuth": [] |
| 3921 | } |
| 3922 | ], |
| 3923 | "parameters": [ |
| 3924 | { |
| 3925 | "name": "action", |
| 3926 | "in": "query", |
| 3927 | "required": false, |
| 3928 | "description": "Configuration action to perform. Different actions require different additional parameters.\n\n**Available Actions:**\n\n- **`tree`** (default): Browse configuration hierarchy\n - Additional params: `path` (optional, default \"/\"), `id` (optional)\n - Returns: Tree structure of configurable components\n\n- **`get`**: Retrieve current configuration\n - Required params: `id`\n - Returns: Current active configuration\n\n- **`schema`**: Get configuration schema/template\n - Required params: `id`\n - Returns: Schema defining valid configuration structure\n\n- **`update`**: Modify existing configuration\n - Required params: `id`\n - Request body: JSON with configuration changes\n - Returns: Success/error status\n\n- **`add`**: Create new job/instance\n - Required params: `id`, `name`\n - Request body: JSON with initial configuration\n - Returns: Success/error status\n\n- **`remove`**: Delete job/instance\n - Required params: `id`\n - Returns: Success/error status\n\n- **`enable`**: Activate disabled component\n - Required params: `id`\n - Returns: Success/error status\n\n- **`disable`**: Deactivate component without removing\n - Required params: `id`\n - Returns: Success/error status\n\n- **`test`**: Validate configuration without applying\n - Required params: `id`, `name`\n - Request body: JSON with configuration to test\n - Returns: Validation results\n\n- **`restart`**: Restart component with new configuration\n - Required params: `id`\n - Returns: Success/error status\n\n- **`userconfig`**: Get user-editable configuration file\n - Required params: `id`\n - Returns: Configuration in user-editable format\n", |
| 3929 | "schema": { |
| 3930 | "type": "string", |
| 3931 | "enum": [ |
| 3932 | "tree", |
| 3933 | "get", |
| 3934 | "schema", |
| 3935 | "update", |
| 3936 | "add", |
| 3937 | "remove", |
| 3938 | "enable", |
| 3939 | "disable", |
| 3940 | "test", |
| 3941 | "restart", |
| 3942 | "userconfig" |
| 3943 | ], |
| 3944 | "default": "tree" |
| 3945 | }, |
| 3946 | "example": "tree" |
| 3947 | }, |
| 3948 | { |
| 3949 | "name": "path", |
| 3950 | "in": "query", |
| 3951 | "required": false, |
| 3952 | "description": "Path in configuration tree when using `action=tree`.\nSpecifies which branch of the configuration hierarchy to explore.\n\n**Path Format:**\n- Root: `/`\n- Collectors: `/collectors`\n- Specific plugin: `/collectors/go.d`\n- Health: `/health`\n\n**Examples:**\n- `/` - Root level (all categories)\n- `/collectors` - All collectors\n- `/collectors/go.d` - Go collectors\n", |
| 3953 | "schema": { |
| 3954 | "type": "string", |
| 3955 | "default": "/" |
| 3956 | }, |
| 3957 | "example": "/collectors" |
| 3958 | }, |
| 3959 | { |
| 3960 | "name": "id", |
| 3961 | "in": "query", |
| 3962 | "required": false, |
| 3963 | "description": "Configuration component ID using colon-separated hierarchical notation.\nRequired for most actions except `tree`.\n\n**ID Format:**\n`category:plugin:collector[:job-name]`\n\n**Examples:**\n- `collectors:go.d:prometheus` - Prometheus collector\n- `collectors:go.d:prometheus:local` - Specific Prometheus job \"local\"\n- `collectors:python.d:nginx` - Nginx Python collector\n- `health:notifications` - Health notification settings\n\n**ID Validation:**\n- Alphanumeric characters, dots, underscores, hyphens\n- Colons separate hierarchy levels\n- Invalid IDs return 400 Bad Request\n", |
| 3964 | "schema": { |
| 3965 | "type": "string" |
| 3966 | }, |
| 3967 | "example": "collectors:go.d:prometheus" |
| 3968 | }, |
| 3969 | { |
| 3970 | "name": "name", |
| 3971 | "in": "query", |
| 3972 | "required": false, |
| 3973 | "description": "Name for new job/instance when using `action=add` or `action=test`.\n\n**Name Requirements:**\n- Alphanumeric characters, dots, underscores, hyphens\n- Must be unique within the collector/plugin\n- Will be appended to `id` to form full configuration path\n\n**Examples:**\n- If `id=collectors:go.d:prometheus` and `name=my-app`\n- Full config ID becomes: `collectors:go.d:prometheus:my-app`\n\n**Invalid Names:**\n- Empty or missing (when required): Returns 400 Bad Request\n- Special characters: Returns 400 Bad Request\n- Duplicate name: May return error or override behavior depends on action\n", |
| 3974 | "schema": { |
| 3975 | "type": "string" |
| 3976 | }, |
| 3977 | "example": "my-app" |
| 3978 | }, |
| 3979 | { |
| 3980 | "name": "timeout", |
| 3981 | "in": "query", |
| 3982 | "required": false, |
| 3983 | "description": "Maximum time in seconds to wait for configuration operation to complete.\n\n**Timeout Guidelines:**\n- Read operations (get, schema, tree): 10-30 seconds\n- Write operations (update, add, remove): 30-120 seconds\n- Test operations: 60-120 seconds (may involve validation checks)\n- Restart operations: 120-300 seconds (component restart time)\n\n**Minimum:** 10 seconds (enforced by code)\n**Default:** 120 seconds\n", |
| 3984 | "schema": { |
| 3985 | "type": "integer", |
| 3986 | "minimum": 10, |
| 3987 | "maximum": 3600, |
| 3988 | "default": 120 |
| 3989 | }, |
| 3990 | "example": 60 |
| 3991 | } |
| 3992 | ], |
| 3993 | "responses": { |
| 3994 | "200": { |
| 3995 | "description": "Configuration operation completed successfully.\n\nResponse format depends on the action:\n- `tree`: Configuration hierarchy tree\n- `get`: Current configuration JSON\n- `schema`: Configuration schema/template\n- `update`/`add`/`remove`: Success confirmation\n- `test`: Validation results\n", |
| 3996 | "content": { |
| 3997 | "application/json": { |
| 3998 | "schema": { |
| 3999 | "type": "object", |
| 4000 | "description": "Action-specific response data" |
| 4001 | } |
| 4002 | } |
| 4003 | } |
| 4004 | }, |
| 4005 | "400": { |
| 4006 | "description": "Bad request. Common causes:\n- Invalid action name\n- Missing required parameters (`id`, `name`)\n- Invalid `id` or `name` format\n- Malformed request body JSON\n" |
| 4007 | }, |
| 4008 | "403": { |
| 4009 | "description": "Forbidden. Configuration change requires higher permissions.\n" |
| 4010 | }, |
| 4011 | "404": { |
| 4012 | "description": "Configuration component not found. The specified `id` does not exist.\n" |
| 4013 | }, |
| 4014 | "500": { |
| 4015 | "description": "Internal server error during configuration operation." |
| 4016 | }, |
| 4017 | "504": { |
| 4018 | "description": "Configuration operation timeout." |
| 4019 | } |
| 4020 | } |
| 4021 | }, |
| 4022 | "post": { |
| 4023 | "operationId": "config3_post", |
| 4024 | "tags": [ |
| 4025 | "config" |
| 4026 | ], |
| 4027 | "summary": "Manage Netdata configuration with request body data", |
| 4028 | "description": "Same as GET /api/v3/config, but allows passing configuration data via request body\nfor actions like `update`, `add`, and `test`.\n\nUse this method when:\n- Updating existing configuration (`action=update`)\n- Adding new jobs/instances (`action=add`)\n- Testing configuration before applying (`action=test`)\n\nSee GET /api/v3/config for complete documentation on actions, parameters, and responses.\n", |
| 4029 | "security": [ |
| 4030 | {}, |
| 4031 | { |
| 4032 | "bearerAuth": [] |
| 4033 | } |
| 4034 | ], |
| 4035 | "parameters": [ |
| 4036 | { |
| 4037 | "name": "action", |
| 4038 | "in": "query", |
| 4039 | "required": false, |
| 4040 | "description": "Configuration action to perform (see GET method for details)", |
| 4041 | "schema": { |
| 4042 | "type": "string", |
| 4043 | "enum": [ |
| 4044 | "tree", |
| 4045 | "get", |
| 4046 | "schema", |
| 4047 | "update", |
| 4048 | "add", |
| 4049 | "remove", |
| 4050 | "enable", |
| 4051 | "disable", |
| 4052 | "test", |
| 4053 | "restart", |
| 4054 | "userconfig" |
| 4055 | ], |
| 4056 | "default": "tree" |
| 4057 | }, |
| 4058 | "example": "update" |
| 4059 | }, |
| 4060 | { |
| 4061 | "name": "path", |
| 4062 | "in": "query", |
| 4063 | "required": false, |
| 4064 | "description": "Path in configuration tree (see GET method for details)", |
| 4065 | "schema": { |
| 4066 | "type": "string", |
| 4067 | "default": "/" |
| 4068 | }, |
| 4069 | "example": "/collectors" |
| 4070 | }, |
| 4071 | { |
| 4072 | "name": "id", |
| 4073 | "in": "query", |
| 4074 | "required": false, |
| 4075 | "description": "Configuration component ID (see GET method for details)", |
| 4076 | "schema": { |
| 4077 | "type": "string" |
| 4078 | }, |
| 4079 | "example": "collectors:go.d:prometheus" |
| 4080 | }, |
| 4081 | { |
| 4082 | "name": "name", |
| 4083 | "in": "query", |
| 4084 | "required": false, |
| 4085 | "description": "Name for new job/instance (see GET method for details)", |
| 4086 | "schema": { |
| 4087 | "type": "string" |
| 4088 | }, |
| 4089 | "example": "my-app" |
| 4090 | }, |
| 4091 | { |
| 4092 | "name": "timeout", |
| 4093 | "in": "query", |
| 4094 | "required": false, |
| 4095 | "description": "Maximum timeout in seconds (see GET method for details)", |
| 4096 | "schema": { |
| 4097 | "type": "integer", |
| 4098 | "minimum": 10, |
| 4099 | "maximum": 3600, |
| 4100 | "default": 120 |
| 4101 | }, |
| 4102 | "example": 60 |
| 4103 | } |
| 4104 | ], |
| 4105 | "requestBody": { |
| 4106 | "description": "Configuration data for `update`, `add`, and `test` actions.\n\n**Format:**\n- Content-Type: application/json\n- Structure depends on the specific configuration component\n- Use `action=schema` to get the expected structure\n\n**Example for adding Prometheus job:**\n```json\n{\n \"url\": \"http://localhost:9090/metrics\",\n \"update_every\": 10,\n \"autodetection_retry\": 0\n}\n```\n\n**Example for updating existing config:**\n```json\n{\n \"update_every\": 5,\n \"timeout\": 30\n}\n```\n", |
| 4107 | "required": false, |
| 4108 | "content": { |
| 4109 | "application/json": { |
| 4110 | "schema": { |
| 4111 | "type": "object", |
| 4112 | "description": "Configuration-specific data structure" |
| 4113 | } |
| 4114 | } |
| 4115 | } |
| 4116 | }, |
| 4117 | "responses": { |
| 4118 | "200": { |
| 4119 | "description": "Configuration operation completed successfully (see GET method for response details)", |
| 4120 | "content": { |
| 4121 | "application/json": { |
| 4122 | "schema": { |
| 4123 | "type": "object" |
| 4124 | } |
| 4125 | } |
| 4126 | } |
| 4127 | }, |
| 4128 | "400": { |
| 4129 | "description": "Bad request (see GET method for details)" |
| 4130 | }, |
| 4131 | "403": { |
| 4132 | "description": "Forbidden (see GET method for details)" |
| 4133 | }, |
| 4134 | "404": { |
| 4135 | "description": "Configuration component not found (see GET method for details)" |
| 4136 | }, |
| 4137 | "500": { |
| 4138 | "description": "Internal server error (see GET method for details)" |
| 4139 | }, |
| 4140 | "504": { |
| 4141 | "description": "Configuration operation timeout (see GET method for details)" |
| 4142 | } |
| 4143 | } |
| 4144 | } |
| 4145 | }, |
| 4146 | "/api/v3/settings": { |
| 4147 | "get": { |
| 4148 | "operationId": "settings_get", |
| 4149 | "tags": [ |
| 4150 | "settings" |
| 4151 | ], |
| 4152 | "summary": "Retrieve user settings/preferences (GET)", |
| 4153 | "description": "**V3 SPECIFIC ENDPOINT**\n\nRetrieves stored user settings and preferences from Netdata's settings storage.\nThe settings API provides persistent key-value storage for UI preferences, dashboard layouts,\nalert configurations, and other user-specific data.\n\n**Settings System:**\n- **Persistent storage**: Settings survive agent restarts\n- **Version-controlled**: Each update increments version for conflict detection\n- **User-scoped**: Authenticated users can have multiple named settings files\n- **Anonymous access**: Limited to 'default' file only\n- **JSON format**: All settings stored as JSON with mandatory 'version' field\n\n**File-Based Storage:**\nSettings are stored as individual files in Netdata's var/lib directory:\n- Anonymous users: Only `file=default` allowed\n- Authenticated users: Can create custom files (e.g., `file=my-dashboard`)\n- File names: Alphanumeric, dashes, underscores only\n\n**Version Control:**\nEach settings object has a `version` field:\n- Starts at version 1 for new files\n- Auto-incremented on each PUT operation\n- Used for optimistic locking to prevent conflicts\n\n**Use Cases:**\n- **Dashboard preferences**: Store layout, theme, selected metrics\n- **Alert customization**: Save user-specific alert thresholds\n- **UI state**: Remember filters, time ranges, node selections\n- **Multi-device sync**: Share settings across browsers/devices (for authenticated users)\n\n**Common Usage Patterns:**\n\n1. **Get default settings (anonymous user):**\n ```\n GET /api/v3/settings?file=default\n ```\n\n2. **Get named settings file (authenticated):**\n ```\n GET /api/v3/settings?file=production-dashboard\n ```\n\n**Response Structure:**\n```json\n{\n \"version\": 3,\n \"theme\": \"dark\",\n \"defaultTimeRange\": \"-3600\",\n \"favoriteMetrics\": [\"system.cpu\", \"system.ram\"]\n}\n```\n\n**New Files:**\nIf requested file doesn't exist, returns initial version:\n```json\n{\n \"version\": 1\n}\n```\n\n**Size Limit:**\nMaximum settings file size: 20 MiB\n\n**Security & Access Control:**\n- 🔓 **Always Public API** - This endpoint is always accessible without authentication\n- **No Restrictions:** Not subject to bearer protection or IP-based ACL restrictions\n- **No Authentication:** Cannot be restricted by any configuration\n- **Access:** Available to anyone who can reach the agent's HTTP endpoint\n", |
| 4154 | "parameters": [ |
| 4155 | { |
| 4156 | "name": "file", |
| 4157 | "in": "query", |
| 4158 | "required": false, |
| 4159 | "description": "Name of the settings file to retrieve.\n\n**File Naming Rules:**\n- Alphanumeric characters only\n- Dashes (-) and underscores (_) allowed\n- No spaces or special characters\n- Case-sensitive\n\n**Access Control:**\n- **Anonymous users**: Only `file=default` allowed\n- **Authenticated users (bearer token)**: Any valid file name\n\n**Examples:**\n- `default` - Default settings file\n- `my-dashboard` - Custom dashboard settings\n- `prod-alerts` - Production alert preferences\n- `mobile-view` - Mobile UI settings\n\n**Invalid File Names:**\n- Missing or empty: Returns 400 Bad Request\n- Special characters: Returns 400 Bad Request\n- Non-default for anonymous: Returns 400 Bad Request\n", |
| 4160 | "schema": { |
| 4161 | "type": "string", |
| 4162 | "pattern": "^[a-zA-Z0-9_-]+$", |
| 4163 | "default": "default" |
| 4164 | }, |
| 4165 | "example": "default" |
| 4166 | } |
| 4167 | ], |
| 4168 | "responses": { |
| 4169 | "200": { |
| 4170 | "description": "Settings file retrieved successfully.\n\nReturns JSON object with at minimum a `version` field.\nMay contain any additional user-defined fields.\n", |
| 4171 | "content": { |
| 4172 | "application/json": { |
| 4173 | "schema": { |
| 4174 | "type": "object", |
| 4175 | "required": [ |
| 4176 | "version" |
| 4177 | ], |
| 4178 | "properties": { |
| 4179 | "version": { |
| 4180 | "type": "integer", |
| 4181 | "description": "Current version number (auto-incremented on updates)", |
| 4182 | "minimum": 1 |
| 4183 | } |
| 4184 | }, |
| 4185 | "additionalProperties": true |
| 4186 | }, |
| 4187 | "examples": { |
| 4188 | "new_file": { |
| 4189 | "value": { |
| 4190 | "version": 1 |
| 4191 | }, |
| 4192 | "summary": "Newly created settings file with just version" |
| 4193 | }, |
| 4194 | "existing_file": { |
| 4195 | "value": { |
| 4196 | "version": 5, |
| 4197 | "theme": "dark", |
| 4198 | "language": "en", |
| 4199 | "dashboard": { |
| 4200 | "layout": "grid", |
| 4201 | "columns": 3 |
| 4202 | }, |
| 4203 | "notifications": { |
| 4204 | "enabled": true, |
| 4205 | "sound": false |
| 4206 | } |
| 4207 | }, |
| 4208 | "summary": "Existing settings with custom fields" |
| 4209 | } |
| 4210 | } |
| 4211 | } |
| 4212 | } |
| 4213 | }, |
| 4214 | "400": { |
| 4215 | "description": "Bad request. Common causes:\n- Invalid file name (contains special characters)\n- Anonymous user trying to access non-default file\n- Empty file name\n" |
| 4216 | }, |
| 4217 | "500": { |
| 4218 | "description": "Internal server error during settings retrieval." |
| 4219 | } |
| 4220 | } |
| 4221 | }, |
| 4222 | "put": { |
| 4223 | "operationId": "settings_put", |
| 4224 | "tags": [ |
| 4225 | "settings" |
| 4226 | ], |
| 4227 | "summary": "Create or update user settings/preferences (PUT)", |
| 4228 | "description": "**V3 SPECIFIC ENDPOINT**\n\nCreates or updates user settings with optimistic locking to prevent concurrent modification conflicts.\n\n**Update Process:**\n1. Client GET current settings (to get current version)\n2. Client modifies settings locally\n3. Client PUT updated settings WITH ORIGINAL VERSION\n4. Netdata validates version matches current file\n5. If match: Update succeeds, version auto-incremented\n6. If mismatch: Returns 409 Conflict\n\n**Conflict Resolution (409 Response):**\nWhen you receive 409 Conflict:\n1. Another client updated the file\n2. GET the file again to retrieve latest version\n3. Reapply your changes to the new version\n4. PUT again with the new version number\n\n**Optimistic Locking Flow:**\n```javascript\n// 1. Get current settings\nconst response = await fetch('/api/v3/settings?file=my-dashboard');\nconst settings = await response.json(); // { version: 3, ... }\n\n// 2. Modify settings\nsettings.theme = 'dark';\n\n// 3. PUT with ORIGINAL version (still 3)\nconst result = await fetch('/api/v3/settings?file=my-dashboard', {\n method: 'PUT',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify(settings) // version: 3\n});\n\nif (result.status === 409) {\n // Conflict! File was updated by another client\n // Must GET again and retry\n}\n// If successful, file now has version: 4\n```\n\n**Payload Requirements:**\n- MUST be valid JSON\n- MUST include `version` field with current file version\n- MAY include any additional fields\n- Maximum size: 20 MiB\n\n**Version Management:**\n- Client provides current version in payload\n- Netdata verifies version matches file on disk\n- Netdata increments version before saving\n- Saved file has version + 1\n\n**Use Cases:**\n- Save dashboard configuration changes\n- Update user preferences\n- Store UI state\n- Persist alert customizations\n", |
| 4229 | "parameters": [ |
| 4230 | { |
| 4231 | "name": "file", |
| 4232 | "in": "query", |
| 4233 | "required": false, |
| 4234 | "description": "Name of the settings file to create or update.\n\n**File Naming Rules:**\n- Alphanumeric characters only\n- Dashes (-) and underscores (_) allowed\n- No spaces or special characters\n- Case-sensitive\n\n**Access Control:**\n- **Anonymous users**: Only `file=default` allowed\n- **Authenticated users (bearer token)**: Any valid file name\n\n**File Creation:**\n- If file doesn't exist: Created with initial payload\n- If file exists: Updated with new payload (version check applies)\n", |
| 4235 | "schema": { |
| 4236 | "type": "string", |
| 4237 | "pattern": "^[a-zA-Z0-9_-]+$", |
| 4238 | "default": "default" |
| 4239 | }, |
| 4240 | "example": "my-dashboard" |
| 4241 | } |
| 4242 | ], |
| 4243 | "requestBody": { |
| 4244 | "description": "JSON object containing settings data with mandatory `version` field.\n\n**Required Fields:**\n- `version`: Integer matching current file version (or 0 for non-existent files)\n\n**Optional Fields:**\n- Any user-defined fields\n\n**Size Limit:**\nMaximum 20 MiB\n\n**Version Rules:**\n- New file: version can be 0 or 1\n- Existing file: version MUST match current file version exactly\n- Mismatch causes 409 Conflict\n", |
| 4245 | "required": true, |
| 4246 | "content": { |
| 4247 | "application/json": { |
| 4248 | "schema": { |
| 4249 | "type": "object", |
| 4250 | "required": [ |
| 4251 | "version" |
| 4252 | ], |
| 4253 | "properties": { |
| 4254 | "version": { |
| 4255 | "type": "integer", |
| 4256 | "description": "Current version from GET request", |
| 4257 | "minimum": 0 |
| 4258 | } |
| 4259 | }, |
| 4260 | "additionalProperties": true |
| 4261 | }, |
| 4262 | "examples": { |
| 4263 | "create_new": { |
| 4264 | "value": { |
| 4265 | "version": 0, |
| 4266 | "theme": "dark", |
| 4267 | "language": "en" |
| 4268 | }, |
| 4269 | "summary": "Creating new settings file" |
| 4270 | }, |
| 4271 | "update_existing": { |
| 4272 | "value": { |
| 4273 | "version": 5, |
| 4274 | "theme": "light", |
| 4275 | "dashboard": { |
| 4276 | "layout": "list" |
| 4277 | } |
| 4278 | }, |
| 4279 | "summary": "Updating existing file (version from previous GET)" |
| 4280 | } |
| 4281 | } |
| 4282 | } |
| 4283 | } |
| 4284 | }, |
| 4285 | "responses": { |
| 4286 | "200": { |
| 4287 | "description": "Settings updated successfully. Version has been incremented.\n", |
| 4288 | "content": { |
| 4289 | "application/json": { |
| 4290 | "schema": { |
| 4291 | "type": "object", |
| 4292 | "properties": { |
| 4293 | "message": { |
| 4294 | "type": "string", |
| 4295 | "example": "OK" |
| 4296 | } |
| 4297 | } |
| 4298 | } |
| 4299 | } |
| 4300 | } |
| 4301 | }, |
| 4302 | "400": { |
| 4303 | "description": "Bad request. Common causes:\n- Invalid file name\n- Missing `version` field in payload\n- Invalid JSON payload\n- Empty payload\n- Payload exceeds 20 MiB\n- Anonymous user trying to access non-default file\n" |
| 4304 | }, |
| 4305 | "409": { |
| 4306 | "description": "Conflict. Version mismatch detected.\n\n**Resolution Steps:**\n1. GET current settings to retrieve latest version\n2. Reapply your changes to the new version\n3. PUT again with updated version number\n\nThis prevents lost updates when multiple clients modify settings concurrently.\n", |
| 4307 | "content": { |
| 4308 | "application/json": { |
| 4309 | "schema": { |
| 4310 | "type": "object", |
| 4311 | "properties": { |
| 4312 | "message": { |
| 4313 | "type": "string", |
| 4314 | "example": "Payload version does not match the version of the stored object" |
| 4315 | } |
| 4316 | } |
| 4317 | } |
| 4318 | } |
| 4319 | } |
| 4320 | }, |
| 4321 | "500": { |
| 4322 | "description": "Internal server error during settings update." |
| 4323 | } |
| 4324 | } |
| 4325 | } |
| 4326 | }, |
| 4327 | "/api/v3/stream_info": { |
| 4328 | "get": { |
| 4329 | "operationId": "stream_info", |
| 4330 | "tags": [ |
| 4331 | "streaming" |
| 4332 | ], |
| 4333 | "summary": "Get streaming information and statistics", |
| 4334 | "description": "**V3 SPECIFIC ENDPOINT**\n\nReturns detailed information about Netdata's streaming connections, including sender/receiver\nstatistics, buffer usage, compression ratios, and connection health metrics.\n\n**Streaming Overview:**\nNetdata supports hierarchical streaming where:\n- **Child nodes** send metrics to **parent nodes** for centralization\n- **Parent nodes** aggregate and store metrics from multiple children\n- Streaming uses efficient binary protocol with compression\n- Connections can be TLS-encrypted and authenticated\n\n**Information Provided:**\n- **Connection status**: Active, established, disconnected\n- **Streaming statistics**: Bytes sent/received, compression ratios\n- **Buffer usage**: Current buffer fill levels, drops\n- **Performance metrics**: Streaming latency, throughput\n- **Replication status**: Data replication lag and progress\n- **Protocol version**: Streaming protocol version in use\n\n**Use Cases:**\n- **Monitor streaming health**: Ensure children are connected and streaming\n- **Troubleshoot connectivity**: Identify disconnections and buffer issues\n- **Performance analysis**: Check compression ratios and throughput\n- **Capacity planning**: Monitor buffer usage and network bandwidth\n- **Replication monitoring**: Track data replication status\n\n**Common Usage Patterns:**\n\n1. **Get streaming info for localhost:**\n ```\n /api/v3/stream_info\n ```\n\n2. **Get streaming info for specific node:**\n ```\n /api/v3/stream_info?machine_guid=12345678-1234-1234-1234-123456789012\n ```\n\n**Response Structure:**\nReturns streaming information including:\n- Parent/child relationship status\n- Connection uptime and reconnection count\n- Bytes sent/received with compression ratios\n- Buffer usage (current size, maximum size, drops)\n- Replication lag and status\n- Stream protocol version\n\n**Streaming Modes:**\n- **Sender mode**: Node is streaming data TO a parent\n- **Receiver mode**: Node is receiving data FROM children\n- **Both**: Node can be both sender and receiver\n\n**Health Indicators:**\n- `connected: true/false` - Connection status\n- `buffer_used_percentage` - Buffer fill level\n- `compression_ratio` - Data compression efficiency\n- `replication_lag_seconds` - Data replication delay\n\n**Security & Access Control:**\n- 🔓 **Always Public API** - This endpoint is always accessible without authentication\n- **No Restrictions:** Not subject to bearer protection or IP-based ACL restrictions\n- **No Authentication:** Cannot be restricted by any configuration\n- **Access:** Available to anyone who can reach the agent's HTTP endpoint\n", |
| 4335 | "parameters": [ |
| 4336 | { |
| 4337 | "name": "machine_guid", |
| 4338 | "in": "query", |
| 4339 | "required": false, |
| 4340 | "description": "Machine GUID (unique node identifier) to query streaming information for.\nIf not specified, returns streaming information for the local agent.\n\n**GUID Format:**\n- UUID format: `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`\n- Case-insensitive\n- Can be obtained from `/api/v3/nodes` endpoint\n\n**Use Cases:**\n- Query specific child node's streaming status\n- Check parent node's connection to specific child\n- Diagnostic queries for particular node\n\n**Examples:**\n- `12345678-1234-1234-1234-123456789012` - Specific node\n- Empty/omitted - Local agent (default)\n\n**Invalid GUIDs:**\n- Malformed UUID: May return error or empty result\n- Non-existent GUID: Returns empty or not-found response\n", |
| 4341 | "schema": { |
| 4342 | "type": "string", |
| 4343 | "format": "uuid" |
| 4344 | }, |
| 4345 | "example": "12345678-1234-1234-1234-123456789012" |
| 4346 | } |
| 4347 | ], |
| 4348 | "responses": { |
| 4349 | "200": { |
| 4350 | "description": "Successfully retrieved streaming information.\n\nReturns streaming connection details, statistics, and health metrics.\n", |
| 4351 | "content": { |
| 4352 | "application/json": { |
| 4353 | "schema": { |
| 4354 | "type": "object", |
| 4355 | "properties": { |
| 4356 | "machine_guid": { |
| 4357 | "type": "string", |
| 4358 | "format": "uuid", |
| 4359 | "description": "Node machine GUID" |
| 4360 | }, |
| 4361 | "hostname": { |
| 4362 | "type": "string", |
| 4363 | "description": "Node hostname" |
| 4364 | }, |
| 4365 | "streaming_mode": { |
| 4366 | "type": "string", |
| 4367 | "enum": [ |
| 4368 | "sender", |
| 4369 | "receiver", |
| 4370 | "both", |
| 4371 | "none" |
| 4372 | ], |
| 4373 | "description": "Streaming mode of this node" |
| 4374 | }, |
| 4375 | "sender": { |
| 4376 | "type": "object", |
| 4377 | "description": "Sender (child→parent) streaming information", |
| 4378 | "properties": { |
| 4379 | "connected": { |
| 4380 | "type": "boolean", |
| 4381 | "description": "Whether sender is currently connected to parent" |
| 4382 | }, |
| 4383 | "parent_hostname": { |
| 4384 | "type": "string", |
| 4385 | "description": "Hostname of parent node" |
| 4386 | }, |
| 4387 | "uptime_seconds": { |
| 4388 | "type": "integer", |
| 4389 | "description": "Connection uptime in seconds" |
| 4390 | }, |
| 4391 | "reconnects": { |
| 4392 | "type": "integer", |
| 4393 | "description": "Number of reconnection attempts" |
| 4394 | }, |
| 4395 | "bytes_sent": { |
| 4396 | "type": "integer", |
| 4397 | "description": "Total bytes sent" |
| 4398 | }, |
| 4399 | "bytes_compressed": { |
| 4400 | "type": "integer", |
| 4401 | "description": "Bytes after compression" |
| 4402 | }, |
| 4403 | "compression_ratio": { |
| 4404 | "type": "number", |
| 4405 | "description": "Compression ratio (original/compressed)" |
| 4406 | }, |
| 4407 | "buffer_used_bytes": { |
| 4408 | "type": "integer", |
| 4409 | "description": "Current send buffer usage" |
| 4410 | }, |
| 4411 | "buffer_max_bytes": { |
| 4412 | "type": "integer", |
| 4413 | "description": "Maximum send buffer size" |
| 4414 | }, |
| 4415 | "buffer_used_percentage": { |
| 4416 | "type": "number", |
| 4417 | "description": "Buffer fill percentage" |
| 4418 | }, |
| 4419 | "drops": { |
| 4420 | "type": "integer", |
| 4421 | "description": "Number of dropped metrics due to buffer overflow" |
| 4422 | } |
| 4423 | } |
| 4424 | }, |
| 4425 | "receiver": { |
| 4426 | "type": "object", |
| 4427 | "description": "Receiver (parent←children) streaming information", |
| 4428 | "properties": { |
| 4429 | "children": { |
| 4430 | "type": "array", |
| 4431 | "description": "Connected child nodes", |
| 4432 | "items": { |
| 4433 | "type": "object", |
| 4434 | "properties": { |
| 4435 | "machine_guid": { |
| 4436 | "type": "string", |
| 4437 | "format": "uuid" |
| 4438 | }, |
| 4439 | "hostname": { |
| 4440 | "type": "string" |
| 4441 | }, |
| 4442 | "connected": { |
| 4443 | "type": "boolean" |
| 4444 | }, |
| 4445 | "uptime_seconds": { |
| 4446 | "type": "integer" |
| 4447 | }, |
| 4448 | "bytes_received": { |
| 4449 | "type": "integer" |
| 4450 | }, |
| 4451 | "replication_lag_seconds": { |
| 4452 | "type": "integer" |
| 4453 | } |
| 4454 | } |
| 4455 | } |
| 4456 | } |
| 4457 | } |
| 4458 | }, |
| 4459 | "protocol_version": { |
| 4460 | "type": "integer", |
| 4461 | "description": "Streaming protocol version" |
| 4462 | } |
| 4463 | } |
| 4464 | }, |
| 4465 | "examples": { |
| 4466 | "sender_info": { |
| 4467 | "value": { |
| 4468 | "machine_guid": "12345678-1234-1234-1234-123456789012", |
| 4469 | "hostname": "child-node-1", |
| 4470 | "streaming_mode": "sender", |
| 4471 | "sender": { |
| 4472 | "connected": true, |
| 4473 | "parent_hostname": "parent-node", |
| 4474 | "uptime_seconds": 86400, |
| 4475 | "reconnects": 2, |
| 4476 | "bytes_sent": 524288000, |
| 4477 | "bytes_compressed": 104857600, |
| 4478 | "compression_ratio": 5, |
| 4479 | "buffer_used_bytes": 1048576, |
| 4480 | "buffer_max_bytes": 10485760, |
| 4481 | "buffer_used_percentage": 10, |
| 4482 | "drops": 0 |
| 4483 | }, |
| 4484 | "protocol_version": 3 |
| 4485 | }, |
| 4486 | "summary": "Child node streaming to parent" |
| 4487 | }, |
| 4488 | "receiver_info": { |
| 4489 | "value": { |
| 4490 | "machine_guid": "87654321-4321-4321-4321-210987654321", |
| 4491 | "hostname": "parent-node", |
| 4492 | "streaming_mode": "receiver", |
| 4493 | "receiver": { |
| 4494 | "children": [ |
| 4495 | { |
| 4496 | "machine_guid": "12345678-1234-1234-1234-123456789012", |
| 4497 | "hostname": "child-node-1", |
| 4498 | "connected": true, |
| 4499 | "uptime_seconds": 86400, |
| 4500 | "bytes_received": 524288000, |
| 4501 | "replication_lag_seconds": 2 |
| 4502 | }, |
| 4503 | { |
| 4504 | "machine_guid": "23456789-2345-2345-2345-234567890123", |
| 4505 | "hostname": "child-node-2", |
| 4506 | "connected": true, |
| 4507 | "uptime_seconds": 43200, |
| 4508 | "bytes_received": 262144000, |
| 4509 | "replication_lag_seconds": 1 |
| 4510 | } |
| 4511 | ] |
| 4512 | }, |
| 4513 | "protocol_version": 3 |
| 4514 | }, |
| 4515 | "summary": "Parent node receiving from children" |
| 4516 | } |
| 4517 | } |
| 4518 | } |
| 4519 | } |
| 4520 | }, |
| 4521 | "400": { |
| 4522 | "description": "Invalid machine_guid format." |
| 4523 | }, |
| 4524 | "404": { |
| 4525 | "description": "Node with specified machine_guid not found." |
| 4526 | }, |
| 4527 | "500": { |
| 4528 | "description": "Internal server error during streaming info retrieval." |
| 4529 | } |
| 4530 | } |
| 4531 | } |
| 4532 | }, |
| 4533 | "/api/v3/rtc_offer": { |
| 4534 | "post": { |
| 4535 | "operationId": "rtcOffer3", |
| 4536 | "tags": [ |
| 4537 | "webrtc" |
| 4538 | ], |
| 4539 | "summary": "Establish WebRTC peer connection by exchanging SDP offer/answer", |
| 4540 | "description": "**WebRTC Connection Establishment**\n\nThis endpoint implements the WebRTC signaling process for establishing peer-to-peer data connections with the Netdata agent. It follows the standard WebRTC negotiation flow using SDP (Session Description Protocol) offer/answer exchange.\n\n**How It Works:**\n1. Client creates a WebRTC peer connection and generates an SDP offer\n2. Client sends the SDP offer to this endpoint via POST request body\n3. Server processes the offer, configures ICE servers and connection parameters\n4. Server generates and returns an SDP answer with ICE candidates\n5. Client sets the answer to complete the WebRTC connection handshake\n6. Data channels can then be established for real-time communication\n\n**Use Cases:**\n- **Real-time dashboards:** Stream live metrics with minimal latency using WebRTC data channels\n- **Browser-based monitoring:** Enable direct peer-to-peer connections from web browsers to agents\n- **NAT traversal:** Establish connections through firewalls and NATs using ICE/STUN/TURN\n- **Low-latency updates:** Bypass HTTP polling for instant metric updates via WebRTC\n- **Bi-directional communication:** Enable interactive control and monitoring in real-time\n\n**Connection Configuration:**\n- Maximum message size: 5 MiB (local), negotiated with remote peer\n- ICE transport policy: All (both UDP and TCP)\n- Automatic ICE candidate gathering\n- Support for STUN/TURN servers\n- Automatic port range selection\n- MTU auto-detection\n\n**Important Notes:**\n- WebRTC must be enabled in agent configuration (enabled by default in debug builds)\n- The endpoint waits for ICE gathering to complete before returning the answer\n- The SDP offer must be valid and include media descriptions\n- Response includes both SDP answer and gathered ICE candidates\n- Connections are automatically cleaned up on timeout or disconnection\n\n**Example SDP Offer Structure:**\n```\nv=0\no=- 123456789 2 IN IP4 127.0.0.1\ns=-\nt=0 0\na=group:BUNDLE 0\na=msid-semantic: WMS\nm=application 9 UDP/DTLS/SCTP webrtc-datachannel\nc=IN IP4 0.0.0.0\na=ice-ufrag:XXXX\na=ice-pwd:YYYY\na=fingerprint:sha-256 ZZ:ZZ:...\na=setup:actpass\na=mid:0\na=sctp-port:5000\na=max-message-size:65536\n```\n\n**Performance Characteristics:**\n- Synchronous operation (blocks until ICE gathering completes)\n- Typical response time: 100-500ms (depending on ICE gathering)\n- Supports multiple concurrent connections\n- Automatic connection cleanup on idle timeout\n\n**Security & Access Control:**\n- ⚠️ **ACLK-Only API** - This endpoint is ONLY accessible via Netdata Cloud (ACLK connection)\n- **NOT accessible via:** Direct HTTP/HTTPS to agent, local dashboard, or external tools\n- **Authentication:** Requires Netdata Cloud authentication (`SIGNED_ID` + `SAME_SPACE`)\n- **User Requirements:** User must be authenticated and in the same cloud space as the agent\n- **Development Mode:** Can be enabled for testing with `ACL_DEV_OPEN_ACCESS` flag\n", |
| 4541 | "security": [ |
| 4542 | { |
| 4543 | "aclkAuth": [] |
| 4544 | } |
| 4545 | ], |
| 4546 | "requestBody": { |
| 4547 | "required": true, |
| 4548 | "content": { |
| 4549 | "text/plain": { |
| 4550 | "schema": { |
| 4551 | "type": "string", |
| 4552 | "description": "SDP (Session Description Protocol) offer from the client's WebRTC peer connection.\nMust be a valid SDP offer string containing session information, media descriptions,\nICE credentials, and DTLS fingerprint.\n", |
| 4553 | "example": "v=0\no=- 123456789 2 IN IP4 127.0.0.1\ns=-\nt=0 0\na=group:BUNDLE 0\nm=application 9 UDP/DTLS/SCTP webrtc-datachannel\nc=IN IP4 0.0.0.0\na=ice-ufrag:abcd1234\na=ice-pwd:efgh5678ijkl9012mnop3456\na=fingerprint:sha-256 AB:CD:EF:01:23:45:67:89:AB:CD:EF:01:23:45:67:89:AB:CD:EF:01:23:45:67:89:AB:CD:EF:01:23:45:67:89:AB\na=setup:actpass\na=mid:0\na=sctp-port:5000\na=max-message-size:65536\n" |
| 4554 | } |
| 4555 | } |
| 4556 | } |
| 4557 | }, |
| 4558 | "responses": { |
| 4559 | "200": { |
| 4560 | "description": "SDP answer successfully generated. The response contains the server's SDP answer\nincluding all gathered ICE candidates. The client should set this as the remote\ndescription to complete the WebRTC handshake.\n", |
| 4561 | "content": { |
| 4562 | "application/json": { |
| 4563 | "schema": { |
| 4564 | "type": "object", |
| 4565 | "properties": { |
| 4566 | "sdp": { |
| 4567 | "type": "string", |
| 4568 | "description": "SDP answer from the server containing session information, media descriptions,\nICE credentials, DTLS fingerprint, and all gathered ICE candidates.\n" |
| 4569 | }, |
| 4570 | "type": { |
| 4571 | "type": "string", |
| 4572 | "enum": [ |
| 4573 | "answer" |
| 4574 | ], |
| 4575 | "description": "SDP message type (always \"answer\" for responses)" |
| 4576 | } |
| 4577 | }, |
| 4578 | "example": { |
| 4579 | "sdp": "v=0\no=- 987654321 2 IN IP4 192.168.1.100\ns=-\nt=0 0\na=group:BUNDLE 0\nm=application 9 UDP/DTLS/SCTP webrtc-datachannel\nc=IN IP4 192.168.1.100\na=candidate:1 1 udp 2130706431 192.168.1.100 54321 typ host\na=candidate:2 1 udp 1694498815 203.0.113.1 54321 typ srflx raddr 192.168.1.100 rport 54321\na=ice-ufrag:wxyz9876\na=ice-pwd:stuv5432wxyz1098abcd7654\na=fingerprint:sha-256 12:34:56:78:9A:BC:DE:F0:12:34:56:78:9A:BC:DE:F0:12:34:56:78:9A:BC:DE:F0:12:34:56:78:9A:BC:DE:F0:12\na=setup:active\na=mid:0\na=sctp-port:5000\na=max-message-size:5242880\n", |
| 4580 | "type": "answer" |
| 4581 | } |
| 4582 | } |
| 4583 | } |
| 4584 | } |
| 4585 | }, |
| 4586 | "400": { |
| 4587 | "description": "Bad request due to one of the following reasons:\n- WebRTC is not enabled on this agent (check configuration)\n- No SDP offer provided in request body\n- Invalid SDP format or content\n- Missing required SDP fields (ice-ufrag, ice-pwd, fingerprint)\n" |
| 4588 | }, |
| 4589 | "500": { |
| 4590 | "description": "Internal server error during WebRTC connection establishment or ICE gathering." |
| 4591 | } |
| 4592 | } |
| 4593 | } |
| 4594 | }, |
| 4595 | "/api/v3/claim": { |
| 4596 | "get": { |
| 4597 | "operationId": "claim3", |
| 4598 | "tags": [ |
| 4599 | "claiming" |
| 4600 | ], |
| 4601 | "summary": "Claim agent to Netdata Cloud", |
| 4602 | "description": "**Agent Claiming to Netdata Cloud**\n\nThis endpoint initiates the process of claiming (connecting) a Netdata agent to Netdata Cloud. Claiming establishes a secure, authenticated connection between the agent and Netdata Cloud, enabling centralized monitoring, team collaboration, and cloud-based features.\n\n**Claiming Process Flow:**\n1. **Get Claim Info:** Call endpoint without parameters to get claiming status and verification command\n2. **Generate Verification Key:** Server generates random session ID and saves it to `/var/lib/netdata/netdata_random_session_id`\n3. **Verify Server Ownership:** Administrator runs provided OS-specific command to retrieve the verification key\n4. **Submit Claim Request:** Call endpoint with key, token, URL, and optionally rooms to complete claiming\n5. **Establish Connection:** Server connects to Netdata Cloud and registers the agent\n6. **Reload Connection:** Agent reloads cloud connection and waits for online status\n\n**Use Cases:**\n- **Initial Setup:** Claim a new agent to connect it to Netdata Cloud for the first time\n- **Team Onboarding:** Add agents to specific cloud rooms for team organization\n- **Infrastructure Management:** Connect agents across distributed infrastructure to centralized monitoring\n- **Security Verification:** Ensure only authorized users can claim agents through server access verification\n- **Status Checking:** Query current claiming status and cloud connection state\n\n**Claiming States:**\n- **AVAILABLE:** Agent can be claimed (not yet connected to cloud)\n- **OFFLINE:** Agent was claimed but is currently offline from cloud\n- **INDIRECT:** Agent is connected through a parent agent\n- **ONLINE:** Agent is claimed and online (cannot be re-claimed without unclaiming first)\n- **BANNED:** Agent is banned from cloud (cannot be claimed)\n\n**Security Features:**\n- Random session key verification prevents unauthorized claiming\n- Key is regenerated after each claim attempt (successful or failed)\n- Key stored in file system requires server access to retrieve\n- Parameter validation ensures only safe characters (alphanumeric, dots, commas, dashes, colons, slashes, underscores)\n- Different OS-specific commands for key retrieval (Linux/Docker/Windows)\n\n**Platform-Specific Key Retrieval:**\n- **Linux:** `sudo cat /var/lib/netdata/netdata_random_session_id`\n- **Docker:** `docker exec netdata cat /var/lib/netdata/netdata_random_session_id`\n- **Windows:** `more C:\\path\\to\\netdata_random_session_id`\n\n**Response Formats:**\n- **Info Response:** Returns cloud status, can_be_claimed flag, verification command, and agents info\n- **Success Response:** Includes success=true, message=\"ok\", updated cloud status\n- **Error Response:** Includes success=false, error message, can_be_claimed flag, new verification key\n\n**Important Notes:**\n- Agent must be in AVAILABLE, OFFLINE, or INDIRECT state to be claimed\n- Claiming token is obtained from Netdata Cloud UI (Space settings → Nodes tab → Add Nodes)\n- Base URL typically points to Netdata Cloud API (e.g., https://api.netdata.cloud)\n- Rooms parameter is optional - agent will be added to specified war rooms if provided\n- After successful claiming, agent automatically reloads connection and waits for online status\n- Failed claim attempts regenerate the verification key for security\n\n**Example Workflow:**\n```bash\n# 1. Get claiming info and verification command\ncurl http://localhost:19999/api/v3/claim\n\n# 2. Run the command shown in response to get the key\nsudo cat /var/lib/netdata/netdata_random_session_id\n# Output: 12345678-1234-1234-1234-123456789abc\n\n# 3. Submit claim request with key from step 2 and token from Netdata Cloud\ncurl \"http://localhost:19999/api/v3/claim?key=12345678-1234-1234-1234-123456789abc&token=YOUR_CLAIM_TOKEN&url=https://api.netdata.cloud&rooms=room1,room2\"\n```\n\n**Security & Access Control:**\n- 🔓 **Always Public API** - This endpoint is always accessible without authentication\n- **Security Model:** Protected by random session key verification (not ACL/bearer token)\n- **Verification Required:** Must provide verification key from agent's file system to claim\n- **Server Access:** Only users with server file system access can obtain the verification key\n- **No ACL Restrictions:** Not subject to IP-based ACL or bearer protection\n", |
| 4603 | "parameters": [ |
| 4604 | { |
| 4605 | "name": "key", |
| 4606 | "in": "query", |
| 4607 | "required": false, |
| 4608 | "schema": { |
| 4609 | "type": "string", |
| 4610 | "format": "uuid" |
| 4611 | }, |
| 4612 | "description": "**Verification key (UUID) obtained from the server's file system.**\n\nThis is a randomly generated session ID that proves the requester has access to the server.\nTo obtain this key:\n1. Call the endpoint without parameters to get the OS-specific command\n2. Run the command on the server (requires sudo/admin access)\n3. Copy the UUID from the file content\n4. Use it in the claim request\n\n**Security Notes:**\n- Key is randomly generated on each info request\n- Key is regenerated after each claim attempt (prevents reuse)\n- Mismatched key triggers new key generation (prevents brute force)\n- Validates server ownership through file system access\n\n**When to Include:**\n- Omit when requesting claiming info/status\n- Include when submitting actual claim request\n\nExample: `12345678-1234-1234-1234-123456789abc`\n" |
| 4613 | }, |
| 4614 | { |
| 4615 | "name": "token", |
| 4616 | "in": "query", |
| 4617 | "required": false, |
| 4618 | "schema": { |
| 4619 | "type": "string" |
| 4620 | }, |
| 4621 | "description": "**Claiming token from Netdata Cloud.**\n\nThis token authorizes the agent to connect to a specific Netdata Cloud space.\nObtained from Netdata Cloud UI: Space settings → Nodes tab → Add Nodes → Copy claim token\n\n**Validation:**\n- Must contain only alphanumeric characters, dots, commas, dashes, colons, slashes, underscores\n- Required when key parameter is provided\n- Invalid token triggers error and key regeneration\n\n**Token Characteristics:**\n- Space-specific (each cloud space has different tokens)\n- Can be regenerated in cloud UI if compromised\n- Does not expire (remains valid until regenerated)\n\nExample: `a1b2c3d4-e5f6-7890-abcd-ef1234567890`\n" |
| 4622 | }, |
| 4623 | { |
| 4624 | "name": "url", |
| 4625 | "in": "query", |
| 4626 | "required": false, |
| 4627 | "schema": { |
| 4628 | "type": "string", |
| 4629 | "format": "uri" |
| 4630 | }, |
| 4631 | "description": "**Netdata Cloud API base URL.**\n\nThe endpoint URL for Netdata Cloud API where the agent will connect.\n\n**Standard Values:**\n- Production: `https://api.netdata.cloud`\n- Staging/Testing: `https://api-staging.netdata.cloud` (if applicable)\n\n**Validation:**\n- Must contain only alphanumeric characters, dots, commas, dashes, colons, slashes, underscores\n- Required when key parameter is provided\n- Should be valid HTTPS URL pointing to Netdata Cloud API\n\n**Important Notes:**\n- Use the URL provided in Netdata Cloud UI claim instructions\n- Different cloud regions may have different URLs\n- Invalid URL prevents successful claiming\n\nExample: `https://api.netdata.cloud`\n" |
| 4632 | }, |
| 4633 | { |
| 4634 | "name": "rooms", |
| 4635 | "in": "query", |
| 4636 | "required": false, |
| 4637 | "schema": { |
| 4638 | "type": "string" |
| 4639 | }, |
| 4640 | "description": "**Comma-separated list of war room IDs to add the agent to.**\n\nWar rooms are organizational units within a Netdata Cloud space for grouping related nodes.\n\n**Format:**\n- Comma-separated room IDs (no spaces)\n- Each room ID validated for safe characters\n- Optional parameter (agent claimed to space without specific rooms if omitted)\n\n**Validation:**\n- Must contain only alphanumeric characters, dots, commas, dashes, colons, slashes, underscores\n- Invalid format triggers error and key regeneration\n\n**Room IDs:**\n- Obtained from Netdata Cloud UI (room settings)\n- Room must exist in the target space\n- Agent added to all specified rooms after claiming\n- Can be modified later in cloud UI\n\n**Use Cases:**\n- Add agent to production monitoring room\n- Organize by environment (dev, staging, prod)\n- Group by application or service type\n\nExample: `room-1234-5678-90ab,room-cdef-0123-4567`\n" |
| 4641 | } |
| 4642 | ], |
| 4643 | "responses": { |
| 4644 | "200": { |
| 4645 | "description": "Claiming request processed successfully. Check the `success` field to determine if claiming succeeded.\n- **Info response** (no key provided): Returns cloud status, verification command, and can_be_claimed flag\n- **Success response** (key provided, claim succeeded): Returns success=true with updated cloud status\n- **Action failed response** (key provided, claim failed): Returns success=false with failure reason\n", |
| 4646 | "content": { |
| 4647 | "application/json": { |
| 4648 | "schema": { |
| 4649 | "type": "object", |
| 4650 | "properties": { |
| 4651 | "success": { |
| 4652 | "type": "boolean", |
| 4653 | "description": "Present only for claim action responses (when key is provided).\ntrue = claiming succeeded, false = claiming failed.\nNot present in info responses (when requesting claim status without key).\n" |
| 4654 | }, |
| 4655 | "message": { |
| 4656 | "type": "string", |
| 4657 | "description": "Result message. Present only for claim action responses.\n- Success: \"ok\"\n- Failure: Reason for failure (e.g., \"invalid key\", \"invalid parameters\", cloud connection error)\n" |
| 4658 | }, |
| 4659 | "cloud_status": { |
| 4660 | "type": "string", |
| 4661 | "enum": [ |
| 4662 | "available", |
| 4663 | "offline", |
| 4664 | "indirect", |
| 4665 | "online", |
| 4666 | "banned" |
| 4667 | ], |
| 4668 | "description": "Current cloud connection status of the agent.\n- available: Not claimed yet, can be claimed\n- offline: Claimed but currently disconnected\n- indirect: Connected through parent agent\n- online: Claimed and connected (cannot re-claim)\n- banned: Banned from cloud (cannot claim)\n" |
| 4669 | }, |
| 4670 | "can_be_claimed": { |
| 4671 | "type": "boolean", |
| 4672 | "description": "Whether the agent can currently be claimed. Present in info and error responses.\ntrue for available/offline/indirect states, false for online/banned.\n" |
| 4673 | }, |
| 4674 | "key_filename": { |
| 4675 | "type": "string", |
| 4676 | "description": "Full path to the file containing the verification key.\nPresent in info and error responses (not present after successful claim).\nPlatform-specific path (Linux: /var/lib/netdata/..., Windows: C:\\...).\n" |
| 4677 | }, |
| 4678 | "cmd": { |
| 4679 | "type": "string", |
| 4680 | "description": "OS-specific command to retrieve the verification key.\nPresent in info and error responses.\n- Linux: \"sudo cat /var/lib/netdata/netdata_random_session_id\"\n- Docker: \"docker exec netdata cat /var/lib/netdata/netdata_random_session_id\"\n- Windows: \"more C:\\path\\to\\netdata_random_session_id\"\n" |
| 4681 | }, |
| 4682 | "help": { |
| 4683 | "type": "string", |
| 4684 | "description": "Human-readable instructions for obtaining the verification key.\nPresent in info and error responses.\n" |
| 4685 | }, |
| 4686 | "agents": { |
| 4687 | "type": "array", |
| 4688 | "description": "Agent information for the claimed node(s)", |
| 4689 | "items": { |
| 4690 | "type": "object" |
| 4691 | } |
| 4692 | } |
| 4693 | } |
| 4694 | }, |
| 4695 | "examples": { |
| 4696 | "info_response": { |
| 4697 | "value": { |
| 4698 | "cloud_status": "available", |
| 4699 | "can_be_claimed": true, |
| 4700 | "key_filename": "/var/lib/netdata/netdata_random_session_id", |
| 4701 | "cmd": "sudo cat /var/lib/netdata/netdata_random_session_id", |
| 4702 | "help": "We need to verify this server is yours. SSH to this server and run this command. It will give you a UUID. Copy and paste this UUID to this box:", |
| 4703 | "agents": [ |
| 4704 | { |
| 4705 | "hostname": "my-server", |
| 4706 | "machine_guid": "12345678-1234-1234-1234-123456789abc" |
| 4707 | } |
| 4708 | ] |
| 4709 | }, |
| 4710 | "summary": "Info response (no claim attempt)" |
| 4711 | }, |
| 4712 | "success_response": { |
| 4713 | "value": { |
| 4714 | "success": true, |
| 4715 | "message": "ok", |
| 4716 | "cloud_status": "online", |
| 4717 | "agents": [ |
| 4718 | { |
| 4719 | "hostname": "my-server", |
| 4720 | "machine_guid": "12345678-1234-1234-1234-123456789abc", |
| 4721 | "claimed_id": "cloud-node-id-123" |
| 4722 | } |
| 4723 | ] |
| 4724 | }, |
| 4725 | "summary": "Successful claim" |
| 4726 | }, |
| 4727 | "error_response": { |
| 4728 | "value": { |
| 4729 | "success": false, |
| 4730 | "message": "invalid key", |
| 4731 | "cloud_status": "available", |
| 4732 | "can_be_claimed": true, |
| 4733 | "key_filename": "/var/lib/netdata/netdata_random_session_id", |
| 4734 | "cmd": "sudo cat /var/lib/netdata/netdata_random_session_id", |
| 4735 | "help": "We need to verify this server is yours. SSH to this server and run this command. It will give you a UUID. Copy and paste this UUID to this box:", |
| 4736 | "agents": [ |
| 4737 | { |
| 4738 | "hostname": "my-server", |
| 4739 | "machine_guid": "12345678-1234-1234-1234-123456789abc" |
| 4740 | } |
| 4741 | ] |
| 4742 | }, |
| 4743 | "summary": "Failed claim (invalid key)" |
| 4744 | } |
| 4745 | } |
| 4746 | } |
| 4747 | } |
| 4748 | }, |
| 4749 | "400": { |
| 4750 | "description": "Bad request (only in v2 API or earlier). V3 returns errors as JSON with HTTP 200.\nReasons include:\n- Invalid key (doesn't match generated session ID)\n- Invalid parameters (missing token/url, or invalid characters)\n- Cloud connection failure\n" |
| 4751 | } |
| 4752 | } |
| 4753 | } |
| 4754 | }, |
| 4755 | "/api/v3/bearer_protection": { |
| 4756 | "get": { |
| 4757 | "operationId": "bearerProtection3", |
| 4758 | "tags": [ |
| 4759 | "authentication" |
| 4760 | ], |
| 4761 | "summary": "Enable or disable bearer token authentication requirement", |
| 4762 | "description": "**Bearer Token Authentication Control**\n\nThis endpoint controls whether the Netdata agent requires bearer token authentication for API access. Bearer protection adds an additional security layer by requiring a valid bearer token in the Authorization header for all API requests when enabled.\n\n**Use Cases:**\n- **Cloud Integration:** Enable bearer protection when agent is claimed to Netdata Cloud\n- **Security Hardening:** Add token-based authentication to prevent unauthorized API access\n- **Multi-Tenant Environments:** Enforce authentication in shared infrastructure\n- **Dynamic Security:** Toggle authentication requirements based on operational needs\n- **Remote Management:** Netdata Cloud can enable protection when claiming agents\n\n**How It Works:**\n1. When bearer protection is enabled, all API requests must include: `Authorization: Bearer <token>`\n2. Tokens are obtained via `/api/v3/bearer_get_token` endpoint\n3. Tokens have expiration times and must be renewed periodically\n4. Invalid or missing tokens result in HTTP 401 Unauthorized\n5. Some endpoints (like claiming) may bypass bearer protection\n\n**Security Verification:**\n- **claim_id:** Must match the agent's current claim ID (prevents requests to wrong agent)\n- **machine_guid:** Must match the agent's machine GUID (hardware fingerprint)\n- **node_id:** Must match the agent's node UUID (persistent identity)\n- All three identifiers must be present and match for the operation to succeed\n\n**Protection States:**\n- **Enabled (true):** All API requests require valid bearer token in Authorization header\n- **Disabled (false):** API requests do not require bearer tokens (default for unclaimed agents)\n\n**Important Notes:**\n- This endpoint itself requires authentication (typically called by Netdata Cloud during claiming)\n- Changing protection state affects all subsequent API requests immediately\n- Netdata Cloud automatically enables bearer protection when an agent is claimed\n- Local access may still work without bearer token depending on configuration\n- The endpoint validates that the request is for the correct agent using claim_id, machine_guid, and node_id\n- Mismatched identifiers return HTTP 400 Bad Request\n\n**Typical Workflow:**\n1. Agent is claimed to Netdata Cloud\n2. Cloud calls this endpoint to enable bearer protection\n3. All future API calls to the agent require bearer tokens\n4. Cloud obtains tokens via `/api/v3/bearer_get_token` as needed\n5. Tokens are included in Authorization headers for authenticated requests\n\n**Security & Access Control:**\n- ⚠️ **ACLK-Only API** - This endpoint is ONLY accessible via Netdata Cloud (ACLK connection)\n- **NOT accessible via:** Direct HTTP/HTTPS to agent, even with bearer token\n- **Authentication:** Requires Netdata Cloud authentication with elevated permissions\n- **Required Permissions:** `SIGNED_ID` + `SAME_SPACE` + `VIEW_AGENT_CONFIG` + `EDIT_AGENT_CONFIG`\n- **User Roles:** Typically Admin or Manager role required\n- **Development Mode:** Can be enabled for testing with `ACL_DEV_OPEN_ACCESS` flag\n", |
| 4763 | "security": [ |
| 4764 | { |
| 4765 | "aclkAuth": [] |
| 4766 | } |
| 4767 | ], |
| 4768 | "parameters": [ |
| 4769 | { |
| 4770 | "name": "bearer_protection", |
| 4771 | "in": "query", |
| 4772 | "required": false, |
| 4773 | "schema": { |
| 4774 | "type": "string", |
| 4775 | "enum": [ |
| 4776 | "on", |
| 4777 | "off", |
| 4778 | true, |
| 4779 | false, |
| 4780 | "yes", |
| 4781 | "no" |
| 4782 | ] |
| 4783 | }, |
| 4784 | "description": "**Whether to enable or disable bearer token authentication requirement.**\n\n**Valid Values:**\n- Enable: `on`, `true`, `yes`\n- Disable: `off`, `false`, `no`\n\n**Default Behavior:**\n- If omitted, maintains current bearer protection state\n- When agent is unclaimed, defaults to disabled\n- When agent is claimed, typically enabled by Netdata Cloud\n\n**Effect:**\n- When enabled: All API requests must include valid bearer token in Authorization header\n- When disabled: API requests work without bearer tokens (less secure)\n\nExample: `bearer_protection=on`\n" |
| 4785 | }, |
| 4786 | { |
| 4787 | "name": "claim_id", |
| 4788 | "in": "query", |
| 4789 | "required": true, |
| 4790 | "schema": { |
| 4791 | "type": "string" |
| 4792 | }, |
| 4793 | "description": "**Claim ID of the agent from Netdata Cloud.**\n\nThis identifies which Netdata Cloud space the agent is claimed to.\nUsed to verify the request is for the correct agent.\n\n**Validation:**\n- Must match the agent's current claim ID\n- Request fails with HTTP 400 if claim ID doesn't match\n- Prevents accidentally enabling protection on wrong agent\n\n**Where to Find:**\n- Obtained from cloud when agent is claimed\n- Available in agent's claiming configuration\n- Included in cloud API responses\n\nExample: `claim_id=1234567890abcdef`\n" |
| 4794 | }, |
| 4795 | { |
| 4796 | "name": "machine_guid", |
| 4797 | "in": "query", |
| 4798 | "required": true, |
| 4799 | "schema": { |
| 4800 | "type": "string" |
| 4801 | }, |
| 4802 | "description": "**Machine GUID of the agent.**\n\nHardware-based unique identifier for the agent instance.\nGenerated based on machine characteristics.\n\n**Purpose:**\n- Verifies request is for the specific agent instance\n- Prevents applying protection to wrong node\n- Part of multi-factor agent identification\n\n**Characteristics:**\n- Persists across agent restarts\n- May change if hardware changes significantly\n- Matches the `machine_guid` in agent info\n\n**Where to Find:**\n- Available in `/api/v3/info` response\n- Stored in agent's state files\n- Shown in Netdata Cloud node details\n\nExample: `machine_guid=12345678-1234-1234-1234-123456789abc`\n" |
| 4803 | }, |
| 4804 | { |
| 4805 | "name": "node_id", |
| 4806 | "in": "query", |
| 4807 | "required": true, |
| 4808 | "schema": { |
| 4809 | "type": "string", |
| 4810 | "format": "uuid" |
| 4811 | }, |
| 4812 | "description": "**Node UUID of the agent.**\n\nPersistent unique identifier for the agent.\nMore stable than machine_guid.\n\n**Purpose:**\n- Provides additional verification layer\n- Ensures request targets correct node\n- Used alongside claim_id and machine_guid for security\n\n**Characteristics:**\n- Generated once and persists\n- Does not change with hardware changes\n- Unique across all Netdata installations\n\n**Where to Find:**\n- Available in `/api/v3/info` response\n- Stored in agent's persistent state\n- Used by Netdata Cloud for node identification\n\nExample: `node_id=23456789-2345-2345-2345-234567890abc`\n" |
| 4813 | } |
| 4814 | ], |
| 4815 | "responses": { |
| 4816 | "200": { |
| 4817 | "description": "Bearer protection state successfully changed.", |
| 4818 | "content": { |
| 4819 | "application/json": { |
| 4820 | "schema": { |
| 4821 | "type": "object", |
| 4822 | "properties": { |
| 4823 | "bearer_protection": { |
| 4824 | "type": "boolean", |
| 4825 | "description": "Current bearer protection state after the operation (true = enabled, false = disabled)" |
| 4826 | } |
| 4827 | } |
| 4828 | }, |
| 4829 | "example": { |
| 4830 | "bearer_protection": true |
| 4831 | } |
| 4832 | } |
| 4833 | } |
| 4834 | }, |
| 4835 | "400": { |
| 4836 | "description": "Bad request due to one of the following:\n- claim_id doesn't match the agent's claim ID\n- machine_guid doesn't match the agent's machine GUID\n- node_id doesn't match or is missing\n- Invalid parameter values\n" |
| 4837 | } |
| 4838 | } |
| 4839 | } |
| 4840 | }, |
| 4841 | "/api/v3/bearer_get_token": { |
| 4842 | "get": { |
| 4843 | "operationId": "bearerGetToken3", |
| 4844 | "tags": [ |
| 4845 | "authentication" |
| 4846 | ], |
| 4847 | "summary": "Obtain bearer authentication token", |
| 4848 | "description": "**Bearer Token Generation**\n\nThis endpoint generates a bearer authentication token that can be used to authenticate API requests when bearer protection is enabled. Tokens are time-limited and include role-based access control information.\n\n**Use Cases:**\n- **Netdata Cloud Access:** Cloud obtains tokens to query agent metrics and execute functions\n- **API Integration:** Applications get tokens to access protected agent APIs\n- **User Authentication:** Generate tokens for users based on their roles and permissions\n- **Automated Monitoring:** Scripts obtain tokens for scheduled metric collection\n- **Temporary Access:** Create limited-lifetime tokens for specific operations\n\n**Token Characteristics:**\n- **Time-Limited:** Tokens expire after a set duration (configurable)\n- **Role-Based:** Tokens include user role information (admin, manager, viewer, etc.)\n- **Access-Scoped:** Tokens specify allowed access levels (data, functions, etc.)\n- **Cloud-Linked:** Can be associated with cloud account ID for tracking\n- **Client-Identified:** Can include client name for audit logging\n\n**Token Usage:**\n```\n# Obtain token\nTOKEN=$(curl \"http://localhost:19999/api/v3/bearer_get_token?claim_id=...&machine_guid=...&node_id=...\" | jq -r .token)\n\n# Use token in subsequent requests\ncurl -H \"Authorization: Bearer $TOKEN\" http://localhost:19999/api/v3/data?chart=system.cpu\n```\n\n**Security Verification:**\n- **claim_id:** Must match the agent's claim ID (ensures request is for correct agent)\n- **machine_guid:** Must match the agent's machine GUID (hardware verification)\n- **node_id:** Must match the agent's node UUID (persistent identity)\n- All three identifiers must be present and exact matches\n\n**Remote Agent Support:**\n- If requested for a child/remote agent (not localhost), request is forwarded via function call\n- Token is generated on the remote agent with appropriate permissions\n- Response includes remote agent's machine_guid\n\n**Token Expiration:**\n- Tokens have finite lifetime (typically hours)\n- Expired tokens return HTTP 401 Unauthorized\n- Applications should refresh tokens before expiration\n- Expiration time included in response for planning renewal\n\n**Important Notes:**\n- This endpoint typically requires existing authentication (cloud or admin access)\n- Generated token inherits user role and access permissions from requester\n- Tokens are cryptographically secure random UUIDs\n- Response includes current bearer protection state\n- Failed verification attempts do not generate tokens\n- Mismatched identifiers return HTTP 400 Bad Request\n\n**Typical Workflow:**\n1. Netdata Cloud or authorized client calls this endpoint with agent identifiers\n2. Agent verifies claim_id, machine_guid, and node_id all match\n3. Agent generates bearer token with specified role/access/account info\n4. Token and expiration time returned in JSON response\n5. Client includes token in Authorization header for subsequent API calls\n6. Token is validated on each API request until expiration\n7. Client requests new token before expiration to maintain access\n\n**Security & Access Control:**\n- ⚠️ **ACLK-Only API** - This endpoint is ONLY accessible via Netdata Cloud (ACLK connection)\n- **NOT accessible via:** Direct HTTP/HTTPS to agent, local dashboard, or external tools\n- **Authentication:** Requires Netdata Cloud authentication (`SIGNED_ID` + `SAME_SPACE`)\n- **User Requirements:** User must be authenticated and in the same cloud space as the agent\n- **Token Scope:** Generated tokens inherit the requester's role and access permissions\n- **Development Mode:** Can be enabled for testing with `ACL_DEV_OPEN_ACCESS` flag\n", |
| 4849 | "security": [ |
| 4850 | { |
| 4851 | "aclkAuth": [] |
| 4852 | } |
| 4853 | ], |
| 4854 | "parameters": [ |
| 4855 | { |
| 4856 | "name": "claim_id", |
| 4857 | "in": "query", |
| 4858 | "required": true, |
| 4859 | "schema": { |
| 4860 | "type": "string" |
| 4861 | }, |
| 4862 | "description": "**Claim ID of the agent from Netdata Cloud.**\n\nIdentifies which Netdata Cloud space the agent belongs to.\nUsed to verify the token request is for the correct agent.\n\n**Validation:**\n- Must match the agent's current claim ID\n- Request fails with HTTP 400 if claim ID doesn't match\n- Can use `claim_id_matches_any()` for multi-agent parents\n\n**Security:**\n- Prevents token generation for wrong agent\n- Ensures cloud can only get tokens for agents it manages\n- Part of multi-factor agent verification\n\nExample: `claim_id=1234567890abcdef`\n" |
| 4863 | }, |
| 4864 | { |
| 4865 | "name": "machine_guid", |
| 4866 | "in": "query", |
| 4867 | "required": true, |
| 4868 | "schema": { |
| 4869 | "type": "string" |
| 4870 | }, |
| 4871 | "description": "**Machine GUID of the target agent.**\n\nHardware-based unique identifier for the agent instance.\n\n**Purpose:**\n- Verifies request is for the specific agent instance\n- Prevents token generation for wrong node\n- Must match exactly or request fails\n\n**Where to Find:**\n- Available in `/api/v3/info` response\n- Included in cloud agent registration\n- Stored in agent state files\n\n**Validation:**\n- Compared against host->machine_guid\n- Both claim_id and machine_guid must match\n- node_id also verified for triple authentication\n\nExample: `machine_guid=12345678-1234-1234-1234-123456789abc`\n" |
| 4872 | }, |
| 4873 | { |
| 4874 | "name": "node_id", |
| 4875 | "in": "query", |
| 4876 | "required": true, |
| 4877 | "schema": { |
| 4878 | "type": "string", |
| 4879 | "format": "uuid" |
| 4880 | }, |
| 4881 | "description": "**Node UUID of the target agent.**\n\nPersistent unique identifier for the agent node.\n\n**Purpose:**\n- Additional verification layer beyond machine_guid\n- Ensures correct node identification\n- Used in combination with other identifiers\n\n**Characteristics:**\n- More stable than machine_guid\n- Persists across hardware changes\n- Unique across all Netdata installations\n\n**Validation:**\n- Must be non-zero UUID\n- Must match host->node_id exactly\n- Compared in lowercase format\n\nExample: `node_id=23456789-2345-2345-2345-234567890abc`\n" |
| 4882 | } |
| 4883 | ], |
| 4884 | "responses": { |
| 4885 | "200": { |
| 4886 | "description": "Bearer token successfully generated.", |
| 4887 | "content": { |
| 4888 | "application/json": { |
| 4889 | "schema": { |
| 4890 | "type": "object", |
| 4891 | "properties": { |
| 4892 | "status": { |
| 4893 | "type": "integer", |
| 4894 | "description": "HTTP status code (always 200 for success)", |
| 4895 | "example": 200 |
| 4896 | }, |
| 4897 | "mg": { |
| 4898 | "type": "string", |
| 4899 | "description": "Machine GUID of the agent that generated the token" |
| 4900 | }, |
| 4901 | "bearer_protection": { |
| 4902 | "type": "boolean", |
| 4903 | "description": "Current bearer protection state (true = enabled, false = disabled)" |
| 4904 | }, |
| 4905 | "token": { |
| 4906 | "type": "string", |
| 4907 | "format": "uuid", |
| 4908 | "description": "Bearer token UUID to use in Authorization header.\nFormat: `Authorization: Bearer <token>`\n" |
| 4909 | }, |
| 4910 | "expiration": { |
| 4911 | "type": "integer", |
| 4912 | "format": "int64", |
| 4913 | "description": "Unix timestamp (seconds since epoch) when the token expires" |
| 4914 | } |
| 4915 | } |
| 4916 | }, |
| 4917 | "example": { |
| 4918 | "status": 200, |
| 4919 | "mg": "12345678-1234-1234-1234-123456789abc", |
| 4920 | "bearer_protection": true, |
| 4921 | "token": "34567890-3456-3456-3456-345678901234", |
| 4922 | "expiration": 1704110400 |
| 4923 | } |
| 4924 | } |
| 4925 | } |
| 4926 | }, |
| 4927 | "400": { |
| 4928 | "description": "Bad request due to one of the following:\n- claim_id doesn't match any claimed agent\n- machine_guid doesn't match the agent's machine GUID\n- node_id is missing, invalid, or doesn't match\n- Request is for a different agent than the one being called\n" |
| 4929 | } |
| 4930 | } |
| 4931 | } |
| 4932 | }, |
| 4933 | "/api/v3/me": { |
| 4934 | "get": { |
| 4935 | "operationId": "me3", |
| 4936 | "tags": [ |
| 4937 | "authentication" |
| 4938 | ], |
| 4939 | "summary": "Get current authenticated user information", |
| 4940 | "description": "**Current User Authentication Info**\n\nThis endpoint returns information about the currently authenticated user or session. It provides details about the authentication method, user role, access permissions, and associated cloud account if applicable.\n\n**Use Cases:**\n- **Authentication Verification:** Verify that authentication is working and check what method was used\n- **Permission Checking:** Determine what access levels the current session has\n- **Role Discovery:** Find out the user role (admin, manager, viewer, etc.) for authorization decisions\n- **Cloud Integration:** Get cloud account ID for linking with Netdata Cloud features\n- **Client Identification:** Retrieve client name for audit logging or display purposes\n- **Security Auditing:** Log authentication methods and access levels for security reviews\n\n**Authentication Methods:**\n- **cloud:** Authenticated via Netdata Cloud (most common for claimed agents)\n- **bearer:** Authenticated using bearer token (obtained via `/api/v3/bearer_get_token`)\n- **god:** God mode authentication (debug/development builds only)\n- **none:** No authentication (default for unclaimed agents without bearer protection)\n\n**User Roles:**\nRoles determine what operations a user can perform:\n- **admin:** Full administrative access (all operations allowed)\n- **manager:** Management access (most operations allowed, some restrictions)\n- **troubleshooter:** Diagnostic access (read metrics, execute diagnostic functions)\n- **observer:** Read-only access to metrics (no configuration changes)\n- **member:** Basic member access\n- **billing:** Billing-related access\n- **none:** No specific role assigned\n\n**Access Permissions:**\nAccess is a bitmask of allowed operations:\n- **registry:** Can access agent registry features\n- **dashboard:** Can view dashboards\n- **data:** Can query metrics data\n- **functions:** Can execute agent functions\n- **badges:** Can generate badges\n- **mgmt:** Can perform management operations\n- **stream:** Can receive streaming data\n- **SSL_FORCE:** SSL/TLS is required\n- **signed_id:** Has signed/verified identity\n- **sensitive_data:** Can access sensitive configuration data\n\n**Cloud Integration:**\n- **cloud_account_id:** UUID linking session to Netdata Cloud account\n- Present when authenticated via Netdata Cloud\n- Used for tracking and authorization in cloud features\n- Zero UUID (00000000-0000-0000-0000-000000000000) when not cloud-authenticated\n\n**Client Identification:**\n- **client_name:** Human-readable name identifying the client application\n- Examples: \"Netdata Cloud\", \"API Script\", \"Custom Dashboard\"\n- Useful for audit logs and debugging\n- May be empty for anonymous/local access\n\n**Important Notes:**\n- This endpoint always succeeds (returns HTTP 200) even without authentication\n- For unauthenticated requests, auth=\"none\" and minimal permissions returned\n- The response reflects the current session's authentication state\n- Access permissions are cumulative (multiple permissions can be granted)\n- God mode is only available in debug builds with NETDATA_GOD_MODE defined\n- Bearer tokens inherit role and access from the user/cloud account that requested them\n\n**Security Considerations:**\n- Use this endpoint to verify authentication before performing sensitive operations\n- Check both user_role and access permissions for proper authorization\n- Cloud account ID can be used for cross-referencing with cloud audit logs\n- Authentication method indicates security level (cloud/bearer > none)\n\n**Example Responses:**\n\n**Netdata Cloud User:**\n```json\n{\n \"auth\": \"cloud\",\n \"cloud_account_id\": \"12345678-1234-1234-1234-123456789abc\",\n \"client_name\": \"Netdata Cloud\",\n \"access\": [\"registry\", \"dashboard\", \"data\", \"functions\", \"badges\", \"mgmt\", \"stream\", \"signed_id\"],\n \"user_role\": \"admin\"\n}\n```\n\n**Bearer Token User:**\n```json\n{\n \"auth\": \"bearer\",\n \"cloud_account_id\": \"12345678-1234-1234-1234-123456789abc\",\n \"client_name\": \"API Client\",\n \"access\": [\"data\", \"functions\", \"signed_id\"],\n \"user_role\": \"observer\"\n}\n```\n\n**Unauthenticated Local Access:**\n```json\n{\n \"auth\": \"none\",\n \"cloud_account_id\": \"00000000-0000-0000-0000-000000000000\",\n \"client_name\": \"\",\n \"access\": [\"registry\", \"dashboard\", \"data\", \"badges\"],\n \"user_role\": \"none\"\n}\n```\n\n**Security & Access Control:**\n- 🔓 **Always Public API** - This endpoint is always accessible without authentication\n- **No Restrictions:** Not subject to bearer protection or IP-based ACL restrictions\n- **No Authentication:** Cannot be restricted by any configuration\n- **Access:** Available to anyone who can reach the agent's HTTP endpoint\n", |
| 4941 | "responses": { |
| 4942 | "200": { |
| 4943 | "description": "Current user information successfully retrieved.", |
| 4944 | "content": { |
| 4945 | "application/json": { |
| 4946 | "schema": { |
| 4947 | "type": "object", |
| 4948 | "properties": { |
| 4949 | "auth": { |
| 4950 | "type": "string", |
| 4951 | "enum": [ |
| 4952 | "cloud", |
| 4953 | "bearer", |
| 4954 | "god", |
| 4955 | "none" |
| 4956 | ], |
| 4957 | "description": "Authentication method used for the current session.\n- cloud: Authenticated via Netdata Cloud\n- bearer: Authenticated using bearer token\n- god: God mode (debug builds only)\n- none: No authentication\n" |
| 4958 | }, |
| 4959 | "cloud_account_id": { |
| 4960 | "type": "string", |
| 4961 | "format": "uuid", |
| 4962 | "description": "Cloud account UUID associated with this session.\nZero UUID (00000000-0000-0000-0000-000000000000) when not cloud-authenticated.\n" |
| 4963 | }, |
| 4964 | "client_name": { |
| 4965 | "type": "string", |
| 4966 | "description": "Human-readable name of the client application.\nMay be empty for anonymous/local access.\nExamples: \"Netdata Cloud\", \"API Script\", \"Custom Dashboard\"\n" |
| 4967 | }, |
| 4968 | "access": { |
| 4969 | "type": "array", |
| 4970 | "description": "Array of access permissions granted to this session.\nPermissions are cumulative (multiple can be granted).\n", |
| 4971 | "items": { |
| 4972 | "type": "string", |
| 4973 | "enum": [ |
| 4974 | "registry", |
| 4975 | "dashboard", |
| 4976 | "data", |
| 4977 | "functions", |
| 4978 | "badges", |
| 4979 | "mgmt", |
| 4980 | "stream", |
| 4981 | "SSL_FORCE", |
| 4982 | "signed_id", |
| 4983 | "sensitive_data" |
| 4984 | ] |
| 4985 | } |
| 4986 | }, |
| 4987 | "user_role": { |
| 4988 | "type": "string", |
| 4989 | "enum": [ |
| 4990 | "admin", |
| 4991 | "manager", |
| 4992 | "troubleshooter", |
| 4993 | "observer", |
| 4994 | "member", |
| 4995 | "billing", |
| 4996 | "none" |
| 4997 | ], |
| 4998 | "description": "User role determining what operations are allowed.\n- admin: Full administrative access\n- manager: Management access with some restrictions\n- troubleshooter: Diagnostic and troubleshooting access\n- observer: Read-only access to metrics\n- member: Basic member access\n- billing: Billing-related access\n- none: No specific role\n" |
| 4999 | } |
| 5000 | } |
Showing first 5,000 of 9,823 lines.
View raw