v1

latestSwagger 2.02026-07-17107114423.2 KB
Node

List nodes

get/nodes

Query parameters

filtersstring

Filters to process on the nodes list, encoded as JSON (a map[string][]string).

Available filters:

  • id=<node id>
  • label=<engine label>
  • membership=(accepted|pending)`
  • name=<node name>
  • node.label=<node label>
  • role=(manager|worker)`

Response

no error

IDstring
CreatedAtstring dateTime

Date and time at which the node was added to the swarm in RFC 3339 format with nano-seconds.

UpdatedAtstring dateTime

Date and time at which the node was last updated in RFC 3339 format with nano-seconds.

Example response

[
  {
    "ID": "24ifsmvkjbyhk",
    "Version": {
      "Index": 373531
    },
    "CreatedAt": "2016-08-18T10:44:24.496525531Z",
    "UpdatedAt": "2017-08-09T07:09:37.632105588Z",
    "Spec": {
      "Availability": "active",
      "Name": "node-name",
      "Role": "manager",
      "Labels": {
        "foo": "bar"
      }
    },
    "Description": {
      "Hostname": "bf3067039e47",
      "Platform": {
        "Architecture": "x86_64",
        "OS": "linux"
      },
      "Resources": {
        "NanoCPUs": 4000000000,
        "MemoryBytes": 8272408576,
        "GenericResources": [
          {
            "DiscreteResourceSpec": {
              "Kind": "SSD",
              "Value": 3
            }
          },
          {
            "NamedResourceSpec": {
              "Kind": "GPU",
              "Value": "UUID1"
            }
          },
          {
            "NamedResourceSpec": {
              "Kind": "GPU",
              "Value": "UUID2"
            }
          }
        ]
      },
      "Engine": {
        "EngineVersion": "17.06.0",
        "Labels": {
          "foo": "bar"
        },
        "Plugins": [
          {
            "Type": "Log",
            "Name": "awslogs"
          },
          {
            "Type": "Log",
            "Name": "fluentd"
          },
          {
            "Type": "Log",
            "Name": "gcplogs"
          },
          {
            "Type": "Log",
            "Name": "gelf"
          },
          {
            "Type": "Log",
            "Name": "journald"
          },
          {
            "Type": "Log",
            "Name": "json-file"
          },
          {
            "Type": "Log",
            "Name": "splunk"
          },
          {
            "Type": "Log",
            "Name": "syslog"
          },
          {
            "Type": "Network",
            "Name": "bridge"
          },
          {
            "Type": "Network",
            "Name": "host"
          },
          {
            "Type": "Network",
            "Name": "ipvlan"
          },
          {
            "Type": "Network",
            "Name": "macvlan"
          },
          {
            "Type": "Network",
            "Name": "null"
          },
          {
            "Type": "Network",
            "Name": "overlay"
          },
          {
            "Type": "Volume",
            "Name": "local"
          },
          {
            "Type": "Volume",
            "Name": "localhost:5000/vieux/sshfs:latest"
          },
          {
            "Type": "Volume",
            "Name": "vieux/sshfs:latest"
          }
        ]
      },
      "TLSInfo": {
        "TrustRoot": "-----BEGIN CERTIFICATE-----\nMIIBajCCARCgAwIBAgIUbYqrLSOSQHoxD8CwG6Bi2PJi9c8wCgYIKoZIzj0EAwIw\nEzERMA8GA1UEAxMIc3dhcm0tY2EwHhcNMTcwNDI0MjE0MzAwWhcNMzcwNDE5MjE0\nMzAwWjATMREwDwYDVQQDEwhzd2FybS1jYTBZMBMGByqGSM49AgEGCCqGSM49AwEH\nA0IABJk/VyMPYdaqDXJb/VXh5n/1Yuv7iNrxV3Qb3l06XD46seovcDWs3IZNV1lf\n3Skyr0ofcchipoiHkXBODojJydSjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMB\nAf8EBTADAQH/MB0GA1UdDgQWBBRUXxuRcnFjDfR/RIAUQab8ZV/n4jAKBggqhkjO\nPQQDAgNIADBFAiAy+JTe6Uc3KyLCMiqGl2GyWGQqQDEcO3/YG36x7om65AIhAJvz\npxv6zFeVEkAEEkqIYi0omA9+CjanB/6Bz4n1uw8H\n-----END CERTIFICATE-----\n",
        "CertIssuerSubject": "MBMxETAPBgNVBAMTCHN3YXJtLWNh",
        "CertIssuerPublicKey": "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEmT9XIw9h1qoNclv9VeHmf/Vi6/uI2vFXdBveXTpcPjqx6i9wNazchk1XWV/dKTKvSh9xyGKmiIeRcE4OiMnJ1A=="
      }
    },
    "Status": {
      "State": "ready",
      "Addr": "172.17.0.2"
    },
    "ManagerStatus": {
      "Leader": true,
      "Reachability": "reachable",
      "Addr": "10.0.0.46:2377"
    }
  }
]