For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /developers/api/supervisor/examples.md.

示例

如何与 supervisor API 对接的示例。

使用 cURL 获取网络信息

curl -sSL -H "Authorization: Bearer $SUPERVISOR_TOKEN" http://supervisor/network/info

response:

{
  "result": "ok",
  "data": {
    "interfaces": {
      "eth0": {
        "ip_address": "192.168.1.100/24",
        "gateway": "192.168.1.1",
        "id": "Wired connection 1",
        "type": "802-3-ethernet",
        "nameservers": ["192.168.1.1"],
        "method": "static",
        "primary": true
      }
    }
  }
}

向 supervisor 发送 Ping

curl -sSL http://supervisor/supervisor/ping

response:

{
  "result": "ok",
  "data": {}
}