blob: 11564fc2ec3b0b07ccd5840644383729950d43d1 [file] [log] [blame]
{
"swagger": "2.0",
"info": {
"description": "This provides the REST API for admin operations",
"version": "v2",
"title": "Pulsar Admin REST API",
"license": {
"name": "Apache 2.0",
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
}
},
"basePath": "/admin/v2",
"tags": [
{
"name": "bookies"
},
{
"name": "broker-stats"
},
{
"name": "brokers"
},
{
"name": "clusters"
},
{
"name": "namespaces"
},
{
"name": "non-persistent topic"
},
{
"name": "persistent topic"
},
{
"name": "resource-quotas"
},
{
"name": "resourcegroups"
},
{
"name": "schemas"
},
{
"name": "tenants"
}
],
"schemes": [
"http",
"https"
],
"paths": {
"/bookies/all": {
"get": {
"tags": [
"bookies"
],
"summary": "Gets raw information for all the bookies in the cluster",
"description": "",
"operationId": "getAllBookies",
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"$ref": "#/definitions/BookiesClusterInfo"
}
},
"403": {
"description": "Don't have admin permission"
}
}
}
},
"/bookies/racks-info": {
"get": {
"tags": [
"bookies"
],
"summary": "Gets the rack placement information for all the bookies in the cluster",
"description": "",
"operationId": "getBookiesRackInfo",
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"type": "object",
"additionalProperties": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/BookieInfo"
}
}
}
},
"403": {
"description": "Don't have admin permission"
}
}
}
},
"/bookies/racks-info/{bookie}": {
"get": {
"tags": [
"bookies"
],
"summary": "Gets the rack placement information for a specific bookie in the cluster",
"description": "",
"operationId": "getBookieRackInfo",
"produces": [
"application/json"
],
"parameters": [
{
"name": "bookie",
"in": "path",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"$ref": "#/definitions/BookieInfo"
}
},
"403": {
"description": "Don't have admin permission"
}
}
},
"post": {
"tags": [
"bookies"
],
"summary": "Updates the rack placement information for a specific bookie in the cluster (note. bookie address format:`address:port`)",
"description": "",
"operationId": "updateBookieRackInfo",
"produces": [
"application/json"
],
"parameters": [
{
"name": "bookie",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "group",
"in": "query",
"required": false,
"type": "string"
}
],
"responses": {
"403": {
"description": "Don't have admin permission"
}
}
},
"delete": {
"tags": [
"bookies"
],
"summary": "Removed the rack placement information for a specific bookie in the cluster",
"description": "",
"operationId": "deleteBookieRackInfo",
"produces": [
"application/json"
],
"parameters": [
{
"name": "bookie",
"in": "path",
"required": true,
"type": "string"
}
],
"responses": {
"403": {
"description": "Don't have admin permission"
}
}
}
},
"/broker-stats/allocator-stats/{allocator}": {
"get": {
"tags": [
"broker-stats"
],
"summary": "Get the stats for the Netty allocator. Available allocators are 'default' and 'ml-cache'",
"description": "",
"operationId": "getAllocatorStats",
"produces": [
"application/json"
],
"parameters": [
{
"name": "allocator",
"in": "path",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"$ref": "#/definitions/AllocatorStats"
}
},
"403": {
"description": "Don't have admin permission"
}
}
}
},
"/broker-stats/bookieops": {
"get": {
"tags": [
"broker-stats"
],
"summary": "Get pending bookie client op stats by namesapce",
"description": "",
"operationId": "getPendingBookieOpsStats",
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/PendingBookieOpsStats"
}
}
},
"403": {
"description": "Don't have admin permission"
}
}
}
},
"/broker-stats/broker-resource-availability/{tenant}/{namespace}": {
"get": {
"tags": [
"broker-stats"
],
"summary": "Broker availability report",
"description": "This API gives the current broker availability in percent, each resource percentage usage is calculated and thensum of all of the resource usage percent is called broker-resource-availability<br/><br/>THIS API IS ONLY FOR USE BY TESTING FOR CONFIRMING NAMESPACE ALLOCATION ALGORITHM",
"operationId": "getBrokerResourceAvailability",
"produces": [
"application/json"
],
"parameters": [
{
"name": "tenant",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "namespace",
"in": "path",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/ResourceUnit"
}
}
},
"403": {
"description": "Don't have admin permission"
},
"409": {
"description": "Load-manager doesn't support operation"
}
}
}
},
"/broker-stats/load-report": {
"get": {
"tags": [
"broker-stats"
],
"summary": "Get Load for this broker",
"description": "consists of topics stats & systemResourceUsage",
"operationId": "getLoadReport",
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"$ref": "#/definitions/LoadReport"
}
},
"403": {
"description": "Don't have admin permission"
}
}
}
},
"/broker-stats/mbeans": {
"get": {
"tags": [
"broker-stats"
],
"summary": "Get all the mbean details of this broker JVM",
"description": "",
"operationId": "getMBeans",
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/Metrics"
}
}
},
"403": {
"description": "Don't have admin permission"
}
}
}
},
"/broker-stats/metrics": {
"get": {
"tags": [
"broker-stats"
],
"summary": "Gets the metrics for Monitoring",
"description": "Requested should be executed by Monitoring agent on each broker to fetch the metrics",
"operationId": "getMetrics",
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/Metrics"
}
}
},
"403": {
"description": "Don't have admin permission"
}
}
}
},
"/broker-stats/topics": {
"get": {
"tags": [
"broker-stats"
],
"summary": "Get all the topic stats by namespace",
"description": "",
"operationId": "getTopics2",
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"$ref": "#/definitions/OutputStream"
}
},
"403": {
"description": "Don't have admin permission"
}
}
}
},
"/brokers/backlog-quota-check": {
"get": {
"tags": [
"brokers"
],
"summary": "An REST endpoint to trigger backlogQuotaCheck",
"description": "",
"operationId": "backlogQuotaCheck",
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "Everything is OK"
},
"403": {
"description": "Don't have admin permission"
},
"500": {
"description": "Internal server error"
}
}
}
},
"/brokers/configuration": {
"get": {
"tags": [
"brokers"
],
"summary": "Get all updatable dynamic configurations's name",
"description": "",
"operationId": "getDynamicConfigurationName",
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"type": "array",
"items": {
"type": "string"
}
}
},
"403": {
"description": "You don't have admin permission to get configuration"
}
}
}
},
"/brokers/configuration/runtime": {
"get": {
"tags": [
"brokers"
],
"summary": "Get all runtime configurations. This operation requires Pulsar super-user privileges.",
"description": "",
"operationId": "getRuntimeConfiguration",
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"403": {
"description": "Don't have admin permission"
}
}
}
},
"/brokers/configuration/values": {
"get": {
"tags": [
"brokers"
],
"summary": "Get value of all dynamic configurations' value overridden on local config",
"description": "",
"operationId": "getAllDynamicConfigurations",
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"403": {
"description": "You don't have admin permission to view configuration"
},
"404": {
"description": "Configuration not found"
},
"500": {
"description": "Internal server error"
}
}
}
},
"/brokers/configuration/{configName}": {
"delete": {
"tags": [
"brokers"
],
"summary": "Delete dynamic ServiceConfiguration into metadata only. This operation requires Pulsar super-user privileges.",
"description": "",
"operationId": "deleteDynamicConfiguration",
"produces": [
"application/json"
],
"parameters": [
{
"name": "configName",
"in": "path",
"required": true,
"type": "string"
}
],
"responses": {
"204": {
"description": "Service configuration updated successfully"
},
"403": {
"description": "You don't have admin permission to update service-configuration"
},
"412": {
"description": "Invalid dynamic-config value"
},
"500": {
"description": "Internal server error"
}
}
}
},
"/brokers/configuration/{configName}/{configValue}": {
"post": {
"tags": [
"brokers"
],
"summary": "Update dynamic serviceconfiguration into zk only. This operation requires Pulsar super-user privileges.",
"description": "",
"operationId": "updateDynamicConfiguration",
"produces": [
"application/json"
],
"parameters": [
{
"name": "configName",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "configValue",
"in": "path",
"required": true,
"type": "string"
}
],
"responses": {
"204": {
"description": "Service configuration updated successfully"
},
"403": {
"description": "You don't have admin permission to update service-configuration"
},
"404": {
"description": "Configuration not found"
},
"412": {
"description": "Invalid dynamic-config value"
},
"500": {
"description": "Internal server error"
}
}
}
},
"/brokers/health": {
"get": {
"tags": [
"brokers"
],
"summary": "Run a healthCheck against the broker",
"description": "",
"operationId": "healthCheck",
"produces": [
"application/json"
],
"parameters": [
{
"name": "topicVersion",
"in": "query",
"required": false,
"type": "string",
"enum": [
"V1",
"V2"
]
}
],
"responses": {
"200": {
"description": "Everything is OK"
},
"403": {
"description": "Don't have admin permission"
},
"404": {
"description": "Cluster doesn't exist"
},
"500": {
"description": "Internal server error"
}
}
}
},
"/brokers/internal-configuration": {
"get": {
"tags": [
"brokers"
],
"summary": "Get the internal configuration data",
"description": "",
"operationId": "getInternalConfigurationData",
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"$ref": "#/definitions/InternalConfigurationData"
}
},
"403": {
"description": "Don't have admin permission"
}
}
}
},
"/brokers/leaderBroker": {
"get": {
"tags": [
"brokers"
],
"summary": "Get the information of the leader broker.",
"description": "",
"operationId": "getLeaderBroker",
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"$ref": "#/definitions/BrokerInfo"
}
},
"401": {
"description": "Authentication required"
},
"403": {
"description": "This operation requires super-user access"
},
"404": {
"description": "Leader broker not found"
}
}
}
},
"/brokers/ready": {
"get": {
"tags": [
"brokers"
],
"summary": "Check if the broker is fully initialized",
"description": "",
"operationId": "isReady",
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "Broker is ready"
},
"500": {
"description": "Broker is not ready"
}
}
}
},
"/brokers/shutdown": {
"post": {
"tags": [
"brokers"
],
"summary": "Shutdown broker gracefully.",
"description": "",
"operationId": "shutDownBrokerGracefully",
"produces": [
"application/json"
],
"parameters": [
{
"name": "maxConcurrentUnloadPerSec",
"in": "query",
"description": "if the value absent(value=0) means no concurrent limitation.",
"required": false,
"type": "integer",
"format": "int32"
},
{
"name": "forcedTerminateTopic",
"in": "query",
"required": false,
"type": "boolean",
"default": true
}
],
"responses": {
"204": {
"description": "Execute shutdown command successfully"
},
"403": {
"description": "You don't have admin permission to update service-configuration"
},
"500": {
"description": "Internal server error"
}
}
}
},
"/brokers/version": {
"get": {
"tags": [
"brokers"
],
"summary": "Get version of current broker",
"description": "",
"operationId": "version",
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "Everything is OK",
"schema": {
"type": "string"
}
},
"500": {
"description": "Internal server error"
}
}
}
},
"/brokers/{clusterName}/{broker-webserviceurl}/ownedNamespaces": {
"get": {
"tags": [
"brokers"
],
"summary": "Get the list of namespaces served by the specific broker",
"description": "",
"operationId": "getOwnedNamespaces",
"produces": [
"application/json"
],
"parameters": [
{
"name": "clusterName",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "broker-webserviceurl",
"in": "path",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/NamespaceOwnershipStatus"
}
}
},
"307": {
"description": "Current broker doesn't serve the cluster"
},
"403": {
"description": "Don't have admin permission"
},
"404": {
"description": "Cluster doesn't exist"
}
}
}
},
"/brokers/{cluster}": {
"get": {
"tags": [
"brokers"
],
"summary": "Get the list of active brokers (web service addresses) in the cluster.If authorization is not enabled, any cluster name is valid.",
"description": "",
"operationId": "getActiveBrokers",
"produces": [
"application/json"
],
"parameters": [
{
"name": "cluster",
"in": "path",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string"
}
}
},
"307": {
"description": "Current broker doesn't serve this cluster"
},
"401": {
"description": "Authentication required"
},
"403": {
"description": "This operation requires super-user access"
},
"404": {
"description": "Cluster does not exist: cluster={clustername}"
}
}
}
},
"/clusters": {
"get": {
"tags": [
"clusters"
],
"summary": "Get the list of all the Pulsar clusters.",
"description": "",
"operationId": "getClusters",
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "Return a list of clusters.",
"schema": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string"
}
}
},
"500": {
"description": "Internal server error."
}
}
}
},
"/clusters/{cluster}": {
"get": {
"tags": [
"clusters"
],
"summary": "Get the configuration for the specified cluster.",
"description": "This operation requires Pulsar superuser privileges.",
"operationId": "getCluster",
"produces": [
"application/json"
],
"parameters": [
{
"name": "cluster",
"in": "path",
"description": "The cluster name",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Return the cluster data.",
"schema": {
"$ref": "#/definitions/ClusterData"
}
},
"403": {
"description": "Don't have admin permission."
},
"404": {
"description": "Cluster doesn't exist."
},
"500": {
"description": "Internal server error."
}
}
},
"post": {
"tags": [
"clusters"
],
"summary": "Update the configuration for a cluster.",
"description": "This operation requires Pulsar superuser privileges.",
"operationId": "updateCluster",
"produces": [
"application/json"
],
"parameters": [
{
"name": "cluster",
"in": "path",
"description": "The cluster name",
"required": true,
"type": "string"
},
{
"in": "body",
"name": "body",
"description": "The cluster data",
"required": true,
"schema": {
"$ref": "#/definitions/ClusterData"
},
"x-examples": {
"application/json": "{\n 'serviceUrl': 'http://pulsar.example.com:8080',\n 'brokerServiceUrl': 'pulsar://pulsar.example.com:6651'\n}"
}
}
],
"responses": {
"204": {
"description": "Cluster has been updated."
},
"403": {
"description": "Don't have admin permission or policies are read-only."
},
"404": {
"description": "Cluster doesn't exist."
},
"500": {
"description": "Internal server error."
}
}
},
"put": {
"tags": [
"clusters"
],
"summary": "Create a new cluster.",
"description": "This operation requires Pulsar superuser privileges, and the name cannot contain the '/' characters.",
"operationId": "createCluster",
"produces": [
"application/json"
],
"parameters": [
{
"name": "cluster",
"in": "path",
"description": "The cluster name",
"required": true,
"type": "string"
},
{
"in": "body",
"name": "body",
"description": "The cluster data",
"required": true,
"schema": {
"$ref": "#/definitions/ClusterData"
},
"x-examples": {
"application/json": "{\n 'serviceUrl': 'http://pulsar.example.com:8080',\n 'brokerServiceUrl': 'pulsar://pulsar.example.com:6651',\n}"
}
}
],
"responses": {
"204": {
"description": "Cluster has been created."
},
"403": {
"description": "You don't have admin permission to create the cluster."
},
"409": {
"description": "Cluster already exists."
},
"412": {
"description": "Cluster name is not valid."
},
"500": {
"description": "Internal server error."
}
}
},
"delete": {
"tags": [
"clusters"
],
"summary": "Delete an existing cluster.",
"description": "This operation requires Pulsar superuser privileges.",
"operationId": "deleteCluster",
"produces": [
"application/json"
],
"parameters": [
{
"name": "cluster",
"in": "path",
"description": "The cluster name",
"required": true,
"type": "string"
}
],
"responses": {
"204": {
"description": "Cluster has been deleted."
},
"403": {
"description": "Don't have admin permission or policies are read-only."
},
"404": {
"description": "Cluster doesn't exist."
},
"412": {
"description": "Cluster is not empty."
},
"500": {
"description": "Internal server error."
}
}
}
},
"/clusters/{cluster}/failureDomains": {
"get": {
"tags": [
"clusters"
],
"summary": "Get the cluster failure domains.",
"description": "This operation requires Pulsar superuser privileges.",
"operationId": "getFailureDomains",
"produces": [
"application/json"
],
"parameters": [
{
"name": "cluster",
"in": "path",
"description": "The cluster name",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/FailureDomain"
}
}
},
"403": {
"description": "Don't have admin permission"
},
"500": {
"description": "Internal server error"
}
}
}
},
"/clusters/{cluster}/failureDomains/{domainName}": {
"get": {
"tags": [
"clusters"
],
"summary": "Get a domain in a cluster",
"description": "This operation requires Pulsar superuser privileges.",
"operationId": "getDomain",
"produces": [
"application/json"
],
"parameters": [
{
"name": "cluster",
"in": "path",
"description": "The cluster name",
"required": true,
"type": "string"
},
{
"name": "domainName",
"in": "path",
"description": "The failure domain name",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"$ref": "#/definitions/FailureDomain"
}
},
"403": {
"description": "Don't have admin permission"
},
"404": {
"description": "FailureDomain doesn't exist"
},
"412": {
"description": "Cluster doesn't exist"
},
"500": {
"description": "Internal server error"
}
}
},
"post": {
"tags": [
"clusters"
],
"summary": "Set the failure domain of the cluster.",
"description": "This operation requires Pulsar superuser privileges.",
"operationId": "setFailureDomain",
"produces": [
"application/json"
],
"parameters": [
{
"name": "cluster",
"in": "path",
"description": "The cluster name",
"required": true,
"type": "string"
},
{
"name": "domainName",
"in": "path",
"description": "The failure domain name",
"required": true,
"type": "string"
},
{
"in": "body",
"name": "body",
"description": "The configuration data of a failure domain",
"required": true,
"schema": {
"$ref": "#/definitions/FailureDomain"
}
}
],
"responses": {
"403": {
"description": "Don't have admin permission."
},
"404": {
"description": "Failure domain doesn't exist."
},
"409": {
"description": "Broker already exists in another domain."
},
"412": {
"description": "Cluster doesn't exist."
},
"500": {
"description": "Internal server error."
}
}
},
"delete": {
"tags": [
"clusters"
],
"summary": "Delete the failure domain of the cluster",
"description": "This operation requires Pulsar superuser privileges.",
"operationId": "deleteFailureDomain",
"produces": [
"application/json"
],
"parameters": [
{
"name": "cluster",
"in": "path",
"description": "The cluster name",
"required": true,
"type": "string"
},
{
"name": "domainName",
"in": "path",
"description": "The failure domain name",
"required": true,
"type": "string"
}
],
"responses": {
"403": {
"description": "Don't have admin permission or policy is read only"
},
"404": {
"description": "FailureDomain doesn't exist"
},
"412": {
"description": "Cluster doesn't exist"
},
"500": {
"description": "Internal server error"
}
}
}
},
"/clusters/{cluster}/namespaceIsolationPolicies": {
"get": {
"tags": [
"clusters"
],
"summary": "Get the namespace isolation policies assigned to the cluster.",
"description": "This operation requires Pulsar superuser privileges.",
"operationId": "getNamespaceIsolationPolicies",
"produces": [
"application/json"
],
"parameters": [
{
"name": "cluster",
"in": "path",
"description": "The cluster name",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/NamespaceIsolationData"
}
}
},
"403": {
"description": "Don't have admin permission."
},
"404": {
"description": "Cluster doesn't exist."
},
"500": {
"description": "Internal server error."
}
}
}
},
"/clusters/{cluster}/namespaceIsolationPolicies/brokers": {
"get": {
"tags": [
"clusters"
],
"summary": "Get list of brokers with namespace-isolation policies attached to them.",
"description": "This operation requires Pulsar superuser privileges.",
"operationId": "getBrokersWithNamespaceIsolationPolicy",
"produces": [
"application/json"
],
"parameters": [
{
"name": "cluster",
"in": "path",
"description": "The cluster name",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"type": "array",
"uniqueItems": true,
"items": {
"$ref": "#/definitions/BrokerNamespaceIsolationData"
}
}
},
"403": {
"description": "Don't have admin permission."
},
"404": {
"description": "Namespace-isolation policies not found."
},
"412": {
"description": "Cluster doesn't exist."
},
"500": {
"description": "Internal server error."
}
}
}
},
"/clusters/{cluster}/namespaceIsolationPolicies/brokers/{broker}": {
"get": {
"tags": [
"clusters"
],
"summary": "Get a broker with namespace-isolation policies attached to it.",
"description": "This operation requires Pulsar superuser privileges.",
"operationId": "getBrokerWithNamespaceIsolationPolicy",
"produces": [
"application/json"
],
"parameters": [
{
"name": "cluster",
"in": "path",
"description": "The cluster name",
"required": true,
"type": "string"
},
{
"name": "broker",
"in": "path",
"description": "The broker name (<broker-hostname>:<web-service-port>)",
"required": true,
"type": "string",
"x-example": "broker1:8080"
}
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"$ref": "#/definitions/BrokerNamespaceIsolationData"
}
},
"403": {
"description": "Don't have admin permission."
},
"404": {
"description": "Namespace-isolation policies/ Broker not found."
},
"412": {
"description": "Cluster doesn't exist."
},
"500": {
"description": "Internal server error."
}
}
}
},
"/clusters/{cluster}/namespaceIsolationPolicies/{policyName}": {
"get": {
"tags": [
"clusters"
],
"summary": "Get the single namespace isolation policy assigned to the cluster.",
"description": "This operation requires Pulsar superuser privileges.",
"operationId": "getNamespaceIsolationPolicy",
"produces": [
"application/json"
],
"parameters": [
{
"name": "cluster",
"in": "path",
"description": "The cluster name",
"required": true,
"type": "string"
},
{
"name": "policyName",
"in": "path",
"description": "The name of the namespace isolation policy",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"$ref": "#/definitions/NamespaceIsolationData"
}
},
"403": {
"description": "Don't have admin permission."
},
"404": {
"description": "Policy doesn't exist."
},
"412": {
"description": "Cluster doesn't exist."
},
"500": {
"description": "Internal server error."
}
}
},
"post": {
"tags": [
"clusters"
],
"summary": "Set namespace isolation policy.",
"description": "This operation requires Pulsar superuser privileges.",
"operationId": "setNamespaceIsolationPolicy",
"produces": [
"application/json"
],
"parameters": [
{
"name": "cluster",
"in": "path",
"description": "The cluster name",
"required": true,
"type": "string"
},
{
"name": "policyName",
"in": "path",
"description": "The namespace isolation policy name",
"required": true,
"type": "string"
},
{
"in": "body",
"name": "body",
"description": "The namespace isolation policy data",
"required": true,
"schema": {
"$ref": "#/definitions/NamespaceIsolationData"
}
}
],
"responses": {
"400": {
"description": "Namespace isolation policy data is invalid."
},
"403": {
"description": "Don't have admin permission or policies are read-only."
},
"404": {
"description": "Namespace isolation policy doesn't exist."
},
"412": {
"description": "Cluster doesn't exist."
},
"500": {
"description": "Internal server error."
}
}
},
"delete": {
"tags": [
"clusters"
],
"summary": "Delete namespace isolation policy.",
"description": "This operation requires Pulsar superuser privileges.",
"operationId": "deleteNamespaceIsolationPolicy",
"produces": [
"application/json"
],
"parameters": [
{
"name": "cluster",
"in": "path",
"description": "The cluster name",
"required": true,
"type": "string"
},
{
"name": "policyName",
"in": "path",
"description": "The namespace isolation policy name",
"required": true,
"type": "string"
}
],
"responses": {
"403": {
"description": "Don't have admin permission or policies are read only."
},
"404": {
"description": "Namespace isolation policy doesn't exist."
},
"412": {
"description": "Cluster doesn't exist."
},
"500": {
"description": "Internal server error."
}
}
}
},
"/clusters/{cluster}/peers": {
"get": {
"tags": [
"clusters"
],
"summary": "Get the peer-cluster data for the specified cluster.",
"description": "This operation requires Pulsar superuser privileges.",
"operationId": "getPeerCluster",
"produces": [
"application/json"
],
"parameters": [
{
"name": "cluster",
"in": "path",
"description": "The cluster name",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string"
}
}
},
"403": {
"description": "Don't have admin permission."
},
"404": {
"description": "Cluster doesn't exist."
},
"500": {
"description": "Internal server error."
}
}
},
"post": {
"tags": [
"clusters"
],
"summary": "Update peer-cluster-list for a cluster.",
"description": "This operation requires Pulsar superuser privileges.",
"operationId": "setPeerClusterNames",
"produces": [
"application/json"
],
"parameters": [
{
"name": "cluster",
"in": "path",
"description": "The cluster name",
"required": true,
"type": "string"
},
{
"in": "body",
"name": "body",
"description": "The list of peer cluster names",
"required": true,
"schema": {
"type": "array",
"items": {
"type": "string"
}
},
"x-examples": {
"application/json": "[\n 'cluster-a',\n 'cluster-b'\n]"
}
}
],
"responses": {
"204": {
"description": "Cluster has been updated."
},
"403": {
"description": "Don't have admin permission or policies are read-only."
},
"404": {
"description": "Cluster doesn't exist."
},
"412": {
"description": "Peer cluster doesn't exist."
},
"500": {
"description": "Internal server error."
}
}
}
},
"/namespaces/{cluster}/antiAffinity/{group}": {
"get": {
"tags": [
"namespaces"
],
"summary": "Get all namespaces that are grouped by given anti-affinity group in a given cluster. api can be only accessed by admin of any of the existing tenant",
"description": "",
"operationId": "getAntiAffinityNamespaces",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"name": "cluster",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "group",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "tenant",
"in": "query",
"required": false,
"type": "string"
}
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"type": "array",
"items": {
"type": "string"
}
}
},
"403": {
"description": "Don't have admin permission"
},
"412": {
"description": "Cluster not exist/Anti-affinity group can't be empty."
}
}
}
},
"/namespaces/{property}/{namespace}/persistence/bookieAffinity": {
"get": {
"tags": [
"namespaces"
],
"summary": "Get the bookie-affinity-group from namespace-local policy.",
"description": "",
"operationId": "getBookieAffinityGroup",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"name": "property",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "namespace",
"in": "path",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"$ref": "#/definitions/BookieAffinityGroupData"
}
},
"307": {
"description": "Current broker doesn't serve the namespace"
},
"403": {
"description": "Don't have admin permission"
},
"404": {
"description": "Namespace does not exist"
},
"409": {
"description": "Concurrent modification"
}
}
},
"delete": {
"tags": [
"namespaces"
],
"summary": "Delete the bookie-affinity-group from namespace-local policy.",
"description": "",
"operationId": "deleteBookieAffinityGroup",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"name": "property",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "namespace",
"in": "path",
"required": true,
"type": "string"
}
],
"responses": {
"403": {
"description": "Don't have admin permission"
},
"404": {
"description": "Namespace does not exist"
},
"409": {
"description": "Concurrent modification"
}
}
}
},
"/namespaces/{tenant}": {
"get": {
"tags": [
"namespaces"
],
"summary": "Get the list of all the namespaces for a certain tenant.",
"description": "",
"operationId": "getTenantNamespaces",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"name": "tenant",
"in": "path",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string"
}
}
},
"403": {
"description": "Don't have admin permission"
},
"404": {
"description": "Tenant doesn't exist"
}
}
}
},
"/namespaces/{tenant}/{namespace}": {
"get": {
"tags": [
"namespaces"
],
"summary": "Get the dump all the policies specified for a namespace.",
"description": "",
"operationId": "getPolicies",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"name": "tenant",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "namespace",
"in": "path",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"$ref": "#/definitions/Policies"
}
},
"403": {
"description": "Don't have admin permission"
},
"404": {
"description": "Tenant or cluster or namespace doesn't exist"
}
}
},
"put": {
"tags": [
"namespaces"
],
"summary": "Creates a new namespace with the specified policies",
"description": "",
"operationId": "createNamespace",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"name": "tenant",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "namespace",
"in": "path",
"required": true,
"type": "string"
},
{
"in": "body",
"name": "body",
"description": "Policies for the namespace",
"required": false,
"schema": {
"$ref": "#/definitions/Policies"
}
}
],
"responses": {
"403": {
"description": "Don't have admin permission"
},
"404": {
"description": "Tenant or cluster doesn't exist"
},
"409": {
"description": "Namespace already exists"
},
"412": {
"description": "Namespace name is not valid"
}
}
},
"delete": {
"tags": [
"namespaces"
],
"summary": "Delete a namespace and all the topics under it.",
"description": "",
"operationId": "deleteNamespace",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"name": "tenant",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "namespace",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "force",
"in": "query",
"required": false,
"type": "boolean",
"default": false
},
{
"name": "authoritative",
"in": "query",
"required": false,
"type": "boolean",
"default": false
}
],
"responses": {
"307": {
"description": "Current broker doesn't serve the namespace"
},
"403": {
"description": "Don't have admin permission"
},
"404": {
"description": "Tenant or cluster or namespace doesn't exist"
},
"405": {
"description": "Broker doesn't allow forced deletion of namespaces"
},
"409": {
"description": "Namespace is not empty"
}
}
}
},
"/namespaces/{tenant}/{namespace}/antiAffinity": {
"get": {
"tags": [
"namespaces"
],
"summary": "Get anti-affinity group of a namespace.",
"description": "",
"operationId": "getNamespaceAntiAffinityGroup",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"name": "tenant",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "namespace",
"in": "path",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"type": "string"
}
},
"403": {
"description": "Don't have admin permission"
},
"404": {
"description": "Tenant or cluster or namespace doesn't exist"
}
}
},
"post": {
"tags": [
"namespaces"
],
"summary": "Set anti-affinity group for a namespace",
"description": "",
"operationId": "setNamespaceAntiAffinityGroup",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"name": "tenant",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "namespace",
"in": "path",
"required": true,
"type": "string"
},
{
"in": "body",
"name": "body",
"description": "Anti-affinity group for the specified namespace",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"403": {
"description": "Don't have admin permission"
},
"404": {
"description": "Tenant or cluster or namespace doesn't exist"
},
"412": {
"description": "Invalid antiAffinityGroup"
}
}
},
"delete": {
"tags": [
"namespaces"
],
"summary": "Remove anti-affinity group of a namespace.",
"description": "",
"operationId": "removeNamespaceAntiAffinityGroup",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"name": "tenant",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "namespace",
"in": "path",
"required": true,
"type": "string"
}
],
"responses": {
"403": {
"description": "Don't have admin permission"
},
"404": {
"description": "Namespace does not exist"
},
"409": {
"description": "Concurrent modification"
}
}
}
},
"/namespaces/{tenant}/{namespace}/autoSubscriptionCreation": {
"get": {
"tags": [
"namespaces"
],
"summary": "Get autoSubscriptionCreation info in a namespace",
"description": "",
"operationId": "getAutoSubscriptionCreation",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"name": "tenant",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "namespace",
"in": "path",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"$ref": "#/definitions/AutoSubscriptionCreationOverride"
}
},
"403": {
"description": "Don't have admin permission"
},
"404": {
"description": "Tenant or namespace doesn't exist"
}
}
},
"post": {
"tags": [
"namespaces"
],
"summary": "Override broker's allowAutoSubscriptionCreation setting for a namespace",
"description": "",
"operationId": "setAutoSubscriptionCreation",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"name": "tenant",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "namespace",
"in": "path",
"required": true,
"type": "string"
},
{
"in": "body",
"name": "body",
"description": "Settings for automatic subscription creation",
"required": false,
"schema": {
"$ref": "#/definitions/AutoSubscriptionCreationOverride"
}
}
],
"responses": {
"400": {
"description": "Invalid autoSubscriptionCreation override"
},
"403": {
"description": "Don't have admin permission"
},
"404": {
"description": "Tenant or cluster or namespace doesn't exist"
}
}
},
"delete": {
"tags": [
"namespaces"
],
"summary": "Remove override of broker's allowAutoSubscriptionCreation in a namespace",
"description": "",
"operationId": "removeAutoSubscriptionCreation",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"name": "tenant",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "namespace",
"in": "path",
"required": true,
"type": "string"
}
],
"responses": {
"403": {
"description": "Don't have admin permission"
},
"404": {
"description": "Tenant or cluster or namespace doesn't exist"
}
}
}
},
"/namespaces/{tenant}/{namespace}/autoTopicCreation": {
"get": {
"tags": [
"namespaces"
],
"summary": "Get autoTopicCreation info in a namespace",
"description": "",
"operationId": "getAutoTopicCreation",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"name": "tenant",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "namespace",
"in": "path",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"$ref": "#/definitions/AutoTopicCreationOverride"
}
},
"403": {
"description": "Don't have admin permission"
},
"404": {
"description": "Tenant or namespace doesn't exist"
}
}
},
"post": {
"tags": [
"namespaces"
],
"summary": "Override broker's allowAutoTopicCreation setting for a namespace",
"description": "",
"operationId": "setAutoTopicCreation",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"name": "tenant",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "namespace",
"in": "path",
"required": true,
"type": "string"
},
{
"in": "body",
"name": "body",
"description": "Settings for automatic topic creation",
"required": true,
"schema": {
"$ref": "#/definitions/AutoTopicCreationOverride"
}
}
],
"responses": {
"400": {
"description": "Invalid autoTopicCreation override"
},
"403": {
"description": "Don't have admin permission"
},
"404": {
"description": "Tenant or cluster or namespace doesn't exist"
},
"406": {
"description": "The number of partitions should be less than or equal to maxNumPartitionsPerPartitionedTopic"
}
}
},
"delete": {
"tags": [
"namespaces"
],
"summary": "Remove override of broker's allowAutoTopicCreation in a namespace",
"description": "",
"operationId": "removeAutoTopicCreation",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"name": "tenant",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "namespace",
"in": "path",
"required": true,
"type": "string"
}
],
"responses": {
"403": {
"description": "Don't have admin permission"
},
"404": {
"description": "Tenant or cluster or namespace doesn't exist"
}
}
}
},
"/namespaces/{tenant}/{namespace}/backlogQuota": {
"post": {
"tags": [
"namespaces"
],
"summary": " Set a backlog quota for all the topics on a namespace.",
"description": "",
"operationId": "setBacklogQuota",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"name": "tenant",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "namespace",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "backlogQuotaType",
"in": "query",
"required": false,
"type": "string",
"enum": [
"destination_storage",
"message_age"
]
},
{
"in": "body",
"name": "body",
"description": "Backlog quota for all topics of the specified namespace",
"required": false,
"schema": {
"$ref": "#/definitions/BacklogQuota"
}
}
],
"responses": {
"403": {
"description": "Don't have admin permission"
},
"404": {
"description": "Namespace does not exist"
},
"409": {
"description": "Concurrent modification"
},
"412": {
"description": "Specified backlog quota exceeds retention quota. Increase retention quota and retry request"
}
}
},
"delete": {
"tags": [
"namespaces"
],
"summary": "Remove a backlog quota policy from a namespace.",
"description": "",
"operationId": "removeBacklogQuota",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"name": "tenant",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "namespace",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "backlogQuotaType",
"in": "query",
"required": false,
"type": "string",
"enum": [
"destination_storage",
"message_age"
]
}
],
"responses": {
"403": {
"description": "Don't have admin permission"
},
"404": {
"description": "Namespace does not exist"
},
"409": {
"description": "Concurrent modification"
}
}
}
},
"/namespaces/{tenant}/{namespace}/backlogQuotaMap": {
"get": {
"tags": [
"namespaces"
],
"summary": "Get backlog quota map on a namespace.",
"description": "",
"operationId": "getBacklogQuotaMap",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"name": "tenant",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "namespace",
"in": "path",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/BacklogQuota"
}
}
},
"403": {
"description": "Don't have admin permission"
},
"404": {
"description": "Namespace does not exist"
}
}
}
},
"/namespaces/{tenant}/{namespace}/bundles": {
"get": {
"tags": [
"namespaces"
],
"summary": "Get the bundles split data.",
"description": "",
"operationId": "getBundlesData",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"name": "tenant",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "namespace",
"in": "path",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"$ref": "#/definitions/BundlesData"
}
},
"403": {
"description": "Don't have admin permission"
},
"404": {
"description": "Tenant or cluster or namespace doesn't exist"
},
"412": {
"description": "Namespace is not setup to split in bundles"
}
}
}
},
"/namespaces/{tenant}/{namespace}/clearBacklog": {
"post": {
"tags": [
"namespaces"
],
"summary": "Clear backlog for all topics on a namespace.",
"description": "",
"operationId": "clearNamespaceBacklog",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"name": "tenant",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "namespace",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "authoritative",
"in": "query",
"required": false,
"type": "boolean",
"default": false
}
],
"responses": {
"403": {
"description": "Don't have admin or operate permission on the namespace"
},
"404": {
"description": "Namespace does not exist"
}
}
}
},
"/namespaces/{tenant}/{namespace}/clearBacklog/{subscription}": {
"post": {
"tags": [
"namespaces"
],
"summary": "Clear backlog for a given subscription on all topics on a namespace.",
"description": "",
"operationId": "clearNamespaceBacklogForSubscription",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"name": "tenant",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "namespace",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "subscription",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "authoritative",
"in": "query",
"required": false,
"type": "boolean",
"default": false
}
],
"responses": {
"403": {
"description": "Don't have admin or operate permission on the namespace"
},
"404": {
"description": "Namespace does not exist"
}
}
}
},
"/namespaces/{tenant}/{namespace}/compactionThreshold": {
"get": {
"tags": [
"namespaces"
],
"summary": "Maximum number of uncompacted bytes in topics before compaction is triggered.",
"description": "The backlog size is compared to the threshold periodically. A threshold of 0 disabled automatic compaction",
"operationId": "getCompactionThreshold",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"name": "tenant",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "namespace",
"in": "path",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"type": "integer",
"format": "int64"
}
},
"403": {
"description": "Don't have admin permission"
},
"404": {
"description": "Namespace doesn't exist"
}
}
},
"put": {
"tags": [
"namespaces"
],
"summary": "Set maximum number of uncompacted bytes in a topic before compaction is triggered.",
"description": "The backlog size is compared to the threshold periodically. A threshold of 0 disabled automatic compaction",
"operationId": "setCompactionThreshold",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"name": "tenant",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "namespace",
"in": "path",
"required": true,
"type": "string"
},
{
"in": "body",
"name": "body",
"description": "Maximum number of uncompacted bytes in a topic of the specified namespace",
"required": true,
"schema": {
"type": "integer",
"format": "int64"
}
}
],
"responses": {
"403": {
"description": "Don't have admin permission"
},
"404": {
"description": "Namespace doesn't exist"
},
"409": {
"description": "Concurrent modification"
},
"412": {
"description": "compactionThreshold value is not valid"
}
}
},
"delete": {
"tags": [
"namespaces"
],
"summary": "Delete maximum number of uncompacted bytes in a topic before compaction is triggered.",
"description": "The backlog size is compared to the threshold periodically. A threshold of 0 disabled automatic compaction",
"operationId": "deleteCompactionThreshold",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"name": "tenant",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "namespace",
"in": "path",
"required": true,
"type": "string"
}
],
"responses": {
"403": {
"description": "Don't have admin permission"
},
"404": {
"description": "Namespace doesn't exist"
},
"409": {
"description": "Concurrent modification"
}
}
}
},
"/namespaces/{tenant}/{namespace}/deduplication": {
"get": {
"tags": [
"namespaces"
],
"summary": "Get broker side deduplication for all topics in a namespace",
"description": "",
"operationId": "getDeduplication",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"name": "tenant",
"in": "path",
"required": true,
"type": "string"
},
{