v1

latestOpenAPI 3.0.02026-07-1410578280.2 KB
Service

List services

get/services

Query parameters

filtersstring

A JSON encoded value of the filters (a map[string][]string) to process on the services list. Available filters:

  • id=<service id>
  • label=<service label>
  • mode=["replicated"|"global"]
  • name=<service name>

Response

no error

CreatedAtstring dateTime
IDstring
UpdatedAtstring dateTime

Example response

[
  {
    "CreatedAt": "2016-06-07T21:05:51.880065305Z",
    "Endpoint": {
      "Ports": [
        {
          "Protocol": "tcp",
          "PublishedPort": 30001,
          "TargetPort": 6379
        }
      ],
      "Spec": {
        "Mode": "vip",
        "Ports": [
          {
            "Protocol": "tcp",
            "PublishedPort": 30001,
            "TargetPort": 6379
          }
        ]
      },
      "VirtualIPs": [
        {
          "Addr": "10.255.0.2/16",
          "NetworkID": "4qvuz4ko70xaltuqbt8956gd1"
        },
        {
          "Addr": "10.255.0.3/16",
          "NetworkID": "4qvuz4ko70xaltuqbt8956gd1"
        }
      ]
    },
    "ID": "9mnpnzenvg8p8tdbtq4wvbkcz",
    "Spec": {
      "EndpointSpec": {
        "Mode": "vip",
        "Ports": [
          {
            "Protocol": "tcp",
            "PublishedPort": 30001,
            "TargetPort": 6379
          }
        ]
      },
      "Mode": {
        "Replicated": {
          "Replicas": 1
        }
      },
      "Name": "hopeful_cori",
      "RollbackConfig": {
        "Delay": 1000000000,
        "FailureAction": "pause",
        "MaxFailureRatio": 0.15,
        "Monitor": 15000000000,
        "Parallelism": 1
      },
      "TaskTemplate": {
        "ContainerSpec": {
          "Image": "redis"
        },
        "ForceUpdate": 0,
        "Placement": {},
        "Resources": {
          "Limits": {},
          "Reservations": {}
        },
        "RestartPolicy": {
          "Condition": "any",
          "MaxAttempts": 0
        }
      },
      "UpdateConfig": {
        "Delay": 1000000000,
        "FailureAction": "pause",
        "MaxFailureRatio": 0.15,
        "Monitor": 15000000000,
        "Parallelism": 1
      }
    },
    "UpdatedAt": "2016-06-07T21:07:29.962229872Z",
    "Version": {
      "Index": 19
    }
  }
]