POST
/configs/{id}/update Connection and access
API connection and authentication guidance
/v1.57
No HTTP authentication requirement is declared for this operation. Transport access controls can still apply.
Parameters
id
path
Required
The ID or name of the config
Type:
string
All schema constraints and annotations
{
"type": "string"
}version
query
Required
The version number of the config object being updated. This is
required to avoid conflicting writes.
Type:
integer
All schema constraints and annotations
{
"format": "int64",
"type": "integer"
}Request and responses
Request
The spec of the config to update. Currently, only the Labels field
can be updated. All other fields must remain unchanged from the
ConfigInspect endpoint response values.
application/json
Schema:
ConfigSpec
Request
The spec of the config to update. Currently, only the Labels field
can be updated. All other fields must remain unchanged from the
ConfigInspect endpoint response values.
text/plain
Schema:
ConfigSpec
Response
200
no error
application/json
Response
200
no error
text/plain
Response
400
bad parameter
application/json
Schema:
ErrorResponse
Schema example
{
"message": "Something went wrong."
}Response
404
no such config
application/json
Schema:
ErrorResponse
Schema example
{
"message": "Something went wrong."
}Response
500
server error
application/json
Schema:
ErrorResponse
Schema example
{
"message": "Something went wrong."
}Response
503
node is not part of a swarm
application/json
Schema:
ErrorResponse
Schema example
{
"message": "Something went wrong."
}Referenced schemas
#/components/schemas/ConfigSpec
#/components/schemas/ErrorResponse
Complete operation contract
{
"operationId": "ConfigUpdate",
"parameters": [
{
"description": "The ID or name of the config",
"in": "path",
"name": "id",
"required": true,
"schema": {
"type": "string"
}
},
{
"description": "The version number of the config object being updated. This is\nrequired to avoid conflicting writes.\n",
"in": "query",
"name": "version",
"required": true,
"schema": {
"format": "int64",
"type": "integer"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ConfigSpec"
}
},
"text/plain": {
"schema": {
"$ref": "#/components/schemas/ConfigSpec"
}
}
},
"description": "The spec of the config to update. Currently, only the Labels field\ncan be updated. All other fields must remain unchanged from the\n[ConfigInspect endpoint](#operation/ConfigInspect) response values.\n",
"x-codegen-request-body-name": "body"
},
"responses": {
"200": {
"content": {
"application/json": {},
"text/plain": {}
},
"description": "no error"
},
"400": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
},
"description": "bad parameter"
},
"404": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
},
"description": "no such config"
},
"500": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
},
"description": "server error"
},
"503": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
},
"description": "node is not part of a swarm"
}
},
"summary": "Update a Config",
"tags": [
"Config"
]
}