|
| 1 | +--- |
| 2 | +layout: docs-api |
| 3 | +toc: toc-api-admin.html |
| 4 | +title: GET /diagnostics |
| 5 | +slug: |
| 6 | + - url: "/docs/api/admin" |
| 7 | + label: "admin" |
| 8 | + - url: "/docs/api/admin/methods" |
| 9 | + label: "methods" |
| 10 | + - get diagnostics |
| 11 | +--- |
| 12 | + |
| 13 | +Get the runtime diagnostics. Note that runtime diagnostics are available only if |
| 14 | +`diagnostics` value is set to `enabled: true` in the `settings.js` file. |
| 15 | + |
| 16 | + |
| 17 | +Requires permission: <code>settings.read</code> |
| 18 | + |
| 19 | +### Headers |
| 20 | + |
| 21 | +Header | Value |
| 22 | +-------|------- |
| 23 | +`Authorization` | `Bearer [token]` - if authentication is enabled |
| 24 | + |
| 25 | +### Response |
| 26 | + |
| 27 | +Status Code | Reason | Response |
| 28 | +------------|----------------|-------------- |
| 29 | +`200` | Success | See example response body |
| 30 | +`401` | Not authorized | _none_ |
| 31 | + |
| 32 | +{% highlight json %} |
| 33 | +{ |
| 34 | + "report": "diagnostics", |
| 35 | + "scope": "basic", |
| 36 | + "time": { |
| 37 | + "utc": "Mon, 23 Jan 2023 20:15:08 GMT", |
| 38 | + "local": "1/23/2023, 8:15:08 PM" |
| 39 | + }, |
| 40 | + "intl": { |
| 41 | + "locale": "en-US", |
| 42 | + "timeZone": "UTC" |
| 43 | + }, |
| 44 | + "nodejs": { |
| 45 | + "version": "v16.16.0", |
| 46 | + "arch": "x64", |
| 47 | + "platform": "linux", |
| 48 | + "memoryUsage": { |
| 49 | + "rss": 106336256, |
| 50 | + "heapTotal": 36225024, |
| 51 | + "heapUsed": 33527912, |
| 52 | + "external": 1905248, |
| 53 | + "arrayBuffers": 145556 |
| 54 | + } |
| 55 | + }, |
| 56 | + "os": { |
| 57 | + "containerised": true, |
| 58 | + "wsl": false, |
| 59 | + "totalmem": 32841064448, |
| 60 | + "freemem": 28394344448, |
| 61 | + "arch": "x64", |
| 62 | + "loadavg": [ |
| 63 | + 1, |
| 64 | + 1.01, |
| 65 | + 0.89 |
| 66 | + ], |
| 67 | + "platform": "linux", |
| 68 | + "release": "5.15.85-1-MANJARO", |
| 69 | + "type": "Linux", |
| 70 | + "uptime": 5554.97, |
| 71 | + "version": "#1 SMP PREEMPT Wed Dec 21 21:15:06 UTC 2022" |
| 72 | + }, |
| 73 | + "runtime": { |
| 74 | + "version": "3.0.2", |
| 75 | + "isStarted": true, |
| 76 | + "flows": { |
| 77 | + "state": "start", |
| 78 | + "started": true |
| 79 | + }, |
| 80 | + "modules": { |
| 81 | + "node-red": "3.0.2" |
| 82 | + }, |
| 83 | + "settings": { |
| 84 | + "available": true, |
| 85 | + "apiMaxLength": "UNSET", |
| 86 | + "disableEditor": false, |
| 87 | + "contextStorage": {}, |
| 88 | + "debugMaxLength": 1000, |
| 89 | + "editorTheme": { |
| 90 | + "palette": {}, |
| 91 | + "projects": { |
| 92 | + "enabled": false, |
| 93 | + "workflow": { |
| 94 | + "mode": "manual" |
| 95 | + } |
| 96 | + }, |
| 97 | + "codeEditor": { |
| 98 | + "lib": "ace", |
| 99 | + "options": { |
| 100 | + "theme": "vs" |
| 101 | + } |
| 102 | + } |
| 103 | + }, |
| 104 | + "flowFile": "flows.json", |
| 105 | + "mqttReconnectTime": 15000, |
| 106 | + "serialReconnectTime": 15000, |
| 107 | + "socketReconnectTime": "UNSET", |
| 108 | + "socketTimeout": "UNSET", |
| 109 | + "tcpMsgQueueSize": "UNSET", |
| 110 | + "inboundWebSocketTimeout": "UNSET", |
| 111 | + "runtimeState": { |
| 112 | + "enabled": false, |
| 113 | + "ui": false |
| 114 | + }, |
| 115 | + "adminAuth": "SET", |
| 116 | + "httpAdminRoot": "/", |
| 117 | + "httpAdminCors": "UNSET", |
| 118 | + "httpNodeAuth": "UNSET", |
| 119 | + "httpNodeRoot": "/", |
| 120 | + "httpNodeCors": "UNSET", |
| 121 | + "httpStatic": "UNSET", |
| 122 | + "httpStaticRoot": "UNSET", |
| 123 | + "httpStaticCors": "UNSET", |
| 124 | + "uiHost": "SET", |
| 125 | + "uiPort": "SET", |
| 126 | + "userDir": "SET", |
| 127 | + "nodesDir": "UNSET" |
| 128 | + } |
| 129 | + } |
| 130 | +} |
| 131 | +{% endhighlight %} |
| 132 | + |
| 133 | +The response object contains the following fields: |
| 134 | + |
| 135 | +Field | Description |
| 136 | +---------------|------------ |
| 137 | +`intl` | The internationalization (i8n) language for the node-red instance |
| 138 | +`nodejs` | NodeJS version for underlying architecture / platform |
| 139 | +`os` | Operating System information and statistics for current memory usage |
| 140 | +`runtime` | Current Node-RED runtime information |
| 141 | +`modules` | Node-RED modules and their respective versions |
| 142 | +`settings` | Detailed description for the current settings of the node-RED instance |
| 143 | + |
0 commit comments