Update a service
Changed onRequest
- Base URL/v1.57 (relative, and the document was published on a file host, not at the API’s origin)
- Authnone declared
Path parameters
ID or name of service.
Query parameters
The version number of the service object being updated. This is required to avoid conflicting writes. This version number should be the value as currently set on the service before the update. You can find the current version by calling GET /services/{id}
If the X-Registry-Auth header is not specified, this parameter indicates where to find registry authorization credentials.
Set to this parameter to previous to cause a server-side rollback to the previous service spec. The supplied spec will be ignored in this case.
Headers
A base64url-encoded auth configuration for pulling from private registries.
Refer to the authentication section for details.
Request body
Example request
{
"Name": "top",
"TaskTemplate": {
"ContainerSpec": {
"Image": "busybox",
"Args": [
"top"
],
"OomScoreAdj": 0
},
"Resources": {
"Limits": {},
"Reservations": {}
},
"RestartPolicy": {
"Condition": "any",
"MaxAttempts": 0
},
"Placement": {},
"ForceUpdate": 0
},
"Mode": {
"Replicated": {
"Replicas": 1
}
},
"UpdateConfig": {
"Parallelism": 2,
"Delay": 1000000000,
"FailureAction": "pause",
"Monitor": 15000000000,
"MaxFailureRatio": 0.15
},
"RollbackConfig": {
"Parallelism": 1,
"Delay": 1000000000,
"FailureAction": "pause",
"Monitor": 15000000000,
"MaxFailureRatio": 0.15
},
"EndpointSpec": {
"Mode": "vip"
}
}Response
no error
Example response
{
"Warnings": [
"unable to pin image doesnotexist:latest to digest: image library/doesnotexist:latest not found"
]
}Changes
- breaking
removed the request body
- breaking
removed the media type
application/jsonfor the response with the status - info
api tag
Serviceadded - 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
- info
added the non-success response with the status
- breaking
- breaking
the request's body type changed from no type to
object - breaking
for the
queryrequest parameterregistryAuthFrom, default valuespecwas removed - breaking
for the
queryrequest parameterversion, the format changed from no format toint32 - warning
removed
subschema #2from the request bodyallOflist - info
api tag
Serviceremoved - info
added the new optional request property
- info
added the new optional request property
- info
added the new optional request property
- info
added the new optional request property
- info
added the new optional request property
- info
added the new optional request property
- info
added the new optional request property
- info
added the new optional request property
- 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
removed the non-success response with the status
- breaking