Set a quota Run in API Explorer

POST /v1/quotas

Create or update client throughput quotas for a single entity. This operation is an upsert.

application/json

Body Required

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

  • value object
    Hide value attributes Show value 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

    Quota Set

  • 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
curl \
 --request POST 'https://{dataplane_api_subdomain}.cloud.redpanda.com/v1/quotas' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"entity":{"entity_name":"string","entity_type":"ENTITY_TYPE_CLIENT_ID"},"value":{"value":42.0,"value_type":"VALUE_TYPE_PRODUCER_BYTE_RATE"}}'
Request examples
{
  "entity": {
    "entity_name": "string",
    "entity_type": "ENTITY_TYPE_CLIENT_ID"
  },
  "value": {
    "value": 42.0,
    "value_type": "VALUE_TYPE_PRODUCER_BYTE_RATE"
  }
}
Response examples (201)
{}
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"
}