Inspect a config Run in API Explorer

GET /configs/{id}

Path parameters

  • id string Required

    ID of the config

Responses

  • 200 application/json

    no error

    Hide response attributes Show response attributes object
    • ID string
    • Version object

      The version number of the object such as node, service, etc. This is needed to avoid conflicting writes. The client must send the version number along with the modified specification when updating these objects.

      This approach ensures safe concurrency and determinism in that the change on the object may not be applied if the version number has changed from the last read. In other words, if two update requests specify the same base version, only one of the requests can succeed. As a result, two separate update requests that happen at the same time will not unintentionally overwrite each other.

      Hide Version attribute Show Version attribute object
      • Index integer(uint64)
    • CreatedAt string(dateTime)
    • UpdatedAt string(dateTime)
    • Spec object
      Hide Spec attributes Show Spec attributes object
      • 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
  • 404 application/json

    config not found

    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.

GET /configs/{id}
curl \
 --request GET 'http://api.example.com/v1.49/configs/{id}'
Response examples (200)
{
  "ID": "ktnbjxoalbkvbvedmg1urrz8h",
  "Spec": {
    "Name": "app-dev.crt"
  },
  "Version": {
    "Index": 11
  },
  "CreatedAt": "2016-11-05T01:20:17.327670065Z",
  "UpdatedAt": "2016-11-05T01:20:17.327670065Z"
}
Response examples (200)
{
  "ID": "string",
  "Version": {
    "Index": 373531
  },
  "CreatedAt": "string",
  "UpdatedAt": "string",
  "Spec": {
    "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 (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."
}