WSO2 · JSON Structure

Publisher Api Throttling Policy Structure

ThrottlingPolicy schema from WSO2 API Manager

Type: object Properties: 18 Required: 5
API ManagementGatewaysOpen SourceAPI LifecycleGraphQLSOAPREST

Tier is a JSON Structure definition published by WSO2, describing 18 properties, of which 5 are required. It conforms to the https://json-structure.org/meta/core/v0/# meta-schema.

Properties

name description policyLevel displayName attributes requestCount dataUnit totalTokenCount promptTokenCount completionTokenCount unitTime timeUnit rateLimitCount rateLimitTimeUnit quotaPolicyType tierPlan stopOnQuotaReach monetizationProperties

Meta-schema: https://json-structure.org/meta/core/v0/#

JSON Structure

Raw ↑
{
  "$schema": "https://json-structure.org/meta/core/v0/#",
  "$id": "https://raw.githubusercontent.com/api-evangelist/wso2/refs/heads/main/json-structure/publisher-api-throttling-policy-structure.json",
  "name": "Tier",
  "description": "ThrottlingPolicy schema from WSO2 API Manager",
  "required": [
    "name",
    "requestCount",
    "stopOnQuotaReach",
    "tierPlan",
    "unitTime"
  ],
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "example": "Platinum"
    },
    "description": {
      "type": "string",
      "example": "Allows 50 request(s) per minute."
    },
    "policyLevel": {
      "type": "string",
      "example": "api",
      "enum": [
        "subscription",
        "api"
      ]
    },
    "displayName": {
      "type": "string",
      "example": "Platinum"
    },
    "attributes": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "Custom attributes added to the policy policy\n",
      "example": {}
    },
    "requestCount": {
      "type": "int64",
      "description": "Maximum number of requests which can be sent within a provided unit time\n",
      "example": 50
    },
    "dataUnit": {
      "description": "Unit of data allowed to be transfered. Allowed values are \"KB\", \"MB\" and \"GB\"\n",
      "type": "string",
      "example": "KB"
    },
    "totalTokenCount": {
      "type": "int64",
      "description": "Maximum number of total tokens which can be used within a provided unit time\n",
      "example": 1000
    },
    "promptTokenCount": {
      "type": "int64",
      "description": "Maximum number of prompt tokens which can be used within a provided unit time\n",
      "example": 500
    },
    "completionTokenCount": {
      "type": "int64",
      "description": "Maximum number of completion tokens which can be used within a provided unit time\n",
      "example": 600
    },
    "unitTime": {
      "type": "int64",
      "example": 60000
    },
    "timeUnit": {
      "type": "string",
      "example": "min"
    },
    "rateLimitCount": {
      "type": "int32",
      "default": 0,
      "description": "Burst control request count",
      "example": 10
    },
    "rateLimitTimeUnit": {
      "type": "string",
      "description": "Burst control time unit",
      "example": "min"
    },
    "quotaPolicyType": {
      "type": "string",
      "description": "Default quota limit type",
      "enum": [
        "REQUESTCOUNT",
        "BANDWIDTHVOLUME",
        "AIAPIQUOTA"
      ],
      "example": "REQUESTCOUNT"
    },
    "tierPlan": {
      "type": "string",
      "description": "This attribute declares whether this policy is available under commercial or free\n",
      "example": "FREE",
      "enum": [
        "FREE",
        "COMMERCIAL"
      ]
    },
    "stopOnQuotaReach": {
      "type": "boolean",
      "description": "By making this attribute to false, you are capabale of sending requests\neven if the request count exceeded within a unit time\n",
      "example": true
    },
    "monetizationProperties": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "Properties of a tier plan which are related to monetization",
      "example": {}
    }
  }
}