获取运行时诊断信息。请注意,只有在 settings.js 文件中将 diagnostics 值设置为 enabled: true 时,运行时诊断信息才可用。
需要权限:settings.read
| 头部 | 值 | 
|---|---|
Authorization | 
      Bearer [token] - 如果启用了身份验证 | 
    
| 状态码 | 原因 | 响应 | 
|---|---|---|
200 | 
      成功 | 参见示例响应体 | 
401 | 
      未授权 | 无 | 
{
  "report": "diagnostics",
  "scope": "basic",
  "time": {
    "utc": "Mon, 23 Jan 2023 20:15:08 GMT",
    "local": "1/23/2023, 8:15:08 PM"
  },
  "intl": {
    "locale": "en-US",
    "timeZone": "UTC"
  },
  "nodejs": {
    "version": "v16.16.0",
    "arch": "x64",
    "platform": "linux",
    "memoryUsage": {
      "rss": 106336256,
      "heapTotal": 36225024,
      "heapUsed": 33527912,
      "external": 1905248,
      "arrayBuffers": 145556
    }
  },
  "os": {
    "containerised": true,
    "wsl": false,
    "totalmem": 32841064448,
    "freemem": 28394344448,
    "arch": "x64",
    "loadavg": [
      1,
      1.01,
      0.89
    ],
    "platform": "linux",
    "release": "5.15.85-1-MANJARO",
    "type": "Linux",
    "uptime": 5554.97,
    "version": "#1 SMP PREEMPT Wed Dec 21 21:15:06 UTC 2022"
  },
  "runtime": {
    "version": "3.0.2",
    "isStarted": true,
    "flows": {
      "state": "start",
      "started": true
    },
    "modules": {
      "node-red": "3.0.2"
    },
    "settings": {
      "available": true,
      "apiMaxLength": "UNSET",
      "disableEditor": false,
      "contextStorage": {},
      "debugMaxLength": 1000,
      "editorTheme": {
        "palette": {},
        "projects": {
          "enabled": false,
          "workflow": {
            "mode": "manual"
          }
        },
        "codeEditor": {
          "lib": "ace",
          "options": {
            "theme": "vs"
          }
        }
      },
      "flowFile": "flows.json",
      "mqttReconnectTime": 15000,
      "serialReconnectTime": 15000,
      "socketReconnectTime": "UNSET",
      "socketTimeout": "UNSET",
      "tcpMsgQueueSize": "UNSET",
      "inboundWebSocketTimeout": "UNSET",
      "runtimeState": {
        "enabled": false,
        "ui": false
      },
      "adminAuth": "SET",
      "httpAdminRoot": "/",
      "httpAdminCors": "UNSET",
      "httpNodeAuth": "UNSET",
      "httpNodeRoot": "/",
      "httpNodeCors": "UNSET",
      "httpStatic": "UNSET",
      "httpStaticRoot": "UNSET",
      "httpStaticCors": "UNSET",
      "uiHost": "SET",
      "uiPort": "SET",
      "userDir": "SET",
      "nodesDir": "UNSET"
    }
  }
}响应对象包含以下字段:
| 字段 | 描述 | 
|---|---|
intl | 
      Node-RED 实例的国际化 (i8n) 语言 | 
nodejs | 
      基础架构 / 平台的 NodeJS 版本 | 
os | 
      当前内存使用的信息和操作系统统计 | 
runtime | 
      当前 Node-RED 运行时信息 | 
modules | 
      Node-RED 模块及其各自版本 | 
settings | 
      当前 Node-RED 实例设置的详细描述 | 
版权所有 OpenJS Foundation 和 Node-RED 贡献者。保留所有权利。OpenJS Foundation 拥有并使用注册商标。有关 OpenJS Foundation 的商标列表,请参阅我们的 商标政策 和 商标列表。未在 OpenJS Foundation 商标列表 中列出的商标和徽标是其各自持有者的商标™或注册商标®。使用它们并不意味着与它们有任何关联或认可。
OpenJS Foundation | 使用条款 | 隐私政策 | OpenJS Foundation 章程 | 商标政策 | 商标列表 | Cookie 政策