Update topic configuration Run in API Explorer

PATCH /v1/topics/{topic_name}/configurations

Update a subset of the topic configurations.

Path parameters

  • topic_name string Required

    Topic name

application/json

Body Required

  • name string

    A topic-level config key (e.g. segment.bytes).

  • operation string

    Values are CONFIG_ALTER_OPERATION_SET, CONFIG_ALTER_OPERATION_DELETE, CONFIG_ALTER_OPERATION_APPEND, or CONFIG_ALTER_OPERATION_SUBTRACT.

  • value string | null

    A topic-level config value (e.g. 1073741824).

Responses

  • 200 application/json

    OK

    Hide response attribute Show response attribute object
    • configurations array[object]

      Topic's complete set of configurations after applying this partial patch.

      Hide configurations attributes Show configurations attributes object
      • config_synonyms array[object]

        If no config value is set at the topic level, it will inherit the value set at the broker or cluster level. name is the corresponding config key whose value is inherited. source indicates whether the inherited config is default, broker, etc.

        Hide config_synonyms attributes Show config_synonyms attributes object
        • name string
        • source string

          Values are CONFIG_SOURCE_DYNAMIC_TOPIC_CONFIG, CONFIG_SOURCE_DYNAMIC_BROKER_CONFIG, CONFIG_SOURCE_DYNAMIC_DEFAULT_BROKER_CONFIG, CONFIG_SOURCE_STATIC_BROKER_CONFIG, CONFIG_SOURCE_DEFAULT_CONFIG, or CONFIG_SOURCE_DYNAMIC_BROKER_LOGGER_CONFIG.

        • value string | null
      • documentation string | null

        Config documentation.

      • name string

        A topic-level config key (e.g. segment.bytes).

      • read_only boolean

        Whether the config is read-only, or is dynamic and can be altered.

      • sensitive boolean

        Whether this is a sensitive config key and value.

      • source string

        Values are CONFIG_SOURCE_DYNAMIC_TOPIC_CONFIG, CONFIG_SOURCE_DYNAMIC_BROKER_CONFIG, CONFIG_SOURCE_DYNAMIC_DEFAULT_BROKER_CONFIG, CONFIG_SOURCE_STATIC_BROKER_CONFIG, CONFIG_SOURCE_DEFAULT_CONFIG, or CONFIG_SOURCE_DYNAMIC_BROKER_LOGGER_CONFIG.

      • type string

        Values are CONFIG_TYPE_BOOLEAN, CONFIG_TYPE_STRING, CONFIG_TYPE_INT, CONFIG_TYPE_SHORT, CONFIG_TYPE_LONG, CONFIG_TYPE_DOUBLE, CONFIG_TYPE_LIST, CONFIG_TYPE_CLASS, or CONFIG_TYPE_PASSWORD.

      • value string | null

        A topic-level config value (e.g. 1073741824).

  • 401 application/json

    Unauthenticated.

    Hide response attributes Show response attributes object
    • code string(int32)

      RPC status code, as described here.

      Values are OK, CANCELLED, UNKNOWN, INVALID_ARGUMENT, DEADLINE_EXCEEDED, NOT_FOUND, ALREADY_EXISTS, PERMISSION_DENIED, UNAUTHENTICATED, RESOURCE_EXHAUSTED, FAILED_PRECONDITION, ABORTED, OUT_OF_RANGE, UNIMPLEMENTED, INTERNAL, UNAVAILABLE, or DATA_LOSS.

    • details array[object]

      A list of messages that carries the error details.

      Details of the error.

      Details of the error.

      One of:
    • message string

      Detailed error message. No compatibility guarantees are given for the text contained in this message.

  • 404 application/json

    Not Found

    Hide response attributes Show response attributes object
    • code string(int32)

      RPC status code, as described here.

      Values are OK, CANCELLED, UNKNOWN, INVALID_ARGUMENT, DEADLINE_EXCEEDED, NOT_FOUND, ALREADY_EXISTS, PERMISSION_DENIED, UNAUTHENTICATED, RESOURCE_EXHAUSTED, FAILED_PRECONDITION, ABORTED, OUT_OF_RANGE, UNIMPLEMENTED, INTERNAL, UNAVAILABLE, or DATA_LOSS.

    • details array[object]

      A list of messages that carries the error details.

      Details of the error.

      Details of the error.

      One of:
    • message string

      Detailed error message. No compatibility guarantees are given for the text contained in this message.

  • 500 application/json

    Internal Server Error. Reach out to support.

    Hide response attributes Show response attributes object
    • code string(int32)

      RPC status code, as described here.

      Values are OK, CANCELLED, UNKNOWN, INVALID_ARGUMENT, DEADLINE_EXCEEDED, NOT_FOUND, ALREADY_EXISTS, PERMISSION_DENIED, UNAUTHENTICATED, RESOURCE_EXHAUSTED, FAILED_PRECONDITION, ABORTED, OUT_OF_RANGE, UNIMPLEMENTED, INTERNAL, UNAVAILABLE, or DATA_LOSS.

    • details array[object]

      A list of messages that carries the error details.

      Details of the error.

      Details of the error.

      One of:
    • message string

      Detailed error message. No compatibility guarantees are given for the text contained in this message.

  • default application/json

    An unexpected error response.

    Hide response attributes Show response attributes object
    • code string(int32)

      RPC status code, as described here.

      Values are OK, CANCELLED, UNKNOWN, INVALID_ARGUMENT, DEADLINE_EXCEEDED, NOT_FOUND, ALREADY_EXISTS, PERMISSION_DENIED, UNAUTHENTICATED, RESOURCE_EXHAUSTED, FAILED_PRECONDITION, ABORTED, OUT_OF_RANGE, UNIMPLEMENTED, INTERNAL, UNAVAILABLE, or DATA_LOSS.

    • details array[object]

      A list of messages that carries the error details.

      Details of the error.

      Details of the error.

      One of:
    • message string

      Detailed error message. No compatibility guarantees are given for the text contained in this message.

