Set multiple quotas Run in API Explorer

POST /v1/quotas:batchSet

Create or update client throughput quotas for multiple entities in a single request.

application/json

Body Required

  • settings array[object]

    A list of quota settings to apply. Each setting pairs an entity with the specific values to be set for it.

    Hide settings attributes Show settings attributes object
    • entity object
      Hide entity attributes Show entity attributes object
      • entity_name string

        Entity name is the name of the entity type specified. If left empty, the entity will be treated as a default entity (e.g., all clients). If entity_type is ENTITY_TYPE_CLIENT_ID_PREFIX, this field must be set.

      • entity_type string

        The type of entity that the quota applies to.

        • ENTITY_TYPE_USER: Not supported in Redpanda
        • ENTITY_TYPE_IP: Not supported in Redpanda

        Values are ENTITY_TYPE_CLIENT_ID, ENTITY_TYPE_CLIENT_ID_PREFIX, ENTITY_TYPE_USER, or ENTITY_TYPE_IP.

    • values array[object]
      Hide values attributes Show values attributes object
      • value number(double)
      • value_type string

        The type of value that the quota represents.

        • VALUE_TYPE_PRODUCER_BYTE_RATE: The rate at which producers can send data.
        • VALUE_TYPE_CONSUMER_BYTE_RATE: The rate at which consumers can fetch data.
        • VALUE_TYPE_CONTROLLER_MUTATION_RATE: The rate at which topic mutation requests can be made.
        • VALUE_TYPE_REQUEST_PERCENTAGE: The percentage of the total throughput that can be used by the entity.

        Not supported in Redpanda

        Values are VALUE_TYPE_PRODUCER_BYTE_RATE, VALUE_TYPE_CONSUMER_BYTE_RATE, VALUE_TYPE_CONTROLLER_MUTATION_RATE, or VALUE_TYPE_REQUEST_PERCENTAGE.

Responses

  • 201 application/json

    Quotas Set

    Hide response attributes Show response attributes object
    • failed_entities array[object]
      Hide failed_entities attributes Show failed_entities attributes object
      • entity_name string
      • entity_type string

        The type of entity that the quota applies to.

        • ENTITY_TYPE_USER: Not supported in Redpanda
        • ENTITY_TYPE_IP: Not supported in Redpanda

        Values are ENTITY_TYPE_CLIENT_ID, ENTITY_TYPE_CLIENT_ID_PREFIX, ENTITY_TYPE_USER, or ENTITY_TYPE_IP.

      • error_code integer(int32)
      • error_message string
    • successful_entities array[object]
      Hide successful_entities attributes Show successful_entities attributes object
      • entity_name string
      • entity_type string

        The type of entity that the quota applies to.

        • ENTITY_TYPE_USER: Not supported in Redpanda
        • ENTITY_TYPE_IP: Not supported in Redpanda

        Values are ENTITY_TYPE_CLIENT_ID, ENTITY_TYPE_CLIENT_ID_PREFIX, ENTITY_TYPE_USER, or ENTITY_TYPE_IP.

  • 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.

  • 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.

POST /v1/quotas:batchSet
curl \
 --request POST 'https://{dataplane_api_subdomain}.cloud.redpanda.com/v1/quotas:batchSet' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"settings":[{"entity":{"entity_name":"string","entity_type":"ENTITY_TYPE_CLIENT_ID"},"values":[{"value":42.0,"value_type":"VALUE_TYPE_PRODUCER_BYTE_RATE"}]}]}'
Request examples
{
  "settings": [
    {
      "entity": {
        "entity_name": "string",
        "entity_type": "ENTITY_TYPE_CLIENT_ID"
      },
      "values": [
        {
          "value": 42.0,
          "value_type": "VALUE_TYPE_PRODUCER_BYTE_RATE"
        }
      ]
    }
  ]
}
Response examples (201)
{
  "failed_entities": [
    {
      "entity_name": "string",
      "entity_type": "ENTITY_TYPE_CLIENT_ID",
      "error_code": 42,
      "error_message": "string"
    }
  ],
  "successful_entities": [
    {
      "entity_name": "string",
      "entity_type": "ENTITY_TYPE_CLIENT_ID"
    }
  ]
}
Response examples (401)
{
  "code": "OK",
  "details": [
    {
      "@type": "type.googleapis.com/google.rpc.BadRequest",
      "field_violations": [
        {
          "description": "string",
          "field": "string",
          "localized_message": {
            "locale": "string",
            "message": "string"
          },
          "reason": "string"
        }
      ]
    }
  ],
  "message": "string"
}
Response examples (500)
{
  "code": "OK",
  "details": [
    {
      "@type": "type.googleapis.com/google.rpc.BadRequest",
      "field_violations": [
        {
          "description": "string",
          "field": "string",
          "localized_message": {
            "locale": "string",
            "message": "string"
          },
          "reason": "string"
        }
      ]
    }
  ],
  "message": "string"
}
Response examples (default)
{
  "code": "OK",
  "details": [
    {
      "@type": "type.googleapis.com/google.rpc.BadRequest",
      "field_violations": [
        {
          "description": "string",
          "field": "string",
          "localized_message": {
            "locale": "string",
            "message": "string"
          },
          "reason": "string"
        }
      ]
    }
  ],
  "message": "string"
}