Update a Config Run in API Explorer

POST /configs/{id}/update

Path parameters

  • id string Required

    The ID or name of the config

Query parameters

  • version integer(int64) Required

    The version number of the config object being updated. This is required to avoid conflicting writes.

application/json

Body

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.

  • Name string

    User-defined name of the config.

  • Labels object

    User-defined key/value metadata.

    Hide Labels attribute Show Labels attribute object
    • * string Additional properties
  • Data string

    Data is the data to store as a config, formatted as a Base64-url-safe-encoded (RFC 4648) string. The maximum allowed size is 1000KB, as defined in MaxConfigSize.

  • Templating object

    Name of the secrets driver used to fetch the secret's value from an external secret store.

    Hide Templating attributes Show Templating attributes object
    • Name string Required

      Name of the driver.

    • Options object

      Key/value map of driver-specific options.

      Hide Options attribute Show Options attribute object
      • * string Additional properties

Responses

  • 200

    no error

  • 400 application/json

    bad parameter

    Hide response attribute Show response attribute object
    • message string Required

      The error message.

  • 404 application/json

    no such config

    Hide response attribute Show response attribute object
    • message string Required

      The error message.

  • 500 application/json

    server error

    Hide response attribute Show response attribute object
    • message string Required

      The error message.

  • 503 application/json

    node is not part of a swarm

    Hide response attribute Show response attribute object
    • message string Required

      The error message.

POST /configs/{id}/update
curl \
 --request POST 'http://api.example.com/v1.49/configs/{id}/update?version=42' \
 --header "Content-Type: application/json" \
 --data '{"Name":"string","Labels":{"additionalProperty1":"string","additionalProperty2":"string"},"Data":"string","Templating":{"Name":"some-driver","Options":{"OptionA":"value for driver-specific option A","OptionB":"value for driver-specific option B"}}}'
Request examples
{
  "Name": "string",
  "Labels": {
    "additionalProperty1": "string",
    "additionalProperty2": "string"
  },
  "Data": "string",
  "Templating": {
    "Name": "some-driver",
    "Options": {
      "OptionA": "value for driver-specific option A",
      "OptionB": "value for driver-specific option B"
    }
  }
}
Response examples (400)
{
  "message": "Something went wrong."
}
Response examples (400)
{
  "message": "Something went wrong."
}
Response examples (404)
{
  "message": "Something went wrong."
}
Response examples (404)
{
  "message": "Something went wrong."
}
Response examples (500)
{
  "message": "Something went wrong."
}
Response examples (500)
{
  "message": "Something went wrong."
}
Response examples (503)
{
  "message": "Something went wrong."
}
Response examples (503)
{
  "message": "Something went wrong."
}