PATCH /v1/topics/{topic_name}/configurations
curl \
 --request PATCH 'https://{dataplane_api_subdomain}.cloud.redpanda.com/v1/topics/{topic_name}/configurations' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '[{"name":"string","operation":"CONFIG_ALTER_OPERATION_SET","value":"string"}]'
Request examples
[
  {
    "name": "string",
    "operation": "CONFIG_ALTER_OPERATION_SET",
    "value": "string"
  }
]
Response examples (200)
{
  "configurations": [
    {
      "config_synonyms": [
        {
          "name": "string",
          "source": "CONFIG_SOURCE_DYNAMIC_TOPIC_CONFIG",
          "value": "string"
        }
      ],
      "documentation": "string",
      "name": "string",
      "read_only": true,
      "sensitive": true,
      "source": "CONFIG_SOURCE_DYNAMIC_TOPIC_CONFIG",
      "type": "CONFIG_TYPE_BOOLEAN",
      "value": "string"
    }
  ]
}
Response examples (401)
{
  "code": "OK",
  "details": [
    {
      "@type": "type.googleapis.com/google.rpc.BadRequest",
      "field_violations": [
        {
          "description": "string",
          "field": "string"
        }
      ]
    }
  ],
  "message": "string"
}
Response examples (404)
{
  "code": "OK",
  "details": [
    {
      "@type": "type.googleapis.com/google.rpc.BadRequest",
      "field_violations": [
        {
          "description": "string",
          "field": "string"
        }
      ]
    }
  ],
  "message": "string"
}
Response examples (500)
{
  "code": "OK",
  "details": [
    {
      "@type": "type.googleapis.com/google.rpc.BadRequest",
      "field_violations": [
        {
          "description": "string",
          "field": "string"
        }
      ]
    }
  ],
  "message": "string"
}
Response examples (default)
{
  "code": "OK",
  "details": [
    {
      "@type": "type.googleapis.com/google.rpc.BadRequest",
      "field_violations": [
        {
          "description": "string",
          "field": "string"
        }
      ]
    }
  ],
  "message": "string"
}