Service

Inspect a service

Changed on
get/services/{id}

Request

  • Base URL
    /v1.57 (relative, and the document was published on a file host, not at the API’s origin)
  • 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

    • breaking

      removed the media type application/json for the response with the status

    • info

      api tag Service added

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • breaking

      for the query request parameter insertDefaults, default value false was removed

    • breaking

      the /////// response property's minItems was decreased from 1 to 0 for the response status

    • breaking

      the response's property format changed from dateTime to date-time for status

    • breaking

      the / response's property format changed from dateTime to date-time for status

    • breaking

      the / response's property format changed from dateTime to date-time for status

    • breaking

      the / response's property format changed from dateTime to date-time for status

    • breaking

      the response's property format changed from dateTime to date-time for status

    • info

      api tag Service removed

    • info

      removed the non-success response with the status

    • info

      removed the non-success response with the status

    • info

      removed the non-success response with the status

    • info

      the response's property default value false was removed for the status

    • info

      the response's property default value 0 was removed for the status

    • info

      the response's property default value 1 was removed for the status

    • info

      the response's property default value 0 was removed for the status

    • info

      the response's property default value 0 was removed for the status

    • info

      the response's property default value 0 was removed for the status

    • info

      the response's property default value vip was removed for the status

    • info

      the response's property default value vip was removed for the status

    • info

      the response's property default value false was removed for the status

    • info

      the response's property default value false was removed for the status

    • info

      the response's property default value 0 was removed for the status

    • info

      the response's property default value ingress was removed for the status

    • info

      the response's property default value ingress was removed for the status

    • info

      the response's property default value ingress was removed for the status

    • info

      the response's property default value false was removed for the status

    • info

      the response's property default value false was removed for the status

    • info

      the response's property default value 0 was removed for the status