Service

Inspect a service

get/services/{id}

Request

  • Base URL
    /v1.49 (relative, and the document was published on a file host, not at the API’s origin)
  • URL
    /v1.49/services/{id}
  • Auth
    none declared

Path parameters

idstring required

ID or name of service.

Query parameters

insertDefaultsboolean

Fill empty fields with default values.

Response

no error

IDstring
CreatedAtstring dateTime
UpdatedAtstring dateTime

Example response

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

Changes

No recorded changes to this operation across all 4 revisions of this API.