You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by mm...@apache.org on 2018/04/30 15:36:17 UTC
[incubator-pulsar] branch master updated: Add missing Swagger
annotations for Pulsar Functions REST API endpoints (#1661)
This is an automated email from the ASF dual-hosted git repository.
mmerli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-pulsar.git
The following commit(s) were added to refs/heads/master by this push:
new 1cac0ba Add missing Swagger annotations for Pulsar Functions REST API endpoints (#1661)
1cac0ba is described below
commit 1cac0bae469bcb2cadc4ef6cad61d3dbf9b83ca8
Author: Luc Perkins <lu...@gmail.com>
AuthorDate: Mon Apr 30 08:36:15 2018 -0700
Add missing Swagger annotations for Pulsar Functions REST API endpoints (#1661)
* begin adding swagger annotations to pulsar functions endpoints
* annotations for more endpoints
* fix usages of 'exist' and property (vs tenant)
* fix syntax of @ApiResponses annotations
* add missing annotations
---
.../pulsar/broker/admin/impl/ClustersBase.java | 6 +-
.../pulsar/broker/admin/impl/FunctionsBase.java | 105 +-
.../broker/admin/impl/PersistentTopicsBase.java | 4 +-
.../pulsar/broker/admin/impl/TenantsBase.java | 62 +-
.../broker/admin/v2/NonPersistentTopics.java | 4 +-
.../org/apache/pulsar/broker/admin/AdminTest.java | 52 +-
site/_data/admin-rest-api-swagger.json | 4175 ++++++++++++++------
7 files changed, 3240 insertions(+), 1168 deletions(-)
diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/ClustersBase.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/ClustersBase.java
index c05ea77..69b8a9b 100644
--- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/ClustersBase.java
+++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/ClustersBase.java
@@ -118,7 +118,7 @@ public class ClustersBase extends AdminResource {
log.info("[{}] Created cluster {}", clientAppId(), cluster);
} catch (KeeperException.NodeExistsException e) {
log.warn("[{}] Failed to create already existing cluster {}", clientAppId(), cluster);
- throw new RestException(Status.CONFLICT, "Cluster already exist");
+ throw new RestException(Status.CONFLICT, "Cluster already exists");
} catch (IllegalArgumentException e) {
log.warn("[{}] Failed to create cluster with invalid name {}", clientAppId(), cluster, e);
throw new RestException(Status.PRECONDITION_FAILED, "Cluster name is not valid");
@@ -593,7 +593,7 @@ public class ClustersBase extends AdminResource {
@Path("/{cluster}/failureDomains/{domainName}")
@ApiOperation(value = "Set cluster's failure Domain")
@ApiResponses(value = { @ApiResponse(code = 403, message = "Don't have admin permission"),
- @ApiResponse(code = 409, message = "Broker already exist into other domain"),
+ @ApiResponse(code = 409, message = "Broker already exists in another domain"),
@ApiResponse(code = 404, message = "Cluster doesn't exist") })
public void setFailureDomain(@PathParam("cluster") String cluster, @PathParam("domainName") String domainName,
FailureDomain domain) throws Exception {
@@ -719,7 +719,7 @@ public class ClustersBase extends AdminResource {
.filter(inputDomain.brokers::contains).collect(Collectors.toList());
if (!duplicateBrokers.isEmpty()) {
throw new RestException(Status.CONFLICT,
- duplicateBrokers + " already exist into " + domainName);
+ duplicateBrokers + " already exists in " + domainName);
}
}
} catch (Exception e) {
diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/FunctionsBase.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/FunctionsBase.java
index 832cb66..e5c050e 100644
--- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/FunctionsBase.java
+++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/FunctionsBase.java
@@ -31,7 +31,16 @@ import javax.ws.rs.PathParam;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
+
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiResponse;
+import io.swagger.annotations.ApiResponses;
import org.apache.pulsar.broker.admin.AdminResource;
+import org.apache.pulsar.client.api.Message;
+import org.apache.pulsar.functions.proto.Function.Assignment;
+import org.apache.pulsar.functions.proto.Function.FunctionMetaData;
+import org.apache.pulsar.functions.proto.InstanceCommunication.FunctionStatus;
+import org.apache.pulsar.functions.worker.MembershipManager;
import org.apache.pulsar.functions.worker.WorkerService;
import org.apache.pulsar.functions.worker.rest.api.FunctionsImpl;
import org.glassfish.jersey.media.multipart.FormDataContentDisposition;
@@ -51,6 +60,13 @@ public class FunctionsBase extends AdminResource implements Supplier<WorkerServi
}
@POST
+ @ApiOperation(value = "Creates a new Pulsar Function in cluster mode")
+ @ApiResponses(value = {
+ @ApiResponse(code = 403, message = "The requester doesn't have admin permissions"),
+ @ApiResponse(code = 400, message = "Invalid request (function already exists, etc.)"),
+ @ApiResponse(code = 408, message = "Request timeout"),
+ @ApiResponse(code = 200, message = "Pulsar Function successfully created")
+ })
@Path("/{tenant}/{namespace}/{functionName}")
@Consumes(MediaType.MULTIPART_FORM_DATA)
public Response registerFunction(final @PathParam("tenant") String tenant,
@@ -62,10 +78,15 @@ public class FunctionsBase extends AdminResource implements Supplier<WorkerServi
return functions.registerFunction(
tenant, namespace, functionName, uploadedInputStream, fileDetail, functionDetailsJson);
-
}
@PUT
+ @ApiOperation(value = "Updates a Pulsar Function currently running in cluster mode")
+ @ApiResponses(value = {
+ @ApiResponse(code = 403, message = "The requester doesn't have admin permissions"),
+ @ApiResponse(code = 400, message = "Invalid request (function doesn't exist, etc.)"),
+ @ApiResponse(code = 200, message = "Pulsar Function successfully updated")
+ })
@Path("/{tenant}/{namespace}/{functionName}")
@Consumes(MediaType.MULTIPART_FORM_DATA)
public Response updateFunction(final @PathParam("tenant") String tenant,
@@ -82,6 +103,14 @@ public class FunctionsBase extends AdminResource implements Supplier<WorkerServi
@DELETE
+ @ApiOperation(value = "Deletes a Pulsar Function currently running in cluster mode")
+ @ApiResponses(value = {
+ @ApiResponse(code = 403, message = "The requester doesn't have admin permissions"),
+ @ApiResponse(code = 400, message = "Invalid request"),
+ @ApiResponse(code = 404, message = "The function doesn't exist"),
+ @ApiResponse(code = 408, message = "Request timeout"),
+ @ApiResponse(code = 200, message = "The function was successfully deleted")
+ })
@Path("/{tenant}/{namespace}/{functionName}")
public Response deregisterFunction(final @PathParam("tenant") String tenant,
final @PathParam("namespace") String namespace,
@@ -91,16 +120,34 @@ public class FunctionsBase extends AdminResource implements Supplier<WorkerServi
}
@GET
+ @ApiOperation(
+ value = "Fetches information about a Pulsar Function currently running in cluster mode",
+ response = FunctionMetaData.class
+ )
+ @ApiResponses(value = {
+ @ApiResponse(code = 403, message = "The requester doesn't have admin permissions"),
+ @ApiResponse(code = 400, message = "Invalid request"),
+ @ApiResponse(code = 408, message = "Request timeout"),
+ @ApiResponse(code = 404, message = "The function doesn't exist")
+ })
@Path("/{tenant}/{namespace}/{functionName}")
public Response getFunctionInfo(final @PathParam("tenant") String tenant,
final @PathParam("namespace") String namespace,
- final @PathParam("functionName") String functionName)
- throws IOException {
+ final @PathParam("functionName") String functionName) throws IOException {
return functions.getFunctionInfo(
tenant, namespace, functionName);
}
@GET
+ @ApiOperation(
+ value = "Displays the status of a Pulsar Function instance",
+ response = FunctionStatus.class
+ )
+ @ApiResponses(value = {
+ @ApiResponse(code = 400, message = "Invalid request"),
+ @ApiResponse(code = 403, message = "The requester doesn't have admin permissions"),
+ @ApiResponse(code = 404, message = "The function doesn't exist")
+ })
@Path("/{tenant}/{namespace}/{functionName}/{instanceId}/status")
public Response getFunctionInstanceStatus(final @PathParam("tenant") String tenant,
final @PathParam("namespace") String namespace,
@@ -111,6 +158,14 @@ public class FunctionsBase extends AdminResource implements Supplier<WorkerServi
}
@GET
+ @ApiOperation(
+ value = "Displays the status of a Pulsar Function running in cluster mode",
+ response = FunctionStatus.class
+ )
+ @ApiResponses(value = {
+ @ApiResponse(code = 400, message = "Invalid request"),
+ @ApiResponse(code = 403, message = "The requester doesn't have admin permissions")
+ })
@Path("/{tenant}/{namespace}/{functionName}/status")
public Response getFunctionStatus(final @PathParam("tenant") String tenant,
final @PathParam("namespace") String namespace,
@@ -120,6 +175,15 @@ public class FunctionsBase extends AdminResource implements Supplier<WorkerServi
}
@GET
+ @ApiOperation(
+ value = "Lists all Pulsar Functions currently deployed in a given namespace",
+ response = String.class,
+ responseContainer = "Collection"
+ )
+ @ApiResponses(value = {
+ @ApiResponse(code = 400, message = "Invalid request"),
+ @ApiResponse(code = 403, message = "The requester doesn't have admin permissions")
+ })
@Path("/{tenant}/{namespace}")
public Response listFunctions(final @PathParam("tenant") String tenant,
final @PathParam("namespace") String namespace) {
@@ -129,18 +193,45 @@ public class FunctionsBase extends AdminResource implements Supplier<WorkerServi
}
@GET
+ @ApiOperation(
+ value = "Fetches information about the Pulsar cluster running Pulsar Functions",
+ response = MembershipManager.WorkerInfo.class,
+ responseContainer = "List"
+ )
+ @ApiResponses(value = {
+ @ApiResponse(code = 403, message = "The requester doesn't have admin permissions")
+
+ })
@Path("/cluster")
public Response getCluster() {
return functions.getCluster();
}
@GET
+ @ApiOperation(
+ value = "Fetches information about which Pulsar Functions are assigned to which Pulsar clusters",
+ response = Assignment.class,
+ responseContainer = "Map"
+ )
+ @ApiResponses(value = {
+ @ApiResponse(code = 403, message = "The requester doesn't have admin permissions")
+ })
@Path("/assignments")
public Response getAssignments() {
return functions.getAssignments();
}
@POST
+ @ApiOperation(
+ value = "Triggers a Pulsar Function with a user-specified value or file data",
+ response = Message.class
+ )
+ @ApiResponses(value = {
+ @ApiResponse(code = 400, message = "Invalid request"),
+ @ApiResponse(code = 404, message = "The function does not exist"),
+ @ApiResponse(code = 408, message = "Request timeout"),
+ @ApiResponse(code = 500, message = "Internal server error")
+ })
@Path("/{tenant}/{namespace}/{functionName}/trigger")
@Consumes(MediaType.MULTIPART_FORM_DATA)
public Response triggerFunction(final @PathParam("tenant") String tenant,
@@ -155,6 +246,10 @@ public class FunctionsBase extends AdminResource implements Supplier<WorkerServi
}
@POST
+ @ApiOperation(
+ value = "Uploads Pulsar Function file data",
+ hidden = true
+ )
@Path("/upload")
@Consumes(MediaType.MULTIPART_FORM_DATA)
public Response uploadFunction(final @FormDataParam("data") InputStream uploadedInputStream,
@@ -163,6 +258,10 @@ public class FunctionsBase extends AdminResource implements Supplier<WorkerServi
}
@GET
+ @ApiOperation(
+ value = "Downloads Pulsar Function file data",
+ hidden = true
+ )
@Path("/download")
public Response downloadFunction(final @QueryParam("path") String path) {
return functions.downloadFunction(path);
diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
index 106e8c4..21b14d0 100644
--- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
+++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
@@ -346,7 +346,7 @@ public class PersistentTopicsBase extends AdminResource {
log.info("[{}] Successfully created partitioned topic {}", clientAppId(), topicName);
} catch (KeeperException.NodeExistsException e) {
log.warn("[{}] Failed to create already existing partitioned topic {}", clientAppId(), topicName);
- throw new RestException(Status.CONFLICT, "Partitioned topic already exist");
+ throw new RestException(Status.CONFLICT, "Partitioned topic already exists");
} catch (Exception e) {
log.error("[{}] Failed to create partitioned topic {}", clientAppId(), topicName, e);
throw new RestException(e);
@@ -354,7 +354,7 @@ public class PersistentTopicsBase extends AdminResource {
}
/**
- * It updates number of partitions of an existing non-global partitioned topic. It requires partitioned-topic to be
+ * It updates number of partitions of an existing non-global partitioned topic. It requires partitioned-topic to
* already exist and number of new partitions must be greater than existing number of partitions. Decrementing
* number of partitions requires deletion of topic which is not supported.
*
diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/TenantsBase.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/TenantsBase.java
index 515de17..cb3cd53 100644
--- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/TenantsBase.java
+++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/TenantsBase.java
@@ -47,9 +47,9 @@ public class TenantsBase extends AdminResource {
@GET
@ApiOperation(value = "Get the list of tenants.", response = String.class, responseContainer = "List")
- @ApiResponses(value = { @ApiResponse(code = 403, message = "Don't have admin permission"),
- @ApiResponse(code = 404, message = "Property doesn't exist") })
- public List<String> getProperties() {
+ @ApiResponses(value = { @ApiResponse(code = 403, message = "The requester doesn't have admin permissions"),
+ @ApiResponse(code = 404, message = "Tenant doesn't exist") })
+ public List<String> getTenants() {
validateSuperUserAccess();
try {
@@ -65,14 +65,14 @@ public class TenantsBase extends AdminResource {
@GET
@Path("/{tenant}")
@ApiOperation(value = "Get the admin configuration for a given tenant.")
- @ApiResponses(value = { @ApiResponse(code = 403, message = "Don't have admin permission"),
- @ApiResponse(code = 404, message = "Property doesn't exist") })
- public TenantInfo getPropertyAdmin(@PathParam("tenant") String tenant) {
+ @ApiResponses(value = { @ApiResponse(code = 403, message = "The requester doesn't have admin permissions"),
+ @ApiResponse(code = 404, message = "Tenant does not exist") })
+ public TenantInfo getTenantAdmin(@PathParam("tenant") String tenant) {
validateSuperUserAccess();
try {
return tenantsCache().get(path(POLICIES, tenant))
- .orElseThrow(() -> new RestException(Status.NOT_FOUND, "Property does not exist"));
+ .orElseThrow(() -> new RestException(Status.NOT_FOUND, "Tenant does not exist"));
} catch (Exception e) {
log.error("[{}] Failed to get tenant {}", clientAppId(), tenant, e);
throw new RestException(e);
@@ -82,10 +82,10 @@ public class TenantsBase extends AdminResource {
@PUT
@Path("/{tenant}")
@ApiOperation(value = "Create a new tenant.", notes = "This operation requires Pulsar super-user privileges.")
- @ApiResponses(value = { @ApiResponse(code = 403, message = "Don't have admin permission"),
- @ApiResponse(code = 409, message = "Property already exist"),
- @ApiResponse(code = 412, message = "Property name is not valid") })
- public void createProperty(@PathParam("tenant") String tenant, TenantInfo config) {
+ @ApiResponses(value = { @ApiResponse(code = 403, message = "The requester doesn't have admin permissions"),
+ @ApiResponse(code = 409, message = "Tenant already exists"),
+ @ApiResponse(code = 412, message = "Tenant name is not valid") })
+ public void createTenant(@PathParam("tenant") String tenant, TenantInfo config) {
validateSuperUserAccess();
validatePoliciesReadOnlyAccess();
@@ -95,10 +95,10 @@ public class TenantsBase extends AdminResource {
log.info("[{}] Created tenant {}", clientAppId(), tenant);
} catch (KeeperException.NodeExistsException e) {
log.warn("[{}] Failed to create already existing tenant {}", clientAppId(), tenant);
- throw new RestException(Status.CONFLICT, "Property already exist");
+ throw new RestException(Status.CONFLICT, "Tenant already exists");
} catch (IllegalArgumentException e) {
log.warn("[{}] Failed to create tenant with invalid name {}", clientAppId(), tenant, e);
- throw new RestException(Status.PRECONDITION_FAILED, "Property name is not valid");
+ throw new RestException(Status.PRECONDITION_FAILED, "Tenant name is not valid");
} catch (Exception e) {
log.error("[{}] Failed to create tenant {}", clientAppId(), tenant, e);
throw new RestException(e);
@@ -108,23 +108,23 @@ public class TenantsBase extends AdminResource {
@POST
@Path("/{tenant}")
@ApiOperation(value = "Update the admins for a tenant.", notes = "This operation requires Pulsar super-user privileges.")
- @ApiResponses(value = { @ApiResponse(code = 403, message = "Don't have admin permission"),
- @ApiResponse(code = 404, message = "Property does not exist"),
- @ApiResponse(code = 409, message = "Property already exist") })
- public void updateProperty(@PathParam("tenant") String tenant, TenantInfo newPropertyAdmin) {
+ @ApiResponses(value = { @ApiResponse(code = 403, message = "The requester doesn't have admin permissions"),
+ @ApiResponse(code = 404, message = "Tenant does not exist"),
+ @ApiResponse(code = 409, message = "Tenant already exists") })
+ public void updateTenant(@PathParam("tenant") String tenant, TenantInfo newTenantAdmin) {
validateSuperUserAccess();
validatePoliciesReadOnlyAccess();
Stat nodeStat = new Stat();
try {
byte[] content = globalZk().getData(path(POLICIES, tenant), null, nodeStat);
- TenantInfo oldPropertyAdmin = jsonMapper().readValue(content, TenantInfo.class);
+ TenantInfo oldTenantAdmin = jsonMapper().readValue(content, TenantInfo.class);
List<String> clustersWithActiveNamespaces = Lists.newArrayList();
- if (oldPropertyAdmin.getAllowedClusters().size() > newPropertyAdmin.getAllowedClusters().size()) {
+ if (oldTenantAdmin.getAllowedClusters().size() > newTenantAdmin.getAllowedClusters().size()) {
// Get the colo(s) being removed from the list
- oldPropertyAdmin.getAllowedClusters().removeAll(newPropertyAdmin.getAllowedClusters());
- log.debug("Following clusters are being removed : [{}]", oldPropertyAdmin.getAllowedClusters());
- for (String cluster : oldPropertyAdmin.getAllowedClusters()) {
+ oldTenantAdmin.getAllowedClusters().removeAll(newTenantAdmin.getAllowedClusters());
+ log.debug("Following clusters are being removed : [{}]", oldTenantAdmin.getAllowedClusters());
+ for (String cluster : oldTenantAdmin.getAllowedClusters()) {
List<String> activeNamespaces = Lists.newArrayList();
try {
activeNamespaces = globalZk().getChildren(path(POLICIES, tenant, cluster), false);
@@ -145,14 +145,14 @@ public class TenantsBase extends AdminResource {
}
}
String tenantPath = path(POLICIES, tenant);
- globalZk().setData(tenantPath, jsonMapper().writeValueAsBytes(newPropertyAdmin), -1);
+ globalZk().setData(tenantPath, jsonMapper().writeValueAsBytes(newTenantAdmin), -1);
globalZkCache().invalidate(tenantPath);
log.info("[{}] updated tenant {}", clientAppId(), tenant);
} catch (RestException re) {
throw re;
} catch (KeeperException.NoNodeException e) {
log.warn("[{}] Failed to update tenant {}: does not exist", clientAppId(), tenant);
- throw new RestException(Status.NOT_FOUND, "Property does not exist");
+ throw new RestException(Status.NOT_FOUND, "Tenant does not exist");
} catch (Exception e) {
log.error("[{}] Failed to update tenant {}", clientAppId(), tenant, e);
throw new RestException(e);
@@ -161,17 +161,17 @@ public class TenantsBase extends AdminResource {
@DELETE
@Path("/{tenant}")
- @ApiOperation(value = "elete a tenant and all namespaces and topics under it.")
- @ApiResponses(value = { @ApiResponse(code = 403, message = "Don't have admin permission"),
- @ApiResponse(code = 404, message = "Property does not exist"),
+ @ApiOperation(value = "Delete a tenant and all namespaces and topics under it.")
+ @ApiResponses(value = { @ApiResponse(code = 403, message = "The requester doesn't have admin permissions"),
+ @ApiResponse(code = 404, message = "Tenant does not exist"),
@ApiResponse(code = 409, message = "The tenant still has active namespaces") })
- public void deleteProperty(@PathParam("tenant") String tenant) {
+ public void deleteTenant(@PathParam("tenant") String tenant) {
validateSuperUserAccess();
validatePoliciesReadOnlyAccess();
- boolean isPropertyEmpty = false;
+ boolean isTenantEmpty;
try {
- isPropertyEmpty = getListOfNamespaces(tenant).isEmpty();
+ isTenantEmpty = getListOfNamespaces(tenant).isEmpty();
} catch (KeeperException.NoNodeException e) {
log.warn("[{}] Failed to delete tenant {}: does not exist", clientAppId(), tenant);
throw new RestException(Status.NOT_FOUND, "The tenant does not exist");
@@ -180,7 +180,7 @@ public class TenantsBase extends AdminResource {
throw new RestException(e);
}
- if (!isPropertyEmpty) {
+ if (!isTenantEmpty) {
log.warn("[{}] Failed to delete tenant {}: not empty", clientAppId(), tenant);
throw new RestException(Status.CONFLICT, "The tenant still has active namespaces");
}
diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/v2/NonPersistentTopics.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/v2/NonPersistentTopics.java
index b1ee171..8f616d2 100644
--- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/v2/NonPersistentTopics.java
+++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/v2/NonPersistentTopics.java
@@ -107,7 +107,7 @@ public class NonPersistentTopics extends PersistentTopics {
@Path("/{tenant}/{namespace}/{topic}/partitions")
@ApiOperation(value = "Create a partitioned topic.", notes = "It needs to be called before creating a producer on a partitioned topic.")
@ApiResponses(value = { @ApiResponse(code = 403, message = "Don't have admin permission"),
- @ApiResponse(code = 409, message = "Partitioned topic already exist") })
+ @ApiResponse(code = 409, message = "Partitioned topic already exists") })
public void createPartitionedTopic(@PathParam("tenant") String tenant, @PathParam("namespace") String namespace,
@PathParam("topic") @Encoded String encodedTopic, int numPartitions,
@QueryParam("authoritative") @DefaultValue("false") boolean authoritative) {
@@ -126,7 +126,7 @@ public class NonPersistentTopics extends PersistentTopics {
log.info("[{}] Successfully created partitioned topic {}", clientAppId(), topicName);
} catch (KeeperException.NodeExistsException e) {
log.warn("[{}] Failed to create already existing partitioned topic {}", clientAppId(), topicName);
- throw new RestException(Status.CONFLICT, "Partitioned topic already exist");
+ throw new RestException(Status.CONFLICT, "Partitioned topic already exists");
} catch (Exception e) {
log.error("[{}] Failed to create partitioned topic {}", clientAppId(), topicName, e);
throw new RestException(e);
diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/AdminTest.java b/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/AdminTest.java
index 0f8b2d7..c14ecfc 100644
--- a/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/AdminTest.java
+++ b/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/AdminTest.java
@@ -366,34 +366,34 @@ public class AdminTest extends MockedPulsarServiceBaseTest {
@Test
void properties() throws Exception {
- assertEquals(properties.getProperties(), Lists.newArrayList());
+ assertEquals(properties.getTenants(), Lists.newArrayList());
verify(properties, times(1)).validateSuperUserAccess();
Set<String> allowedClusters = Sets.newHashSet();
TenantInfo tenantInfo = new TenantInfo(Sets.newHashSet("role1", "role2"), allowedClusters);
- properties.createProperty("test-property", tenantInfo);
+ properties.createTenant("test-property", tenantInfo);
verify(properties, times(2)).validateSuperUserAccess();
- assertEquals(properties.getProperties(), Lists.newArrayList("test-property"));
+ assertEquals(properties.getTenants(), Lists.newArrayList("test-property"));
verify(properties, times(3)).validateSuperUserAccess();
- assertEquals(properties.getPropertyAdmin("test-property"), tenantInfo);
+ assertEquals(properties.getTenantAdmin("test-property"), tenantInfo);
verify(properties, times(4)).validateSuperUserAccess();
TenantInfo newPropertyAdmin = new TenantInfo(Sets.newHashSet("role1", "other-role"), allowedClusters);
- properties.updateProperty("test-property", newPropertyAdmin);
+ properties.updateTenant("test-property", newPropertyAdmin);
verify(properties, times(5)).validateSuperUserAccess();
- // Wait for updateProperty to take effect
+ // Wait for updateTenant to take effect
Thread.sleep(100);
- assertEquals(properties.getPropertyAdmin("test-property"), newPropertyAdmin);
- assertNotSame(properties.getPropertyAdmin("test-property"), tenantInfo);
+ assertEquals(properties.getTenantAdmin("test-property"), newPropertyAdmin);
+ assertNotSame(properties.getTenantAdmin("test-property"), tenantInfo);
verify(properties, times(7)).validateSuperUserAccess();
// Check creating existing property
try {
- properties.createProperty("test-property", tenantInfo);
+ properties.createTenant("test-property", tenantInfo);
fail("should have failed");
} catch (RestException e) {
assertEquals(e.getResponse().getStatus(), Status.CONFLICT.getStatusCode());
@@ -401,14 +401,14 @@ public class AdminTest extends MockedPulsarServiceBaseTest {
// Check non-existing property
try {
- properties.getPropertyAdmin("non-existing");
+ properties.getTenantAdmin("non-existing");
fail("should have failed");
} catch (RestException e) {
assertEquals(e.getResponse().getStatus(), Status.NOT_FOUND.getStatusCode());
}
try {
- properties.updateProperty("xxx-non-existing", newPropertyAdmin);
+ properties.updateTenant("xxx-non-existing", newPropertyAdmin);
fail("should have failed");
} catch (RestException e) {
assertEquals(e.getResponse().getStatus(), Status.NOT_FOUND.getStatusCode());
@@ -416,7 +416,7 @@ public class AdminTest extends MockedPulsarServiceBaseTest {
// Check deleting non-existing property
try {
- properties.deleteProperty("non-existing");
+ properties.deleteTenant("non-existing");
fail("should have failed");
} catch (RestException e) {
assertEquals(e.getResponse().getStatus(), Status.NOT_FOUND.getStatusCode());
@@ -425,7 +425,7 @@ public class AdminTest extends MockedPulsarServiceBaseTest {
// Test zk failures
mockZookKeeper.failNow(Code.SESSIONEXPIRED);
try {
- properties.getProperties();
+ properties.getTenants();
fail("should have failed");
} catch (RestException e) {
assertEquals(e.getResponse().getStatus(), Status.INTERNAL_SERVER_ERROR.getStatusCode());
@@ -433,7 +433,7 @@ public class AdminTest extends MockedPulsarServiceBaseTest {
mockZookKeeper.failNow(Code.SESSIONEXPIRED);
try {
- properties.getPropertyAdmin("my-tenant");
+ properties.getTenantAdmin("my-tenant");
fail("should have failed");
} catch (RestException e) {
assertEquals(e.getResponse().getStatus(), Status.INTERNAL_SERVER_ERROR.getStatusCode());
@@ -441,7 +441,7 @@ public class AdminTest extends MockedPulsarServiceBaseTest {
mockZookKeeper.failNow(Code.SESSIONEXPIRED);
try {
- properties.updateProperty("my-tenant", newPropertyAdmin);
+ properties.updateTenant("my-tenant", newPropertyAdmin);
fail("should have failed");
} catch (RestException e) {
assertEquals(e.getResponse().getStatus(), Status.INTERNAL_SERVER_ERROR.getStatusCode());
@@ -449,7 +449,7 @@ public class AdminTest extends MockedPulsarServiceBaseTest {
mockZookKeeper.failNow(Code.SESSIONEXPIRED);
try {
- properties.createProperty("test", tenantInfo);
+ properties.createTenant("test", tenantInfo);
fail("should have failed");
} catch (RestException e) {
assertEquals(e.getResponse().getStatus(), Status.INTERNAL_SERVER_ERROR.getStatusCode());
@@ -457,34 +457,34 @@ public class AdminTest extends MockedPulsarServiceBaseTest {
mockZookKeeper.failNow(Code.SESSIONEXPIRED);
try {
- properties.deleteProperty("my-tenant");
+ properties.deleteTenant("my-tenant");
fail("should have failed");
} catch (RestException e) {
assertEquals(e.getResponse().getStatus(), Status.INTERNAL_SERVER_ERROR.getStatusCode());
}
- properties.createProperty("error-property", tenantInfo);
+ properties.createTenant("error-property", tenantInfo);
mockZookKeeper.failAfter(2, Code.SESSIONEXPIRED);
try {
- properties.deleteProperty("error-property");
+ properties.deleteTenant("error-property");
fail("should have failed");
} catch (RestException e) {
assertEquals(e.getResponse().getStatus(), Status.INTERNAL_SERVER_ERROR.getStatusCode());
}
- properties.deleteProperty("test-property");
- properties.deleteProperty("error-property");
- assertEquals(properties.getProperties(), Lists.newArrayList());
+ properties.deleteTenant("test-property");
+ properties.deleteTenant("error-property");
+ assertEquals(properties.getTenants(), Lists.newArrayList());
// Create a namespace to test deleting a non-empty property
clusters.createCluster("use", new ClusterData());
newPropertyAdmin = new TenantInfo(Sets.newHashSet("role1", "other-role"), Sets.newHashSet("use"));
- properties.createProperty("my-tenant", newPropertyAdmin);
+ properties.createTenant("my-tenant", newPropertyAdmin);
namespaces.createNamespace("my-tenant", "use", "my-namespace", new BundlesData());
try {
- properties.deleteProperty("my-tenant");
+ properties.deleteTenant("my-tenant");
fail("should have failed");
} catch (RestException e) {
// Ok
@@ -492,14 +492,14 @@ public class AdminTest extends MockedPulsarServiceBaseTest {
// Check name validation
try {
- properties.createProperty("test&", tenantInfo);
+ properties.createTenant("test&", tenantInfo);
fail("should have failed");
} catch (RestException e) {
assertEquals(e.getResponse().getStatus(), Status.PRECONDITION_FAILED.getStatusCode());
}
namespaces.deleteNamespace("my-tenant", "use", "my-namespace", false);
- properties.deleteProperty("my-tenant");
+ properties.deleteTenant("my-tenant");
}
@Test
diff --git a/site/_data/admin-rest-api-swagger.json b/site/_data/admin-rest-api-swagger.json
index b2a18dc..07d45c4 100644
--- a/site/_data/admin-rest-api-swagger.json
+++ b/site/_data/admin-rest-api-swagger.json
@@ -17,6 +17,8 @@
}, {
"name" : "clusters"
}, {
+ "name" : "functions"
+ }, {
"name" : "namespaces"
}, {
"name" : "non-persistent topic"
@@ -26,6 +28,8 @@
"name" : "properties"
}, {
"name" : "resource-quotas"
+ }, {
+ "name" : "tenants"
} ],
"schemes" : [ "http", "https" ],
"paths" : {
@@ -120,12 +124,49 @@
}
}
},
+ "/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/destinations" : {
"get" : {
"tags" : [ "broker-stats" ],
- "summary" : "Get all the destination stats by namesapce",
+ "summary" : "Get all the topic stats by namesapce",
"description" : "",
- "operationId" : "getDestinations2",
+ "operationId" : "getTopics2",
"produces" : [ "application/json" ],
"responses" : {
"200" : {
@@ -144,7 +185,7 @@
"get" : {
"tags" : [ "broker-stats" ],
"summary" : "Get Load for this broker",
- "description" : "consists of destinationstats & systemResourceUsage",
+ "description" : "consists of topics stats & systemResourceUsage",
"operationId" : "getLoadReport",
"produces" : [ "application/json" ],
"responses" : {
@@ -283,6 +324,23 @@
}
}
},
+ "/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"
+ }
+ }
+ }
+ }
+ },
"/brokers/{cluster}" : {
"get" : {
"tags" : [ "brokers" ],
@@ -484,12 +542,12 @@
}
}
},
- "/clusters/{cluster}/namespaceIsolationPolicies" : {
+ "/clusters/{cluster}/failureDomains" : {
"get" : {
"tags" : [ "clusters" ],
- "summary" : "Get the namespace isolation policies assigned in the cluster",
+ "summary" : "Get the cluster failure domains",
"description" : "",
- "operationId" : "getNamespaceIsolationPolicies",
+ "operationId" : "getFailureDomains",
"produces" : [ "application/json" ],
"parameters" : [ {
"name" : "cluster",
@@ -503,25 +561,22 @@
"schema" : {
"type" : "object",
"additionalProperties" : {
- "$ref" : "#/definitions/NamespaceIsolationData"
+ "$ref" : "#/definitions/FailureDomain"
}
}
},
"403" : {
"description" : "Don't have admin permission"
- },
- "404" : {
- "description" : "Cluster doesn't exist"
}
}
}
},
- "/clusters/{cluster}/namespaceIsolationPolicies/{policyName}" : {
+ "/clusters/{cluster}/failureDomains/{domainName}" : {
"get" : {
"tags" : [ "clusters" ],
- "summary" : "Get a single namespace isolation policy assigned in the cluster",
+ "summary" : "Get a domain in a cluster",
"description" : "",
- "operationId" : "getNamespaceIsolationPolicy",
+ "operationId" : "getDomain",
"produces" : [ "application/json" ],
"parameters" : [ {
"name" : "cluster",
@@ -529,7 +584,7 @@
"required" : true,
"type" : "string"
}, {
- "name" : "policyName",
+ "name" : "domainName",
"in" : "path",
"required" : true,
"type" : "string"
@@ -538,14 +593,14 @@
"200" : {
"description" : "successful operation",
"schema" : {
- "$ref" : "#/definitions/NamespaceIsolationData"
+ "$ref" : "#/definitions/FailureDomain"
}
},
"403" : {
"description" : "Don't have admin permission"
},
"404" : {
- "description" : "Policy doesn't exist"
+ "description" : "Domain doesn't exist"
},
"412" : {
"description" : "Cluster doesn't exist"
@@ -554,9 +609,9 @@
},
"post" : {
"tags" : [ "clusters" ],
- "summary" : "Set namespace isolation policy",
+ "summary" : "Set cluster's failure Domain",
"description" : "",
- "operationId" : "setNamespaceIsolationPolicy",
+ "operationId" : "setFailureDomain",
"produces" : [ "application/json" ],
"parameters" : [ {
"name" : "cluster",
@@ -564,25 +619,28 @@
"required" : true,
"type" : "string"
}, {
- "name" : "policyName",
+ "name" : "domainName",
"in" : "path",
"required" : true,
"type" : "string"
} ],
"responses" : {
"403" : {
- "description" : "Don't have admin permission or plicy is read only"
+ "description" : "Don't have admin permission"
},
- "412" : {
+ "404" : {
"description" : "Cluster doesn't exist"
+ },
+ "409" : {
+ "description" : "Broker already exist into other domain"
}
}
},
"delete" : {
"tags" : [ "clusters" ],
- "summary" : "Delete namespace isolation policy",
+ "summary" : "Delete cluster's failure omain",
"description" : "",
- "operationId" : "deleteNamespaceIsolationPolicy",
+ "operationId" : "deleteFailureDomain",
"produces" : [ "application/json" ],
"parameters" : [ {
"name" : "cluster",
@@ -590,7 +648,7 @@
"required" : true,
"type" : "string"
}, {
- "name" : "policyName",
+ "name" : "domainName",
"in" : "path",
"required" : true,
"type" : "string"
@@ -605,12 +663,12 @@
}
}
},
- "/clusters/{cluster}/peers" : {
- "post" : {
+ "/clusters/{cluster}/namespaceIsolationPolicies" : {
+ "get" : {
"tags" : [ "clusters" ],
- "summary" : "Update peer-cluster-list for a cluster.",
- "description" : "This operation requires Pulsar super-user privileges.",
- "operationId" : "setPeerClusterNames",
+ "summary" : "Get the namespace isolation policies assigned in the cluster",
+ "description" : "",
+ "operationId" : "getNamespaceIsolationPolicies",
"produces" : [ "application/json" ],
"parameters" : [ {
"name" : "cluster",
@@ -619,31 +677,33 @@
"type" : "string"
} ],
"responses" : {
- "204" : {
- "description" : "Cluster has been updated"
+ "200" : {
+ "description" : "successful operation",
+ "schema" : {
+ "type" : "object",
+ "additionalProperties" : {
+ "$ref" : "#/definitions/NamespaceIsolationData"
+ }
+ }
},
"403" : {
"description" : "Don't have admin permission"
},
"404" : {
"description" : "Cluster doesn't exist"
- },
- "412" : {
- "description" : "Peer cluster doesn't exist"
}
}
}
},
- "/namespaces/{property}" : {
+ "/clusters/{cluster}/namespaceIsolationPolicies/brokers" : {
"get" : {
- "tags" : [ "namespaces" ],
- "summary" : "Get the list of all the namespaces for a certain property.",
+ "tags" : [ "clusters" ],
+ "summary" : "Get list of brokers with namespace-isolation policies attached to them",
"description" : "",
- "operationId" : "getPropertyNamespaces",
- "consumes" : [ "application/json" ],
+ "operationId" : "getBrokersWithNamespaceIsolationPolicy",
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
+ "name" : "cluster",
"in" : "path",
"required" : true,
"type" : "string"
@@ -652,37 +712,35 @@
"200" : {
"description" : "successful operation",
"schema" : {
- "type" : "array",
- "uniqueItems" : true,
- "items" : {
- "type" : "string"
- }
+ "$ref" : "#/definitions/BrokerNamespaceIsolationData"
}
},
"403" : {
"description" : "Don't have admin permission"
},
"404" : {
- "description" : "Property doesn't exist"
+ "description" : "Namespace-isolation policies not found"
+ },
+ "412" : {
+ "description" : "Cluster doesn't exist"
}
}
}
},
- "/namespaces/{property}/{cluster}" : {
+ "/clusters/{cluster}/namespaceIsolationPolicies/brokers/{broker}" : {
"get" : {
- "tags" : [ "namespaces" ],
- "summary" : "Get the list of all the namespaces for a certain property on single cluster.",
+ "tags" : [ "clusters" ],
+ "summary" : "Get a broker with namespace-isolation policies attached to it",
"description" : "",
- "operationId" : "getNamespacesForCluster",
- "consumes" : [ "application/json" ],
+ "operationId" : "getBrokerWithNamespaceIsolationPolicy",
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
+ "name" : "cluster",
"in" : "path",
"required" : true,
"type" : "string"
}, {
- "name" : "cluster",
+ "name" : "broker",
"in" : "path",
"required" : true,
"type" : "string"
@@ -691,42 +749,35 @@
"200" : {
"description" : "successful operation",
"schema" : {
- "type" : "array",
- "uniqueItems" : true,
- "items" : {
- "type" : "string"
- }
+ "$ref" : "#/definitions/BrokerNamespaceIsolationData"
}
},
"403" : {
"description" : "Don't have admin permission"
},
"404" : {
- "description" : "Property or cluster doesn't exist"
+ "description" : "Namespace-isolation policies/ Broker not found"
+ },
+ "412" : {
+ "description" : "Cluster doesn't exist"
}
}
}
},
- "/namespaces/{property}/{cluster}/{namespace}" : {
+ "/clusters/{cluster}/namespaceIsolationPolicies/{policyName}" : {
"get" : {
- "tags" : [ "namespaces" ],
- "summary" : "Get the dump all the policies specified for a namespace.",
+ "tags" : [ "clusters" ],
+ "summary" : "Get a single namespace isolation policy assigned in the cluster",
"description" : "",
- "operationId" : "getPolicies",
- "consumes" : [ "application/json" ],
+ "operationId" : "getNamespaceIsolationPolicy",
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
- "in" : "path",
- "required" : true,
- "type" : "string"
- }, {
"name" : "cluster",
"in" : "path",
"required" : true,
"type" : "string"
}, {
- "name" : "namespace",
+ "name" : "policyName",
"in" : "path",
"required" : true,
"type" : "string"
@@ -735,170 +786,1692 @@
"200" : {
"description" : "successful operation",
"schema" : {
- "$ref" : "#/definitions/Policies"
+ "$ref" : "#/definitions/NamespaceIsolationData"
}
},
"403" : {
"description" : "Don't have admin permission"
},
"404" : {
- "description" : "Property or cluster or namespace doesn't exist"
+ "description" : "Policy doesn't exist"
+ },
+ "412" : {
+ "description" : "Cluster doesn't exist"
}
}
},
- "put" : {
- "tags" : [ "namespaces" ],
- "summary" : "Creates a new empty namespace with no policies attached.",
+ "post" : {
+ "tags" : [ "clusters" ],
+ "summary" : "Set namespace isolation policy",
"description" : "",
- "operationId" : "createNamespace",
- "consumes" : [ "application/json" ],
+ "operationId" : "setNamespaceIsolationPolicy",
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
- "in" : "path",
- "required" : true,
- "type" : "string"
- }, {
"name" : "cluster",
"in" : "path",
"required" : true,
"type" : "string"
}, {
- "name" : "namespace",
+ "name" : "policyName",
"in" : "path",
"required" : true,
"type" : "string"
} ],
"responses" : {
"403" : {
- "description" : "Don't have admin permission"
- },
- "404" : {
- "description" : "Property or cluster or namespace doesn't exist"
- },
- "409" : {
- "description" : "Namespace already exists"
+ "description" : "Don't have admin permission or plicy is read only"
},
"412" : {
- "description" : "Namespace name is not valid"
+ "description" : "Cluster doesn't exist"
}
}
},
"delete" : {
- "tags" : [ "namespaces" ],
- "summary" : "Delete a namespace and all the destinations under it.",
+ "tags" : [ "clusters" ],
+ "summary" : "Delete namespace isolation policy",
"description" : "",
- "operationId" : "deleteNamespace",
- "consumes" : [ "application/json" ],
+ "operationId" : "deleteNamespaceIsolationPolicy",
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
- "in" : "path",
- "required" : true,
- "type" : "string"
- }, {
"name" : "cluster",
"in" : "path",
"required" : true,
"type" : "string"
}, {
- "name" : "namespace",
+ "name" : "policyName",
"in" : "path",
"required" : true,
"type" : "string"
- }, {
- "name" : "authoritative",
- "in" : "query",
- "required" : false,
- "type" : "boolean",
- "default" : false
} ],
"responses" : {
"403" : {
- "description" : "Don't have admin permission"
- },
- "404" : {
- "description" : "Property or cluster or namespace doesn't exist"
+ "description" : "Don't have admin permission or plicy is read only"
},
- "409" : {
- "description" : "Namespace is not empty"
+ "412" : {
+ "description" : "Cluster doesn't exist"
}
}
}
},
- "/namespaces/{property}/{cluster}/{namespace}/backlogQuota" : {
- "post" : {
- "tags" : [ "namespaces" ],
- "summary" : " Set a backlog quota for all the destinations on a namespace.",
+ "/clusters/{cluster}/peers" : {
+ "get" : {
+ "tags" : [ "clusters" ],
+ "summary" : "Get the peer-cluster data for the specified cluster.",
"description" : "",
- "operationId" : "setBacklogQuota",
- "consumes" : [ "application/json" ],
+ "operationId" : "getPeerCluster",
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
- "in" : "path",
- "required" : true,
- "type" : "string"
- }, {
"name" : "cluster",
"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" ]
} ],
"responses" : {
+ "200" : {
+ "description" : "successful operation",
+ "schema" : {
+ "type" : "array",
+ "uniqueItems" : true,
+ "items" : {
+ "type" : "object"
+ }
+ }
+ },
"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"
+ "description" : "Cluster doesn't exist"
}
}
},
- "delete" : {
- "tags" : [ "namespaces" ],
- "summary" : "Remove a backlog quota policy from a namespace.",
- "description" : "",
- "operationId" : "removeBacklogQuota",
- "consumes" : [ "application/json" ],
+ "post" : {
+ "tags" : [ "clusters" ],
+ "summary" : "Update peer-cluster-list for a cluster.",
+ "description" : "This operation requires Pulsar super-user privileges.",
+ "operationId" : "setPeerClusterNames",
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
+ "name" : "cluster",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ } ],
+ "responses" : {
+ "204" : {
+ "description" : "Cluster has been updated"
+ },
+ "403" : {
+ "description" : "Don't have admin permission"
+ },
+ "404" : {
+ "description" : "Cluster doesn't exist"
+ },
+ "412" : {
+ "description" : "Peer cluster doesn't exist"
+ }
+ }
+ }
+ },
+ "/functions/assignments" : {
+ "get" : {
+ "tags" : [ "functions" ],
+ "summary" : "Fetches information about which Pulsar Functions are assigned to which Pulsar clusters",
+ "description" : "",
+ "operationId" : "getAssignments",
+ "responses" : {
+ "default" : {
+ "description" : "successful operation"
+ }
+ }
+ }
+ },
+ "/functions/cluster" : {
+ "get" : {
+ "tags" : [ "functions" ],
+ "summary" : "Fetches information about the Pulsar cluster running Pulsar Functions",
+ "description" : "",
+ "operationId" : "getCluster",
+ "responses" : {
+ "default" : {
+ "description" : "successful operation"
+ }
+ }
+ }
+ },
+ "/functions/download" : {
+ "get" : {
+ "tags" : [ "functions" ],
+ "summary" : "Downloads Pulsar Function file data",
+ "description" : "",
+ "operationId" : "downloadFunction",
+ "parameters" : [ {
+ "name" : "path",
+ "in" : "query",
+ "required" : false,
+ "type" : "string"
+ } ],
+ "responses" : {
+ "default" : {
+ "description" : "successful operation"
+ }
+ }
+ }
+ },
+ "/functions/upload" : {
+ "post" : {
+ "tags" : [ "functions" ],
+ "summary" : "Uploads Pulsar Function file data",
+ "description" : "",
+ "operationId" : "uploadFunction",
+ "consumes" : [ "multipart/form-data" ],
+ "responses" : {
+ "default" : {
+ "description" : "successful operation"
+ }
+ }
+ }
+ },
+ "/functions/{tenant}/{namespace}" : {
+ "get" : {
+ "tags" : [ "functions" ],
+ "summary" : "Lists all Pulsar Functions currently deployed in a given namespace",
+ "description" : "",
+ "operationId" : "listFunctions",
+ "parameters" : [ {
+ "name" : "tenant",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "namespace",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ } ],
+ "responses" : {
+ "default" : {
+ "description" : "successful operation"
+ }
+ }
+ }
+ },
+ "/functions/{tenant}/{namespace}/{functionName}" : {
+ "get" : {
+ "tags" : [ "functions" ],
+ "summary" : "Fetches information about a Pulsar Function currently running in cluster mode",
+ "description" : "",
+ "operationId" : "getFunctionInfo",
+ "parameters" : [ {
+ "name" : "tenant",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "namespace",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "functionName",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ } ],
+ "responses" : {
+ "default" : {
+ "description" : "successful operation"
+ }
+ }
+ },
+ "post" : {
+ "tags" : [ "functions" ],
+ "summary" : "Creates a new Pulsar Function in cluster mode",
+ "description" : "",
+ "operationId" : "registerFunction",
+ "consumes" : [ "multipart/form-data" ],
+ "parameters" : [ {
+ "name" : "tenant",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "namespace",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "functionName",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ } ],
+ "responses" : {
+ "default" : {
+ "description" : "successful operation"
+ }
+ }
+ },
+ "put" : {
+ "tags" : [ "functions" ],
+ "summary" : "Updates a Pulsar Function currently running in cluster mode",
+ "description" : "",
+ "operationId" : "updateFunction",
+ "consumes" : [ "multipart/form-data" ],
+ "parameters" : [ {
+ "name" : "tenant",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "namespace",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "functionName",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ } ],
+ "responses" : {
+ "default" : {
+ "description" : "successful operation"
+ }
+ }
+ },
+ "delete" : {
+ "tags" : [ "functions" ],
+ "summary" : "Delertes a Pulsar Function currently running in cluster mode",
+ "description" : "",
+ "operationId" : "deregisterFunction",
+ "parameters" : [ {
+ "name" : "tenant",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "namespace",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "functionName",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ } ],
+ "responses" : {
+ "default" : {
+ "description" : "successful operation"
+ }
+ }
+ }
+ },
+ "/functions/{tenant}/{namespace}/{functionName}/status" : {
+ "get" : {
+ "tags" : [ "functions" ],
+ "summary" : "Displays the status of a Pulsar Function running in cluster mode",
+ "description" : "",
+ "operationId" : "getFunctionStatus",
+ "parameters" : [ {
+ "name" : "tenant",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "namespace",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "functionName",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ } ],
+ "responses" : {
+ "default" : {
+ "description" : "successful operation"
+ }
+ }
+ }
+ },
+ "/functions/{tenant}/{namespace}/{functionName}/{instanceId}/status" : {
+ "get" : {
+ "tags" : [ "functions" ],
+ "summary" : "Displays the status of a Pulsar Function instance",
+ "description" : "",
+ "operationId" : "getFunctionInstanceStatus",
+ "parameters" : [ {
+ "name" : "tenant",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "namespace",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "functionName",
"in" : "path",
"required" : true,
"type" : "string"
}, {
+ "name" : "instanceId",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ } ],
+ "responses" : {
+ "default" : {
+ "description" : "successful operation"
+ }
+ }
+ }
+ },
+ "/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 property",
+ "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" : "property",
+ "in" : "query",
+ "required" : false,
+ "type" : "string"
+ } ],
+ "responses" : {
+ "200" : {
+ "description" : "successful operation",
+ "schema" : {
+ "type" : "array",
+ "items" : {
+ "type" : "object"
+ }
+ }
+ },
+ "403" : {
+ "description" : "Don't have admin permission"
+ },
+ "412" : {
+ "description" : "Cluster not exist/Anti-affinity group can't be empty."
+ }
+ }
+ }
+ },
+ "/namespaces/{property}" : {
+ "get" : {
+ "tags" : [ "namespaces" ],
+ "summary" : "Get the list of all the namespaces for a certain property.",
+ "description" : "",
+ "operationId" : "getTenantNamespaces",
+ "consumes" : [ "application/json" ],
+ "produces" : [ "application/json" ],
+ "parameters" : [ {
+ "name" : "property",
+ "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" : "Property doesn't exist"
+ }
+ }
+ }
+ },
+ "/namespaces/{property}/{cluster}/{namespace}/antiAffinity" : {
+ "get" : {
+ "tags" : [ "namespaces" ],
+ "summary" : "Get anti-affinity group of a namespace.",
+ "description" : "",
+ "operationId" : "getNamespaceAntiAffinityGroup",
+ "consumes" : [ "application/json" ],
+ "produces" : [ "application/json" ],
+ "parameters" : [ {
+ "name" : "property",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "cluster",
+ "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" : "Property 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" : "property",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "cluster",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "namespace",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ } ],
+ "responses" : {
+ "403" : {
+ "description" : "Don't have admin permission"
+ },
+ "404" : {
+ "description" : "Property 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" : "property",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "cluster",
+ "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/{property}/{cluster}/{namespace}/maxConsumersPerSubscription" : {
+ "get" : {
+ "tags" : [ "namespaces" ],
+ "summary" : "Get maxConsumersPerSubscription config on a namespace.",
+ "description" : "",
+ "operationId" : "getMaxConsumersPerSubscription",
+ "consumes" : [ "application/json" ],
+ "produces" : [ "application/json" ],
+ "parameters" : [ {
+ "name" : "property",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "cluster",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "namespace",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ } ],
+ "responses" : {
+ "200" : {
+ "description" : "successful operation",
+ "schema" : {
+ "type" : "integer",
+ "format" : "int32"
+ }
+ },
+ "403" : {
+ "description" : "Don't have admin permission"
+ },
+ "404" : {
+ "description" : "Namespace does not exist"
+ }
+ }
+ },
+ "post" : {
+ "tags" : [ "namespaces" ],
+ "summary" : " Set maxConsumersPerSubscription configuration on a namespace.",
+ "description" : "",
+ "operationId" : "setMaxConsumersPerSubscription",
+ "consumes" : [ "application/json" ],
+ "produces" : [ "application/json" ],
+ "parameters" : [ {
+ "name" : "property",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "cluster",
+ "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"
+ },
+ "412" : {
+ "description" : "maxConsumersPerSubscription value is not valid"
+ }
+ }
+ }
+ },
+ "/namespaces/{property}/{cluster}/{namespace}/maxConsumersPerTopic" : {
+ "get" : {
+ "tags" : [ "namespaces" ],
+ "summary" : "Get maxConsumersPerTopic config on a namespace.",
+ "description" : "",
+ "operationId" : "getMaxConsumersPerTopic",
+ "consumes" : [ "application/json" ],
+ "produces" : [ "application/json" ],
+ "parameters" : [ {
+ "name" : "property",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "cluster",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "namespace",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ } ],
+ "responses" : {
+ "200" : {
+ "description" : "successful operation",
+ "schema" : {
+ "type" : "integer",
+ "format" : "int32"
+ }
+ },
+ "403" : {
+ "description" : "Don't have admin permission"
+ },
+ "404" : {
+ "description" : "Namespace does not exist"
+ }
+ }
+ },
+ "post" : {
+ "tags" : [ "namespaces" ],
+ "summary" : " Set maxConsumersPerTopic configuration on a namespace.",
+ "description" : "",
+ "operationId" : "setMaxConsumersPerTopic",
+ "consumes" : [ "application/json" ],
+ "produces" : [ "application/json" ],
+ "parameters" : [ {
+ "name" : "property",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "cluster",
+ "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"
+ },
+ "412" : {
+ "description" : "maxConsumersPerTopic value is not valid"
+ }
+ }
+ }
+ },
+ "/namespaces/{property}/{cluster}/{namespace}/maxProducersPerTopic" : {
+ "get" : {
+ "tags" : [ "namespaces" ],
+ "summary" : "Get maxProducersPerTopic config on a namespace.",
+ "description" : "",
+ "operationId" : "getMaxProducersPerTopic",
+ "consumes" : [ "application/json" ],
+ "produces" : [ "application/json" ],
+ "parameters" : [ {
+ "name" : "property",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "cluster",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "namespace",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ } ],
+ "responses" : {
+ "200" : {
+ "description" : "successful operation",
+ "schema" : {
+ "type" : "integer",
+ "format" : "int32"
+ }
+ },
+ "403" : {
+ "description" : "Don't have admin permission"
+ },
+ "404" : {
+ "description" : "Namespace does not exist"
+ }
+ }
+ },
+ "post" : {
+ "tags" : [ "namespaces" ],
+ "summary" : " Set maxProducersPerTopic configuration on a namespace.",
+ "description" : "",
+ "operationId" : "setMaxProducersPerTopic",
+ "consumes" : [ "application/json" ],
+ "produces" : [ "application/json" ],
+ "parameters" : [ {
+ "name" : "property",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "cluster",
+ "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"
+ },
+ "412" : {
+ "description" : "maxProducersPerTopic value is not valid"
+ }
+ }
+ }
+ },
+ "/namespaces/{property}/{cluster}/{namespace}/subscriptionAuthMode" : {
+ "post" : {
+ "tags" : [ "namespaces" ],
+ "summary" : " Set a subscription auth mode for all the topics on a namespace.",
+ "description" : "",
+ "operationId" : "setSubscriptionAuthMode",
+ "consumes" : [ "application/json" ],
+ "produces" : [ "application/json" ],
+ "parameters" : [ {
+ "name" : "property",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "cluster",
+ "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/{property}/{cluster}/{namespace}/subscriptionDispatchRate" : {
+ "get" : {
+ "tags" : [ "namespaces" ],
+ "summary" : "Get Subscription dispatch-rate configured for the namespace, -1 represents not configured yet",
+ "description" : "",
+ "operationId" : "getSubscriptionDispatchRate",
+ "consumes" : [ "application/json" ],
+ "produces" : [ "application/json" ],
+ "parameters" : [ {
+ "name" : "property",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "cluster",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "namespace",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ } ],
+ "responses" : {
+ "200" : {
+ "description" : "successful operation",
+ "schema" : {
+ "$ref" : "#/definitions/DispatchRate"
+ }
+ },
+ "403" : {
+ "description" : "Don't have admin permission"
+ },
+ "404" : {
+ "description" : "Namespace does not exist"
+ }
+ }
+ },
+ "post" : {
+ "tags" : [ "namespaces" ],
+ "summary" : "Set Subscription dispatch-rate throttling for all topics of the namespace",
+ "description" : "",
+ "operationId" : "setSubscriptionDispatchRate",
+ "consumes" : [ "application/json" ],
+ "produces" : [ "application/json" ],
+ "parameters" : [ {
+ "name" : "property",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "cluster",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "namespace",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ } ],
+ "responses" : {
+ "403" : {
+ "description" : "Don't have admin permission"
+ }
+ }
+ }
+ },
+ "/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"
+ } ],
+ "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" : "authoritative",
+ "in" : "query",
+ "required" : false,
+ "type" : "boolean",
+ "default" : false
+ } ],
+ "responses" : {
+ "403" : {
+ "description" : "Don't have admin permission"
+ },
+ "404" : {
+ "description" : "Tenant or cluster or namespace doesn't exist"
+ },
+ "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"
+ } ],
+ "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}/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" ]
+ } ],
+ "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" ]
+ } ],
+ "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" : {
+ "type" : "object"
+ }
+ }
+ },
+ "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 permission"
+ },
+ "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 permission"
+ },
+ "404" : {
+ "description" : "Namespace does not exist"
+ }
+ }
+ }
+ },
+ "/namespaces/{tenant}/{namespace}/deduplication" : {
+ "post" : {
+ "tags" : [ "namespaces" ],
+ "summary" : "Enable or disable broker side deduplication for all topics in a namespace",
+ "description" : "",
+ "operationId" : "modifyDeduplication",
+ "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}/dispatchRate" : {
+ "get" : {
+ "tags" : [ "namespaces" ],
+ "summary" : "Get dispatch-rate configured for the namespace, -1 represents not configured yet",
+ "description" : "",
+ "operationId" : "getDispatchRate",
+ "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/DispatchRate"
+ }
+ },
+ "403" : {
+ "description" : "Don't have admin permission"
+ },
+ "404" : {
+ "description" : "Namespace does not exist"
+ }
+ }
+ },
+ "post" : {
+ "tags" : [ "namespaces" ],
+ "summary" : "Set dispatch-rate throttling for all topics of the namespace",
+ "description" : "",
+ "operationId" : "setDispatchRate",
+ "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"
+ }
+ }
+ }
+ },
+ "/namespaces/{tenant}/{namespace}/encryptionRequired" : {
+ "post" : {
+ "tags" : [ "namespaces" ],
+ "summary" : "Message encryption is required or not for all topics in a namespace",
+ "description" : "",
+ "operationId" : "modifyEncryptionRequired",
+ "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"
+ },
+ "409" : {
+ "description" : "Concurrent modification"
+ }
+ }
+ }
+ },
+ "/namespaces/{tenant}/{namespace}/maxConsumersPerSubscription" : {
+ "get" : {
+ "tags" : [ "namespaces" ],
+ "summary" : "Get maxConsumersPerSubscription config on a namespace.",
+ "description" : "",
+ "operationId" : "getMaxConsumersPerSubscription",
+ "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" : "int32"
+ }
+ },
+ "403" : {
+ "description" : "Don't have admin permission"
+ },
+ "404" : {
+ "description" : "Namespace does not exist"
+ }
+ }
+ },
+ "post" : {
+ "tags" : [ "namespaces" ],
+ "summary" : " Set maxConsumersPerSubscription configuration on a namespace.",
+ "description" : "",
+ "operationId" : "setMaxConsumersPerSubscription",
+ "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"
+ },
+ "412" : {
+ "description" : "maxConsumersPerSubscription value is not valid"
+ }
+ }
+ }
+ },
+ "/namespaces/{tenant}/{namespace}/maxConsumersPerTopic" : {
+ "get" : {
+ "tags" : [ "namespaces" ],
+ "summary" : "Get maxConsumersPerTopic config on a namespace.",
+ "description" : "",
+ "operationId" : "getMaxConsumersPerTopic",
+ "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" : "int32"
+ }
+ },
+ "403" : {
+ "description" : "Don't have admin permission"
+ },
+ "404" : {
+ "description" : "Namespace does not exist"
+ }
+ }
+ },
+ "post" : {
+ "tags" : [ "namespaces" ],
+ "summary" : " Set maxConsumersPerTopic configuration on a namespace.",
+ "description" : "",
+ "operationId" : "setMaxConsumersPerTopic",
+ "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"
+ },
+ "412" : {
+ "description" : "maxConsumersPerTopic value is not valid"
+ }
+ }
+ }
+ },
+ "/namespaces/{tenant}/{namespace}/maxProducersPerTopic" : {
+ "get" : {
+ "tags" : [ "namespaces" ],
+ "summary" : "Get maxProducersPerTopic config on a namespace.",
+ "description" : "",
+ "operationId" : "getMaxProducersPerTopic",
+ "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" : "int32"
+ }
+ },
+ "403" : {
+ "description" : "Don't have admin permission"
+ },
+ "404" : {
+ "description" : "Namespace does not exist"
+ }
+ }
+ },
+ "post" : {
+ "tags" : [ "namespaces" ],
+ "summary" : " Set maxProducersPerTopic configuration on a namespace.",
+ "description" : "",
+ "operationId" : "setMaxProducersPerTopic",
+ "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" ]
} ],
"responses" : {
"403" : {
@@ -909,25 +2482,23 @@
},
"409" : {
"description" : "Concurrent modification"
+ },
+ "412" : {
+ "description" : "maxProducersPerTopic value is not valid"
}
}
}
},
- "/namespaces/{property}/{cluster}/{namespace}/backlogQuotaMap" : {
+ "/namespaces/{tenant}/{namespace}/messageTTL" : {
"get" : {
"tags" : [ "namespaces" ],
- "summary" : "Get backlog quota map on a namespace.",
+ "summary" : "Get the message TTL for the namespace",
"description" : "",
- "operationId" : "getBacklogQuotaMap",
+ "operationId" : "getNamespaceMessageTTL",
"consumes" : [ "application/json" ],
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
- "in" : "path",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "cluster",
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
@@ -941,36 +2512,27 @@
"200" : {
"description" : "successful operation",
"schema" : {
- "type" : "object",
- "additionalProperties" : {
- "type" : "object"
- }
+ "type" : "integer",
+ "format" : "int32"
}
},
"403" : {
"description" : "Don't have admin permission"
},
"404" : {
- "description" : "Namespace does not exist"
+ "description" : "Tenant or cluster or namespace doesn't exist"
}
}
- }
- },
- "/namespaces/{property}/{cluster}/{namespace}/bundles" : {
- "get" : {
+ },
+ "post" : {
"tags" : [ "namespaces" ],
- "summary" : "Get the bundles split data.",
+ "summary" : "Set message TTL in seconds for namespace",
"description" : "",
- "operationId" : "getBundlesData",
+ "operationId" : "setNamespaceMessageTTL",
"consumes" : [ "application/json" ],
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
- "in" : "path",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "cluster",
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
@@ -981,34 +2543,28 @@
"type" : "string"
} ],
"responses" : {
- "200" : {
- "description" : "successful operation",
- "schema" : {
- "$ref" : "#/definitions/BundlesData"
- }
- },
"403" : {
"description" : "Don't have admin permission"
},
"404" : {
- "description" : "Property or cluster or namespace doesn't exist"
+ "description" : "Tenant or cluster or namespace doesn't exist"
},
"412" : {
- "description" : "Namespace is not setup to split in bundles"
+ "description" : "Invalid TTL"
}
}
}
},
- "/namespaces/{property}/{cluster}/{namespace}/clearBacklog" : {
- "post" : {
+ "/namespaces/{tenant}/{namespace}/permissions" : {
+ "get" : {
"tags" : [ "namespaces" ],
- "summary" : "Clear backlog for all destinations on a namespace.",
+ "summary" : "Retrieve the permissions for a namespace.",
"description" : "",
- "operationId" : "clearNamespaceBacklog",
+ "operationId" : "getPermissions",
"consumes" : [ "application/json" ],
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
@@ -1022,38 +2578,39 @@
"in" : "path",
"required" : true,
"type" : "string"
- }, {
- "name" : "authoritative",
- "in" : "query",
- "required" : false,
- "type" : "boolean",
- "default" : false
} ],
"responses" : {
+ "200" : {
+ "description" : "successful operation",
+ "schema" : {
+ "type" : "object",
+ "additionalProperties" : {
+ "type" : "object"
+ }
+ }
+ },
"403" : {
"description" : "Don't have admin permission"
},
"404" : {
- "description" : "Namespace does not exist"
+ "description" : "Tenant or cluster or namespace doesn't exist"
+ },
+ "409" : {
+ "description" : "Namespace is not empty"
}
}
}
},
- "/namespaces/{property}/{cluster}/{namespace}/clearBacklog/{subscription}" : {
+ "/namespaces/{tenant}/{namespace}/permissions/{role}" : {
"post" : {
"tags" : [ "namespaces" ],
- "summary" : "Clear backlog for a given subscription on all destinations on a namespace.",
+ "summary" : "Grant a new permission to a role on a namespace.",
"description" : "",
- "operationId" : "clearNamespaceBacklogForSubscription",
+ "operationId" : "grantPermissionOnNamespace",
"consumes" : [ "application/json" ],
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
- "in" : "path",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "cluster",
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
@@ -1063,47 +2620,42 @@
"required" : true,
"type" : "string"
}, {
- "name" : "subscription",
+ "name" : "role",
"in" : "path",
"required" : true,
"type" : "string"
- }, {
- "name" : "authoritative",
- "in" : "query",
- "required" : false,
- "type" : "boolean",
- "default" : false
} ],
"responses" : {
"403" : {
"description" : "Don't have admin permission"
},
"404" : {
- "description" : "Namespace does not exist"
+ "description" : "Tenant or cluster or namespace doesn't exist"
+ },
+ "409" : {
+ "description" : "Concurrent modification"
}
}
- }
- },
- "/namespaces/{property}/{cluster}/{namespace}/deduplication" : {
- "post" : {
+ },
+ "delete" : {
"tags" : [ "namespaces" ],
- "summary" : "Enable or disable broker side deduplication for all topics in a namespace",
+ "summary" : "Revoke all permissions to a role on a namespace.",
"description" : "",
- "operationId" : "modifyDeduplication",
+ "operationId" : "revokePermissionsOnNamespace",
"consumes" : [ "application/json" ],
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
}, {
- "name" : "cluster",
+ "name" : "namespace",
"in" : "path",
"required" : true,
"type" : "string"
}, {
- "name" : "namespace",
+ "name" : "role",
"in" : "path",
"required" : true,
"type" : "string"
@@ -1113,26 +2665,21 @@
"description" : "Don't have admin permission"
},
"404" : {
- "description" : "Property or cluster or namespace doesn't exist"
+ "description" : "Tenant or cluster or namespace doesn't exist"
}
}
}
},
- "/namespaces/{property}/{cluster}/{namespace}/destinations" : {
+ "/namespaces/{tenant}/{namespace}/persistence" : {
"get" : {
"tags" : [ "namespaces" ],
- "summary" : "Get the list of all the destinations under a certain namespace.",
+ "summary" : "Get the persistence configuration for a namespace.",
"description" : "",
- "operationId" : "getDestinations",
+ "operationId" : "getPersistence",
"consumes" : [ "application/json" ],
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
- "in" : "path",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "cluster",
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
@@ -1146,37 +2693,64 @@
"200" : {
"description" : "successful operation",
"schema" : {
- "type" : "array",
- "uniqueItems" : true,
- "items" : {
- "type" : "string"
- }
+ "$ref" : "#/definitions/PersistencePolicies"
}
},
"403" : {
"description" : "Don't have admin permission"
},
"404" : {
- "description" : "Property or cluster or namespace doesn't exist"
+ "description" : "Namespace does not exist"
+ },
+ "409" : {
+ "description" : "Concurrent modification"
}
}
- }
- },
- "/namespaces/{property}/{cluster}/{namespace}/dispatchRate" : {
- "get" : {
+ },
+ "post" : {
"tags" : [ "namespaces" ],
- "summary" : "Get dispatch-rate configured for the namespace, -1 represents not configured yet",
+ "summary" : "Set the persistence configuration for all the topics on a namespace.",
"description" : "",
- "operationId" : "getDispatchRate",
+ "operationId" : "setPersistence",
"consumes" : [ "application/json" ],
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
}, {
- "name" : "cluster",
+ "name" : "namespace",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ } ],
+ "responses" : {
+ "400" : {
+ "description" : "Invalid persistence policies"
+ },
+ "403" : {
+ "description" : "Don't have admin permission"
+ },
+ "404" : {
+ "description" : "Namespace does not exist"
+ },
+ "409" : {
+ "description" : "Concurrent modification"
+ }
+ }
+ }
+ },
+ "/namespaces/{tenant}/{namespace}/replication" : {
+ "get" : {
+ "tags" : [ "namespaces" ],
+ "summary" : "Get the replication clusters for a namespace.",
+ "description" : "",
+ "operationId" : "getNamespaceReplicationClusters",
+ "consumes" : [ "application/json" ],
+ "produces" : [ "application/json" ],
+ "parameters" : [ {
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
@@ -1190,31 +2764,32 @@
"200" : {
"description" : "successful operation",
"schema" : {
- "$ref" : "#/definitions/DispatchRate"
+ "type" : "array",
+ "items" : {
+ "type" : "string"
+ }
}
},
"403" : {
"description" : "Don't have admin permission"
},
"404" : {
- "description" : "Namespace does not exist"
+ "description" : "Tenant or cluster or namespace doesn't exist"
+ },
+ "412" : {
+ "description" : "Namespace is not global"
}
}
},
"post" : {
"tags" : [ "namespaces" ],
- "summary" : "Set dispatch-rate throttling for all topics of the namespace",
+ "summary" : "Set the replication clusters for a namespace.",
"description" : "",
- "operationId" : "setDispatchRate",
+ "operationId" : "setNamespaceReplicationClusters",
"consumes" : [ "application/json" ],
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
- "in" : "path",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "cluster",
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
@@ -1227,25 +2802,29 @@
"responses" : {
"403" : {
"description" : "Don't have admin permission"
+ },
+ "404" : {
+ "description" : "Tenant or cluster or namespace doesn't exist"
+ },
+ "409" : {
+ "description" : "Peer-cluster can't be part of replication-cluster"
+ },
+ "412" : {
+ "description" : "Namespace is not global or invalid cluster ids"
}
}
}
},
- "/namespaces/{property}/{cluster}/{namespace}/messageTTL" : {
+ "/namespaces/{tenant}/{namespace}/retention" : {
"get" : {
"tags" : [ "namespaces" ],
- "summary" : "Get the message TTL for the namespace",
+ "summary" : "Get retention config on a namespace.",
"description" : "",
- "operationId" : "getNamespaceMessageTTL",
+ "operationId" : "getRetention",
"consumes" : [ "application/json" ],
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
- "in" : "path",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "cluster",
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
@@ -1259,32 +2838,26 @@
"200" : {
"description" : "successful operation",
"schema" : {
- "type" : "integer",
- "format" : "int32"
+ "$ref" : "#/definitions/RetentionPolicies"
}
},
"403" : {
"description" : "Don't have admin permission"
},
"404" : {
- "description" : "Property or cluster or namespace doesn't exist"
+ "description" : "Namespace does not exist"
}
}
},
"post" : {
"tags" : [ "namespaces" ],
- "summary" : "Set message TTL in seconds for namespace",
+ "summary" : " Set retention configuration on a namespace.",
"description" : "",
- "operationId" : "setNamespaceMessageTTL",
+ "operationId" : "setRetention",
"consumes" : [ "application/json" ],
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
- "in" : "path",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "cluster",
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
@@ -1299,29 +2872,27 @@
"description" : "Don't have admin permission"
},
"404" : {
- "description" : "Property or cluster or namespace doesn't exist"
+ "description" : "Namespace does not exist"
+ },
+ "409" : {
+ "description" : "Concurrent modification"
},
"412" : {
- "description" : "Invalid TTL"
+ "description" : "Retention Quota must exceed backlog quota"
}
}
}
},
- "/namespaces/{property}/{cluster}/{namespace}/permissions" : {
- "get" : {
+ "/namespaces/{tenant}/{namespace}/subscriptionAuthMode" : {
+ "post" : {
"tags" : [ "namespaces" ],
- "summary" : "Retrieve the permissions for a namespace.",
+ "summary" : " Set a subscription auth mode for all the topics on a namespace.",
"description" : "",
- "operationId" : "getPermissions",
+ "operationId" : "setSubscriptionAuthMode",
"consumes" : [ "application/json" ],
"produces" : [ "application/json" ],
- "parameters" : [ {
- "name" : "property",
- "in" : "path",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "cluster",
+ "parameters" : [ {
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
@@ -1332,42 +2903,28 @@
"type" : "string"
} ],
"responses" : {
- "200" : {
- "description" : "successful operation",
- "schema" : {
- "type" : "object",
- "additionalProperties" : {
- "type" : "object"
- }
- }
- },
"403" : {
"description" : "Don't have admin permission"
},
"404" : {
- "description" : "Property or cluster or namespace doesn't exist"
+ "description" : "Namespace does not exist"
},
"409" : {
- "description" : "Namespace is not empty"
+ "description" : "Concurrent modification"
}
}
}
},
- "/namespaces/{property}/{cluster}/{namespace}/permissions/{role}" : {
- "post" : {
+ "/namespaces/{tenant}/{namespace}/subscriptionDispatchRate" : {
+ "get" : {
"tags" : [ "namespaces" ],
- "summary" : "Grant a new permission to a role on a namespace.",
+ "summary" : "Get Subscription dispatch-rate configured for the namespace, -1 represents not configured yet",
"description" : "",
- "operationId" : "grantPermissionOnNamespace",
+ "operationId" : "getSubscriptionDispatchRate",
"consumes" : [ "application/json" ],
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
- "in" : "path",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "cluster",
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
@@ -1376,38 +2933,31 @@
"in" : "path",
"required" : true,
"type" : "string"
- }, {
- "name" : "role",
- "in" : "path",
- "required" : true,
- "type" : "string"
} ],
"responses" : {
+ "200" : {
+ "description" : "successful operation",
+ "schema" : {
+ "$ref" : "#/definitions/DispatchRate"
+ }
+ },
"403" : {
"description" : "Don't have admin permission"
},
"404" : {
- "description" : "Property or cluster or namespace doesn't exist"
- },
- "409" : {
- "description" : "Concurrent modification"
+ "description" : "Namespace does not exist"
}
}
},
- "delete" : {
+ "post" : {
"tags" : [ "namespaces" ],
- "summary" : "Revoke all permissions to a role on a namespace.",
+ "summary" : "Set Subscription dispatch-rate throttling for all topics of the namespace",
"description" : "",
- "operationId" : "revokePermissionsOnNamespace",
+ "operationId" : "setSubscriptionDispatchRate",
"consumes" : [ "application/json" ],
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
- "in" : "path",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "cluster",
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
@@ -1416,37 +2966,24 @@
"in" : "path",
"required" : true,
"type" : "string"
- }, {
- "name" : "role",
- "in" : "path",
- "required" : true,
- "type" : "string"
} ],
"responses" : {
"403" : {
"description" : "Don't have admin permission"
- },
- "404" : {
- "description" : "Property or cluster or namespace doesn't exist"
}
}
}
},
- "/namespaces/{property}/{cluster}/{namespace}/persistence" : {
+ "/namespaces/{tenant}/{namespace}/topics" : {
"get" : {
"tags" : [ "namespaces" ],
- "summary" : "Get the persistence configuration for a namespace.",
+ "summary" : "Get the list of all the topics under a certain namespace.",
"description" : "",
- "operationId" : "getPersistence",
+ "operationId" : "getTopics",
"consumes" : [ "application/json" ],
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
- "in" : "path",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "cluster",
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
@@ -1460,34 +2997,32 @@
"200" : {
"description" : "successful operation",
"schema" : {
- "$ref" : "#/definitions/PersistencePolicies"
+ "type" : "array",
+ "uniqueItems" : true,
+ "items" : {
+ "type" : "string"
+ }
}
},
"403" : {
"description" : "Don't have admin permission"
},
"404" : {
- "description" : "Namespace does not exist"
- },
- "409" : {
- "description" : "Concurrent modification"
+ "description" : "Tenant or cluster or namespace doesn't exist"
}
}
- },
- "post" : {
+ }
+ },
+ "/namespaces/{tenant}/{namespace}/unload" : {
+ "put" : {
"tags" : [ "namespaces" ],
- "summary" : "Set the persistence configuration for all the destinations on a namespace.",
- "description" : "",
- "operationId" : "setPersistence",
+ "summary" : "Unload namespace",
+ "description" : "Unload an active namespace from the current broker serving it. Performing this operation will let the brokerremoves all producers, consumers, and connections using this namespace, and close all topics (includingtheir persistent store). During that operation, the namespace is marked as tentatively unavailable until thebroker completes the unloading action. This operation requires strictly super user privileges, since it wouldresult in non-persistent message loss a [...]
+ "operationId" : "unloadNamespace",
"consumes" : [ "application/json" ],
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
- "in" : "path",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "cluster",
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
@@ -1498,31 +3033,28 @@
"type" : "string"
} ],
"responses" : {
- "400" : {
- "description" : "Invalid persistence policies"
- },
"403" : {
"description" : "Don't have admin permission"
},
"404" : {
- "description" : "Namespace does not exist"
+ "description" : "Tenant or namespace doesn't exist"
},
- "409" : {
- "description" : "Concurrent modification"
+ "412" : {
+ "description" : "Namespace is already unloaded or Namespace has bundles activated"
}
}
}
},
- "/namespaces/{property}/{cluster}/{namespace}/replication" : {
- "get" : {
+ "/namespaces/{tenant}/{namespace}/unsubscribe/{subscription}" : {
+ "post" : {
"tags" : [ "namespaces" ],
- "summary" : "Get the replication clusters for a namespace.",
+ "summary" : "Unsubscribes the given subscription on all topics on a namespace.",
"description" : "",
- "operationId" : "getNamespaceReplicationClusters",
+ "operationId" : "unsubscribeNamespace",
"consumes" : [ "application/json" ],
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
@@ -1536,98 +3068,102 @@
"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" : {
- "200" : {
- "description" : "successful operation",
- "schema" : {
- "type" : "array",
- "items" : {
- "type" : "string"
- }
- }
- },
"403" : {
"description" : "Don't have admin permission"
},
"404" : {
- "description" : "Property or cluster or namespace doesn't exist"
- },
- "412" : {
- "description" : "Namespace is not global"
+ "description" : "Namespace does not exist"
}
}
- },
- "post" : {
+ }
+ },
+ "/namespaces/{tenant}/{namespace}/{bundle}" : {
+ "delete" : {
"tags" : [ "namespaces" ],
- "summary" : "Set the replication clusters for a namespace.",
+ "summary" : "Delete a namespace bundle and all the topics under it.",
"description" : "",
- "operationId" : "setNamespaceReplicationClusters",
+ "operationId" : "deleteNamespaceBundle",
"consumes" : [ "application/json" ],
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
}, {
- "name" : "cluster",
+ "name" : "namespace",
"in" : "path",
"required" : true,
"type" : "string"
}, {
- "name" : "namespace",
+ "name" : "bundle",
"in" : "path",
"required" : true,
"type" : "string"
+ }, {
+ "name" : "authoritative",
+ "in" : "query",
+ "required" : false,
+ "type" : "boolean",
+ "default" : false
} ],
"responses" : {
"403" : {
"description" : "Don't have admin permission"
},
"404" : {
- "description" : "Property or cluster or namespace doesn't exist"
+ "description" : "Tenant or cluster or namespace doesn't exist"
},
"409" : {
- "description" : "Peer-cluster can't be part of replication-cluster"
- },
- "412" : {
- "description" : "Namespace is not global or invalid cluster ids"
+ "description" : "Namespace bundle is not empty"
}
}
}
},
- "/namespaces/{property}/{cluster}/{namespace}/retention" : {
- "get" : {
+ "/namespaces/{tenant}/{namespace}/{bundle}/clearBacklog" : {
+ "post" : {
"tags" : [ "namespaces" ],
- "summary" : "Get retention config on a namespace.",
+ "summary" : "Clear backlog for all topics on a namespace bundle.",
"description" : "",
- "operationId" : "getRetention",
+ "operationId" : "clearNamespaceBundleBacklog",
"consumes" : [ "application/json" ],
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
}, {
- "name" : "cluster",
+ "name" : "namespace",
"in" : "path",
"required" : true,
"type" : "string"
}, {
- "name" : "namespace",
+ "name" : "bundle",
"in" : "path",
"required" : true,
"type" : "string"
+ }, {
+ "name" : "authoritative",
+ "in" : "query",
+ "required" : false,
+ "type" : "boolean",
+ "default" : false
} ],
"responses" : {
- "200" : {
- "description" : "successful operation",
- "schema" : {
- "$ref" : "#/definitions/RetentionPolicies"
- }
- },
"403" : {
"description" : "Don't have admin permission"
},
@@ -1635,29 +3171,42 @@
"description" : "Namespace does not exist"
}
}
- },
+ }
+ },
+ "/namespaces/{tenant}/{namespace}/{bundle}/clearBacklog/{subscription}" : {
"post" : {
"tags" : [ "namespaces" ],
- "summary" : " Set retention configuration on a namespace.",
+ "summary" : "Clear backlog for a given subscription on all topics on a namespace bundle.",
"description" : "",
- "operationId" : "setRetention",
+ "operationId" : "clearNamespaceBundleBacklogForSubscription",
"consumes" : [ "application/json" ],
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
}, {
- "name" : "cluster",
+ "name" : "namespace",
"in" : "path",
"required" : true,
"type" : "string"
}, {
- "name" : "namespace",
+ "name" : "subscription",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "bundle",
"in" : "path",
"required" : true,
"type" : "string"
+ }, {
+ "name" : "authoritative",
+ "in" : "query",
+ "required" : false,
+ "type" : "boolean",
+ "default" : false
} ],
"responses" : {
"403" : {
@@ -1665,68 +3214,63 @@
},
"404" : {
"description" : "Namespace does not exist"
- },
- "409" : {
- "description" : "Concurrent modification"
- },
- "412" : {
- "description" : "Retention Quota must exceed backlog quota"
}
}
}
},
- "/namespaces/{property}/{cluster}/{namespace}/unload" : {
+ "/namespaces/{tenant}/{namespace}/{bundle}/split" : {
"put" : {
"tags" : [ "namespaces" ],
- "summary" : "Unload namespace",
- "description" : "Unload an active namespace from the current broker serving it. Performing this operation will let the brokerremoves all producers, consumers, and connections using this namespace, and close all destinations (includingtheir persistent store). During that operation, the namespace is marked as tentatively unavailable until thebroker completes the unloading action. This operation requires strictly super user privileges, since it wouldresult in non-persistent message [...]
- "operationId" : "unloadNamespace",
+ "summary" : "Split a namespace bundle",
+ "description" : "",
+ "operationId" : "splitNamespaceBundle",
"consumes" : [ "application/json" ],
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
}, {
- "name" : "cluster",
+ "name" : "namespace",
"in" : "path",
"required" : true,
"type" : "string"
}, {
- "name" : "namespace",
+ "name" : "bundle",
"in" : "path",
"required" : true,
"type" : "string"
+ }, {
+ "name" : "authoritative",
+ "in" : "query",
+ "required" : false,
+ "type" : "boolean",
+ "default" : false
+ }, {
+ "name" : "unload",
+ "in" : "query",
+ "required" : false,
+ "type" : "boolean",
+ "default" : false
} ],
"responses" : {
"403" : {
"description" : "Don't have admin permission"
- },
- "404" : {
- "description" : "Property or cluster or namespace doesn't exist"
- },
- "412" : {
- "description" : "Namespace is already unloaded or Namespace has bundles activated"
}
}
}
},
- "/namespaces/{property}/{cluster}/{namespace}/unsubscribe/{subscription}" : {
- "post" : {
+ "/namespaces/{tenant}/{namespace}/{bundle}/unload" : {
+ "put" : {
"tags" : [ "namespaces" ],
- "summary" : "Unsubscribes the given subscription on all destinations on a namespace.",
+ "summary" : "Unload a namespace bundle",
"description" : "",
- "operationId" : "unsubscribeNamespace",
+ "operationId" : "unloadNamespaceBundle",
"consumes" : [ "application/json" ],
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
- "in" : "path",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "cluster",
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
@@ -1736,7 +3280,7 @@
"required" : true,
"type" : "string"
}, {
- "name" : "subscription",
+ "name" : "bundle",
"in" : "path",
"required" : true,
"type" : "string"
@@ -1750,33 +3294,30 @@
"responses" : {
"403" : {
"description" : "Don't have admin permission"
- },
- "404" : {
- "description" : "Namespace does not exist"
}
}
}
},
- "/namespaces/{property}/{cluster}/{namespace}/{bundle}" : {
- "delete" : {
+ "/namespaces/{tenant}/{namespace}/{bundle}/unsubscribe/{subscription}" : {
+ "post" : {
"tags" : [ "namespaces" ],
- "summary" : "Delete a namespace bundle and all the destinations under it.",
+ "summary" : "Unsubscribes the given subscription on all topics on a namespace bundle.",
"description" : "",
- "operationId" : "deleteNamespaceBundle",
+ "operationId" : "unsubscribeNamespaceBundle",
"consumes" : [ "application/json" ],
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
}, {
- "name" : "cluster",
+ "name" : "namespace",
"in" : "path",
"required" : true,
"type" : "string"
}, {
- "name" : "namespace",
+ "name" : "subscription",
"in" : "path",
"required" : true,
"type" : "string"
@@ -1797,21 +3338,17 @@
"description" : "Don't have admin permission"
},
"404" : {
- "description" : "Property or cluster or namespace doesn't exist"
- },
- "409" : {
- "description" : "Namespace bundle is not empty"
+ "description" : "Namespace does not exist"
}
}
}
},
- "/namespaces/{property}/{cluster}/{namespace}/{bundle}/clearBacklog" : {
- "post" : {
- "tags" : [ "namespaces" ],
- "summary" : "Clear backlog for all destinations on a namespace bundle.",
+ "/non-persistent/{property}/{cluster}/{namespace}" : {
+ "get" : {
+ "tags" : [ "non-persistent topic" ],
+ "summary" : "Get the list of non-persistent topics under a namespace.",
"description" : "",
- "operationId" : "clearNamespaceBundleBacklog",
- "consumes" : [ "application/json" ],
+ "operationId" : "getList",
"produces" : [ "application/json" ],
"parameters" : [ {
"name" : "property",
@@ -1828,35 +3365,32 @@
"in" : "path",
"required" : true,
"type" : "string"
- }, {
- "name" : "bundle",
- "in" : "path",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "authoritative",
- "in" : "query",
- "required" : false,
- "type" : "boolean",
- "default" : false
} ],
"responses" : {
+ "200" : {
+ "description" : "successful operation",
+ "schema" : {
+ "type" : "array",
+ "items" : {
+ "type" : "string"
+ }
+ }
+ },
"403" : {
"description" : "Don't have admin permission"
},
"404" : {
- "description" : "Namespace does not exist"
+ "description" : "Namespace doesn't exist"
}
}
}
},
- "/namespaces/{property}/{cluster}/{namespace}/{bundle}/clearBacklog/{subscription}" : {
- "post" : {
- "tags" : [ "namespaces" ],
- "summary" : "Clear backlog for a given subscription on all destinations on a namespace bundle.",
+ "/non-persistent/{property}/{cluster}/{namespace}/{bundle}" : {
+ "get" : {
+ "tags" : [ "non-persistent topic" ],
+ "summary" : "Get the list of non-persistent topics under a namespace bundle.",
"description" : "",
- "operationId" : "clearNamespaceBundleBacklogForSubscription",
- "consumes" : [ "application/json" ],
+ "operationId" : "getListFromBundle",
"produces" : [ "application/json" ],
"parameters" : [ {
"name" : "property",
@@ -1874,39 +3408,36 @@
"required" : true,
"type" : "string"
}, {
- "name" : "subscription",
- "in" : "path",
- "required" : true,
- "type" : "string"
- }, {
"name" : "bundle",
"in" : "path",
"required" : true,
"type" : "string"
- }, {
- "name" : "authoritative",
- "in" : "query",
- "required" : false,
- "type" : "boolean",
- "default" : false
} ],
"responses" : {
+ "200" : {
+ "description" : "successful operation",
+ "schema" : {
+ "type" : "array",
+ "items" : {
+ "type" : "string"
+ }
+ }
+ },
"403" : {
"description" : "Don't have admin permission"
},
"404" : {
- "description" : "Namespace does not exist"
+ "description" : "Namespace doesn't exist"
}
}
}
},
- "/namespaces/{property}/{cluster}/{namespace}/{bundle}/split" : {
- "put" : {
- "tags" : [ "namespaces" ],
- "summary" : "Split a namespace bundle",
+ "/non-persistent/{property}/{cluster}/{namespace}/{topic}/compaction" : {
+ "get" : {
+ "tags" : [ "non-persistent topic" ],
+ "summary" : "Get the status of a compaction operation for a topic.",
"description" : "",
- "operationId" : "splitNamespaceBundle",
- "consumes" : [ "application/json" ],
+ "operationId" : "compactionStatus",
"produces" : [ "application/json" ],
"parameters" : [ {
"name" : "property",
@@ -1924,7 +3455,7 @@
"required" : true,
"type" : "string"
}, {
- "name" : "bundle",
+ "name" : "topic",
"in" : "path",
"required" : true,
"type" : "string"
@@ -1934,27 +3465,30 @@
"required" : false,
"type" : "boolean",
"default" : false
- }, {
- "name" : "unload",
- "in" : "query",
- "required" : false,
- "type" : "boolean",
- "default" : false
} ],
"responses" : {
+ "200" : {
+ "description" : "successful operation",
+ "schema" : {
+ "$ref" : "#/definitions/CompactionStatus"
+ }
+ },
"403" : {
"description" : "Don't have admin permission"
+ },
+ "404" : {
+ "description" : "Topic does not exist, or compaction hasn't run"
+ },
+ "405" : {
+ "description" : "Operation not allowed on persistent topic"
}
}
- }
- },
- "/namespaces/{property}/{cluster}/{namespace}/{bundle}/unload" : {
+ },
"put" : {
- "tags" : [ "namespaces" ],
- "summary" : "Unload a namespace bundle",
+ "tags" : [ "non-persistent topic" ],
+ "summary" : "Trigger a compaction operation on a topic.",
"description" : "",
- "operationId" : "unloadNamespaceBundle",
- "consumes" : [ "application/json" ],
+ "operationId" : "compact",
"produces" : [ "application/json" ],
"parameters" : [ {
"name" : "property",
@@ -1972,7 +3506,7 @@
"required" : true,
"type" : "string"
}, {
- "name" : "bundle",
+ "name" : "topic",
"in" : "path",
"required" : true,
"type" : "string"
@@ -1986,17 +3520,25 @@
"responses" : {
"403" : {
"description" : "Don't have admin permission"
+ },
+ "404" : {
+ "description" : "Topic does not exist"
+ },
+ "405" : {
+ "description" : "Operation not allowed on persistent topic"
+ },
+ "409" : {
+ "description" : "Compaction already running"
}
}
}
},
- "/namespaces/{property}/{cluster}/{namespace}/{bundle}/unsubscribe/{subscription}" : {
- "post" : {
- "tags" : [ "namespaces" ],
- "summary" : "Unsubscribes the given subscription on all destinations on a namespace bundle.",
- "description" : "",
- "operationId" : "unsubscribeNamespaceBundle",
- "consumes" : [ "application/json" ],
+ "/non-persistent/{property}/{cluster}/{namespace}/{topic}/subscription/{subscriptionName}" : {
+ "put" : {
+ "tags" : [ "non-persistent topic" ],
+ "summary" : "Reset subscription to message position closest to given position.",
+ "description" : "Creates a subscription on the topic at the specified message id",
+ "operationId" : "createSubscription",
"produces" : [ "application/json" ],
"parameters" : [ {
"name" : "property",
@@ -2014,12 +3556,12 @@
"required" : true,
"type" : "string"
}, {
- "name" : "subscription",
+ "name" : "topic",
"in" : "path",
"required" : true,
"type" : "string"
}, {
- "name" : "bundle",
+ "name" : "subscriptionName",
"in" : "path",
"required" : true,
"type" : "string"
@@ -2035,25 +3577,60 @@
"description" : "Don't have admin permission"
},
"404" : {
- "description" : "Namespace does not exist"
+ "description" : "Topic/Subscription does not exist"
+ },
+ "405" : {
+ "description" : "Not supported for partitioned topics"
}
}
}
},
- "/non-persistent/{property}/{cluster}/{namespace}" : {
+ "/non-persistent/{tenant}/{namespace}" : {
"get" : {
"tags" : [ "non-persistent topic" ],
- "summary" : "Get the list of destinations under a namespace.",
+ "summary" : "Get the list of non-persistent topics under a namespace.",
"description" : "",
"operationId" : "getList",
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
}, {
- "name" : "cluster",
+ "name" : "namespace",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ } ],
+ "responses" : {
+ "200" : {
+ "description" : "successful operation",
+ "schema" : {
+ "type" : "array",
+ "items" : {
+ "type" : "string"
+ }
+ }
+ },
+ "403" : {
+ "description" : "Don't have admin permission"
+ },
+ "404" : {
+ "description" : "Namespace doesn't exist"
+ }
+ }
+ }
+ },
+ "/non-persistent/{tenant}/{namespace}/partitioned" : {
+ "get" : {
+ "tags" : [ "non-persistent topic" ],
+ "summary" : "Get the list of partitioned topics under a namespace.",
+ "description" : "",
+ "operationId" : "getPartitionedTopicList",
+ "produces" : [ "application/json" ],
+ "parameters" : [ {
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
@@ -2082,25 +3659,25 @@
}
}
},
- "/non-persistent/{property}/{cluster}/{namespace}/partitioned" : {
+ "/non-persistent/{tenant}/{namespace}/{bundle}" : {
"get" : {
"tags" : [ "non-persistent topic" ],
- "summary" : "Get the list of partitioned topics under a namespace.",
+ "summary" : "Get the list of non-persistent topics under a namespace bundle.",
"description" : "",
- "operationId" : "getPartitionedTopicList",
+ "operationId" : "getListFromBundle",
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
}, {
- "name" : "cluster",
+ "name" : "namespace",
"in" : "path",
"required" : true,
"type" : "string"
}, {
- "name" : "namespace",
+ "name" : "bundle",
"in" : "path",
"required" : true,
"type" : "string"
@@ -2124,7 +3701,7 @@
}
}
},
- "/non-persistent/{property}/{cluster}/{namespace}/{destination}" : {
+ "/non-persistent/{tenant}/{namespace}/{topic}" : {
"delete" : {
"tags" : [ "non-persistent topic" ],
"summary" : "Delete a topic.",
@@ -2132,12 +3709,7 @@
"operationId" : "deleteTopic",
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
- "in" : "path",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "cluster",
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
@@ -2147,7 +3719,7 @@
"required" : true,
"type" : "string"
}, {
- "name" : "destination",
+ "name" : "topic",
"in" : "path",
"required" : true,
"type" : "string"
@@ -2171,7 +3743,7 @@
}
}
},
- "/non-persistent/{property}/{cluster}/{namespace}/{destination}/all_subscription/expireMessages/{expireTimeInSeconds}" : {
+ "/non-persistent/{tenant}/{namespace}/{topic}/all_subscription/expireMessages/{expireTimeInSeconds}" : {
"post" : {
"tags" : [ "non-persistent topic" ],
"summary" : "Expire messages on all subscriptions of topic.",
@@ -2179,12 +3751,7 @@
"operationId" : "expireMessagesForAllSubscriptions",
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
- "in" : "path",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "cluster",
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
@@ -2194,7 +3761,7 @@
"required" : true,
"type" : "string"
}, {
- "name" : "destination",
+ "name" : "topic",
"in" : "path",
"required" : true,
"type" : "string"
@@ -2221,7 +3788,7 @@
}
}
},
- "/non-persistent/{property}/{cluster}/{namespace}/{destination}/backlog" : {
+ "/non-persistent/{tenant}/{namespace}/{topic}/backlog" : {
"get" : {
"tags" : [ "non-persistent topic" ],
"summary" : "Get estimated backlog for offline topic.",
@@ -2229,12 +3796,7 @@
"operationId" : "getBacklog",
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
- "in" : "path",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "cluster",
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
@@ -2244,7 +3806,7 @@
"required" : true,
"type" : "string"
}, {
- "name" : "destination",
+ "name" : "topic",
"in" : "path",
"required" : true,
"type" : "string"
@@ -2271,20 +3833,61 @@
}
}
},
- "/non-persistent/{property}/{cluster}/{namespace}/{destination}/internal-info" : {
+ "/non-persistent/{tenant}/{namespace}/{topic}/compaction" : {
"get" : {
"tags" : [ "non-persistent topic" ],
- "summary" : "Get the internal stats for the topic.",
+ "summary" : "Get the status of a compaction operation for a topic.",
"description" : "",
- "operationId" : "getManagedLedgerInfo",
+ "operationId" : "compactionStatus",
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
}, {
- "name" : "cluster",
+ "name" : "namespace",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "topic",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "authoritative",
+ "in" : "query",
+ "required" : false,
+ "type" : "boolean",
+ "default" : false
+ } ],
+ "responses" : {
+ "200" : {
+ "description" : "successful operation",
+ "schema" : {
+ "$ref" : "#/definitions/CompactionStatus"
+ }
+ },
+ "403" : {
+ "description" : "Don't have admin permission"
+ },
+ "404" : {
+ "description" : "Topic does not exist, or compaction hasn't run"
+ },
+ "405" : {
+ "description" : "Operation not allowed on persistent topic"
+ }
+ }
+ },
+ "put" : {
+ "tags" : [ "non-persistent topic" ],
+ "summary" : "Trigger a compaction operation on a topic.",
+ "description" : "",
+ "operationId" : "compact",
+ "produces" : [ "application/json" ],
+ "parameters" : [ {
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
@@ -2294,10 +3897,16 @@
"required" : true,
"type" : "string"
}, {
- "name" : "destination",
+ "name" : "topic",
"in" : "path",
"required" : true,
"type" : "string"
+ }, {
+ "name" : "authoritative",
+ "in" : "query",
+ "required" : false,
+ "type" : "boolean",
+ "default" : false
} ],
"responses" : {
"403" : {
@@ -2305,24 +3914,58 @@
},
"404" : {
"description" : "Topic does not exist"
+ },
+ "405" : {
+ "description" : "Operation not allowed on persistent topic"
+ },
+ "409" : {
+ "description" : "Compaction already running"
}
}
}
},
- "/non-persistent/{property}/{cluster}/{namespace}/{destination}/internalStats" : {
+ "/non-persistent/{tenant}/{namespace}/{topic}/internal-info" : {
"get" : {
"tags" : [ "non-persistent topic" ],
"summary" : "Get the internal stats for the topic.",
"description" : "",
- "operationId" : "getInternalStats",
+ "operationId" : "getManagedLedgerInfo",
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
}, {
- "name" : "cluster",
+ "name" : "namespace",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "topic",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ } ],
+ "responses" : {
+ "403" : {
+ "description" : "Don't have admin permission"
+ },
+ "404" : {
+ "description" : "Topic does not exist"
+ }
+ }
+ }
+ },
+ "/non-persistent/{tenant}/{namespace}/{topic}/internalStats" : {
+ "get" : {
+ "tags" : [ "non-persistent topic" ],
+ "summary" : "Get the internal stats for the topic.",
+ "description" : "",
+ "operationId" : "getInternalStats",
+ "produces" : [ "application/json" ],
+ "parameters" : [ {
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
@@ -2332,7 +3975,7 @@
"required" : true,
"type" : "string"
}, {
- "name" : "destination",
+ "name" : "topic",
"in" : "path",
"required" : true,
"type" : "string"
@@ -2359,7 +4002,7 @@
}
}
},
- "/non-persistent/{property}/{cluster}/{namespace}/{destination}/partitioned-stats" : {
+ "/non-persistent/{tenant}/{namespace}/{topic}/partitioned-stats" : {
"get" : {
"tags" : [ "non-persistent topic" ],
"summary" : "Get the stats for the partitioned topic.",
@@ -2367,12 +4010,7 @@
"operationId" : "getPartitionedStats",
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
- "in" : "path",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "cluster",
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
@@ -2382,7 +4020,7 @@
"required" : true,
"type" : "string"
}, {
- "name" : "destination",
+ "name" : "topic",
"in" : "path",
"required" : true,
"type" : "string"
@@ -2409,7 +4047,7 @@
}
}
},
- "/non-persistent/{property}/{cluster}/{namespace}/{destination}/partitions" : {
+ "/non-persistent/{tenant}/{namespace}/{topic}/partitions" : {
"get" : {
"tags" : [ "non-persistent topic" ],
"summary" : "Get partitioned topic metadata.",
@@ -2417,12 +4055,7 @@
"operationId" : "getPartitionedMetadata",
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
- "in" : "path",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "cluster",
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
@@ -2432,7 +4065,7 @@
"required" : true,
"type" : "string"
}, {
- "name" : "destination",
+ "name" : "topic",
"in" : "path",
"required" : true,
"type" : "string"
@@ -2462,12 +4095,7 @@
"operationId" : "updatePartitionedTopic",
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
- "in" : "path",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "cluster",
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
@@ -2477,7 +4105,7 @@
"required" : true,
"type" : "string"
}, {
- "name" : "destination",
+ "name" : "topic",
"in" : "path",
"required" : true,
"type" : "string"
@@ -2498,12 +4126,7 @@
"operationId" : "createPartitionedTopic",
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
- "in" : "path",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "cluster",
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
@@ -2513,7 +4136,7 @@
"required" : true,
"type" : "string"
}, {
- "name" : "destination",
+ "name" : "topic",
"in" : "path",
"required" : true,
"type" : "string"
@@ -2540,12 +4163,7 @@
"operationId" : "deletePartitionedTopic",
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
- "in" : "path",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "cluster",
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
@@ -2555,7 +4173,7 @@
"required" : true,
"type" : "string"
}, {
- "name" : "destination",
+ "name" : "topic",
"in" : "path",
"required" : true,
"type" : "string"
@@ -2576,20 +4194,15 @@
}
}
},
- "/non-persistent/{property}/{cluster}/{namespace}/{destination}/permissions" : {
+ "/non-persistent/{tenant}/{namespace}/{topic}/permissions" : {
"get" : {
"tags" : [ "non-persistent topic" ],
- "summary" : "Get permissions on a destination.",
- "description" : "Retrieve the effective permissions for a destination. These permissions are defined by the permissions set at thenamespace level combined (union) with any eventual specific permission set on the destination.",
- "operationId" : "getPermissionsOnDestination",
+ "summary" : "Get permissions on a topic.",
+ "description" : "Retrieve the effective permissions for a topic. These permissions are defined by the permissions set at thenamespace level combined (union) with any eventual specific permission set on the topic.",
+ "operationId" : "getPermissionsOnTopic",
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
- "in" : "path",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "cluster",
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
@@ -2599,7 +4212,7 @@
"required" : true,
"type" : "string"
}, {
- "name" : "destination",
+ "name" : "topic",
"in" : "path",
"required" : true,
"type" : "string"
@@ -2623,20 +4236,15 @@
}
}
},
- "/non-persistent/{property}/{cluster}/{namespace}/{destination}/permissions/{role}" : {
+ "/non-persistent/{tenant}/{namespace}/{topic}/permissions/{role}" : {
"post" : {
"tags" : [ "non-persistent topic" ],
- "summary" : "Grant a new permission to a role on a single destination.",
+ "summary" : "Grant a new permission to a role on a single topic.",
"description" : "",
- "operationId" : "grantPermissionsOnDestination",
+ "operationId" : "grantPermissionsOnTopic",
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
- "in" : "path",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "cluster",
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
@@ -2646,7 +4254,7 @@
"required" : true,
"type" : "string"
}, {
- "name" : "destination",
+ "name" : "topic",
"in" : "path",
"required" : true,
"type" : "string"
@@ -2670,17 +4278,12 @@
},
"delete" : {
"tags" : [ "non-persistent topic" ],
- "summary" : "Revoke permissions on a destination.",
- "description" : "Revoke permissions to a role on a single destination. If the permission was not set at the destinationlevel, but rather at the namespace level, this operation will return an error (HTTP status code 412).",
- "operationId" : "revokePermissionsOnDestination",
+ "summary" : "Revoke permissions on a topic.",
+ "description" : "Revoke permissions to a role on a single topic. If the permission was not set at the topiclevel, but rather at the namespace level, this operation will return an error (HTTP status code 412).",
+ "operationId" : "revokePermissionsOnTopic",
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
- "in" : "path",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "cluster",
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
@@ -2690,7 +4293,7 @@
"required" : true,
"type" : "string"
}, {
- "name" : "destination",
+ "name" : "topic",
"in" : "path",
"required" : true,
"type" : "string"
@@ -2708,12 +4311,12 @@
"description" : "Namespace doesn't exist"
},
"412" : {
- "description" : "Permissions are not set at the destination level"
+ "description" : "Permissions are not set at the topic level"
}
}
}
},
- "/non-persistent/{property}/{cluster}/{namespace}/{destination}/stats" : {
+ "/non-persistent/{tenant}/{namespace}/{topic}/stats" : {
"get" : {
"tags" : [ "non-persistent topic" ],
"summary" : "Get the stats for the topic.",
@@ -2721,12 +4324,7 @@
"operationId" : "getStats",
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
- "in" : "path",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "cluster",
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
@@ -2736,7 +4334,7 @@
"required" : true,
"type" : "string"
}, {
- "name" : "destination",
+ "name" : "topic",
"in" : "path",
"required" : true,
"type" : "string"
@@ -2763,7 +4361,7 @@
}
}
},
- "/non-persistent/{property}/{cluster}/{namespace}/{destination}/subscription/{subName}" : {
+ "/non-persistent/{tenant}/{namespace}/{topic}/subscription/{subName}" : {
"delete" : {
"tags" : [ "non-persistent topic" ],
"summary" : "Delete a subscription.",
@@ -2771,12 +4369,7 @@
"operationId" : "deleteSubscription",
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
- "in" : "path",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "cluster",
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
@@ -2786,7 +4379,7 @@
"required" : true,
"type" : "string"
}, {
- "name" : "destination",
+ "name" : "topic",
"in" : "path",
"required" : true,
"type" : "string"
@@ -2815,7 +4408,7 @@
}
}
},
- "/non-persistent/{property}/{cluster}/{namespace}/{destination}/subscription/{subName}/expireMessages/{expireTimeInSeconds}" : {
+ "/non-persistent/{tenant}/{namespace}/{topic}/subscription/{subName}/expireMessages/{expireTimeInSeconds}" : {
"post" : {
"tags" : [ "non-persistent topic" ],
"summary" : "Expire messages on a topic subscription.",
@@ -2823,12 +4416,7 @@
"operationId" : "expireTopicMessages",
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
- "in" : "path",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "cluster",
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
@@ -2838,7 +4426,7 @@
"required" : true,
"type" : "string"
}, {
- "name" : "destination",
+ "name" : "topic",
"in" : "path",
"required" : true,
"type" : "string"
@@ -2870,7 +4458,7 @@
}
}
},
- "/non-persistent/{property}/{cluster}/{namespace}/{destination}/subscription/{subName}/position/{messagePosition}" : {
+ "/non-persistent/{tenant}/{namespace}/{topic}/subscription/{subName}/position/{messagePosition}" : {
"get" : {
"tags" : [ "non-persistent topic" ],
"summary" : "Peek nth message on a topic subscription.",
@@ -2878,12 +4466,7 @@
"operationId" : "peekNthMessage",
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
- "in" : "path",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "cluster",
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
@@ -2893,7 +4476,7 @@
"required" : true,
"type" : "string"
}, {
- "name" : "destination",
+ "name" : "topic",
"in" : "path",
"required" : true,
"type" : "string"
@@ -2925,7 +4508,7 @@
}
}
},
- "/non-persistent/{property}/{cluster}/{namespace}/{destination}/subscription/{subName}/resetcursor" : {
+ "/non-persistent/{tenant}/{namespace}/{topic}/subscription/{subName}/resetcursor" : {
"post" : {
"tags" : [ "non-persistent topic" ],
"summary" : "Reset subscription to message position closest to given position.",
@@ -2933,12 +4516,7 @@
"operationId" : "resetCursorOnPosition",
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
- "in" : "path",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "cluster",
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
@@ -2948,7 +4526,7 @@
"required" : true,
"type" : "string"
}, {
- "name" : "destination",
+ "name" : "topic",
"in" : "path",
"required" : true,
"type" : "string"
@@ -2977,7 +4555,7 @@
}
}
},
- "/non-persistent/{property}/{cluster}/{namespace}/{destination}/subscription/{subName}/resetcursor/{timestamp}" : {
+ "/non-persistent/{tenant}/{namespace}/{topic}/subscription/{subName}/resetcursor/{timestamp}" : {
"post" : {
"tags" : [ "non-persistent topic" ],
"summary" : "Reset subscription to message position closest to absolute timestamp (in ms).",
@@ -2985,12 +4563,201 @@
"operationId" : "resetCursor",
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
}, {
- "name" : "cluster",
+ "name" : "namespace",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "topic",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "subName",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "timestamp",
+ "in" : "path",
+ "required" : true,
+ "type" : "integer",
+ "format" : "int64"
+ }, {
+ "name" : "authoritative",
+ "in" : "query",
+ "required" : false,
+ "type" : "boolean",
+ "default" : false
+ } ],
+ "responses" : {
+ "403" : {
+ "description" : "Don't have admin permission"
+ },
+ "404" : {
+ "description" : "Topic/Subscription does not exist"
+ }
+ }
+ }
+ },
+ "/non-persistent/{tenant}/{namespace}/{topic}/subscription/{subName}/skip/{numMessages}" : {
+ "post" : {
+ "tags" : [ "non-persistent topic" ],
+ "summary" : "Skip messages on a topic subscription.",
+ "description" : "",
+ "operationId" : "skipMessages",
+ "produces" : [ "application/json" ],
+ "parameters" : [ {
+ "name" : "tenant",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "namespace",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "topic",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "subName",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "numMessages",
+ "in" : "path",
+ "required" : true,
+ "type" : "integer",
+ "format" : "int32"
+ }, {
+ "name" : "authoritative",
+ "in" : "query",
+ "required" : false,
+ "type" : "boolean",
+ "default" : false
+ } ],
+ "responses" : {
+ "403" : {
+ "description" : "Don't have admin permission"
+ },
+ "404" : {
+ "description" : "Topic or subscription does not exist"
+ }
+ }
+ }
+ },
+ "/non-persistent/{tenant}/{namespace}/{topic}/subscription/{subName}/skip_all" : {
+ "post" : {
+ "tags" : [ "non-persistent topic" ],
+ "summary" : "Skip all messages on a topic subscription.",
+ "description" : "Completely clears the backlog on the subscription.",
+ "operationId" : "skipAllMessages",
+ "produces" : [ "application/json" ],
+ "parameters" : [ {
+ "name" : "tenant",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "namespace",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "topic",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "subName",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "authoritative",
+ "in" : "query",
+ "required" : false,
+ "type" : "boolean",
+ "default" : false
+ } ],
+ "responses" : {
+ "403" : {
+ "description" : "Don't have admin permission"
+ },
+ "404" : {
+ "description" : "Topic or subscription does not exist"
+ },
+ "405" : {
+ "description" : "Operation not allowed on non-persistent topic"
+ }
+ }
+ }
+ },
+ "/non-persistent/{tenant}/{namespace}/{topic}/subscription/{subscriptionName}" : {
+ "put" : {
+ "tags" : [ "non-persistent topic" ],
+ "summary" : "Reset subscription to message position closest to given position.",
+ "description" : "Creates a subscription on the topic at the specified message id",
+ "operationId" : "createSubscription",
+ "produces" : [ "application/json" ],
+ "parameters" : [ {
+ "name" : "tenant",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "namespace",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "topic",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "subscriptionName",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "authoritative",
+ "in" : "query",
+ "required" : false,
+ "type" : "boolean",
+ "default" : false
+ } ],
+ "responses" : {
+ "403" : {
+ "description" : "Don't have admin permission"
+ },
+ "404" : {
+ "description" : "Topic/Subscription does not exist"
+ },
+ "405" : {
+ "description" : "Not supported for partitioned topics"
+ }
+ }
+ }
+ },
+ "/non-persistent/{tenant}/{namespace}/{topic}/subscriptions" : {
+ "get" : {
+ "tags" : [ "non-persistent topic" ],
+ "summary" : "Get the list of persistent subscriptions for a given topic.",
+ "description" : "",
+ "operationId" : "getSubscriptions",
+ "produces" : [ "application/json" ],
+ "parameters" : [ {
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
@@ -3000,22 +4767,11 @@
"required" : true,
"type" : "string"
}, {
- "name" : "destination",
+ "name" : "topic",
"in" : "path",
"required" : true,
"type" : "string"
}, {
- "name" : "subName",
- "in" : "path",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "timestamp",
- "in" : "path",
- "required" : true,
- "type" : "integer",
- "format" : "int64"
- }, {
"name" : "authoritative",
"in" : "query",
"required" : false,
@@ -3023,29 +4779,33 @@
"default" : false
} ],
"responses" : {
+ "200" : {
+ "description" : "successful operation",
+ "schema" : {
+ "type" : "array",
+ "items" : {
+ "type" : "object"
+ }
+ }
+ },
"403" : {
"description" : "Don't have admin permission"
},
"404" : {
- "description" : "Topic/Subscription does not exist"
+ "description" : "Topic does not exist"
}
}
}
},
- "/non-persistent/{property}/{cluster}/{namespace}/{destination}/subscription/{subName}/skip/{numMessages}" : {
+ "/non-persistent/{tenant}/{namespace}/{topic}/terminate" : {
"post" : {
"tags" : [ "non-persistent topic" ],
- "summary" : "Skip messages on a topic subscription.",
+ "summary" : "Terminate a topic. A topic that is terminated will not accept any more messages to be published and will let consumer to drain existing messages in backlog",
"description" : "",
- "operationId" : "skipMessages",
+ "operationId" : "terminate",
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
- "in" : "path",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "cluster",
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
@@ -3055,22 +4815,11 @@
"required" : true,
"type" : "string"
}, {
- "name" : "destination",
+ "name" : "topic",
"in" : "path",
"required" : true,
"type" : "string"
}, {
- "name" : "subName",
- "in" : "path",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "numMessages",
- "in" : "path",
- "required" : true,
- "type" : "integer",
- "format" : "int32"
- }, {
"name" : "authoritative",
"in" : "query",
"required" : false,
@@ -3078,29 +4827,33 @@
"default" : false
} ],
"responses" : {
+ "200" : {
+ "description" : "successful operation",
+ "schema" : {
+ "$ref" : "#/definitions/MessageId"
+ }
+ },
"403" : {
"description" : "Don't have admin permission"
},
"404" : {
- "description" : "Topic or subscription does not exist"
+ "description" : "Topic does not exist"
+ },
+ "405" : {
+ "description" : "Operation not allowed on non-persistent topic"
}
}
}
},
- "/non-persistent/{property}/{cluster}/{namespace}/{destination}/subscription/{subName}/skip_all" : {
- "post" : {
+ "/non-persistent/{tenant}/{namespace}/{topic}/unload" : {
+ "put" : {
"tags" : [ "non-persistent topic" ],
- "summary" : "Skip all messages on a topic subscription.",
- "description" : "Completely clears the backlog on the subscription.",
- "operationId" : "skipAllMessages",
+ "summary" : "Unload a topic",
+ "description" : "",
+ "operationId" : "unloadTopic",
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
- "in" : "path",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "cluster",
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
@@ -3110,12 +4863,7 @@
"required" : true,
"type" : "string"
}, {
- "name" : "destination",
- "in" : "path",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "subName",
+ "name" : "topic",
"in" : "path",
"required" : true,
"type" : "string"
@@ -3131,20 +4879,17 @@
"description" : "Don't have admin permission"
},
"404" : {
- "description" : "Topic or subscription does not exist"
- },
- "405" : {
- "description" : "Operation not allowed on non-persistent topic"
+ "description" : "Topic does not exist"
}
}
}
},
- "/non-persistent/{property}/{cluster}/{namespace}/{destination}/subscriptions" : {
+ "/persistent/{property}/{cluster}/{namespace}/{topic}/compaction" : {
"get" : {
- "tags" : [ "non-persistent topic" ],
- "summary" : "Get the list of persistent subscriptions for a given topic.",
+ "tags" : [ "persistent topic" ],
+ "summary" : "Get the status of a compaction operation for a topic.",
"description" : "",
- "operationId" : "getSubscriptions",
+ "operationId" : "compactionStatus",
"produces" : [ "application/json" ],
"parameters" : [ {
"name" : "property",
@@ -3162,7 +4907,7 @@
"required" : true,
"type" : "string"
}, {
- "name" : "destination",
+ "name" : "topic",
"in" : "path",
"required" : true,
"type" : "string"
@@ -3177,27 +4922,25 @@
"200" : {
"description" : "successful operation",
"schema" : {
- "type" : "array",
- "items" : {
- "type" : "object"
- }
+ "$ref" : "#/definitions/CompactionStatus"
}
},
"403" : {
"description" : "Don't have admin permission"
},
"404" : {
- "description" : "Topic does not exist"
+ "description" : "Topic does not exist, or compaction hasn't run"
+ },
+ "405" : {
+ "description" : "Operation not allowed on persistent topic"
}
}
- }
- },
- "/non-persistent/{property}/{cluster}/{namespace}/{destination}/terminate" : {
- "post" : {
- "tags" : [ "non-persistent topic" ],
- "summary" : "Terminate a topic. A topic that is terminated will not accept any more messages to be published and will let consumer to drain existing messages in backlog",
+ },
+ "put" : {
+ "tags" : [ "persistent topic" ],
+ "summary" : "Trigger a compaction operation on a topic.",
"description" : "",
- "operationId" : "terminate",
+ "operationId" : "compact",
"produces" : [ "application/json" ],
"parameters" : [ {
"name" : "property",
@@ -3215,7 +4958,7 @@
"required" : true,
"type" : "string"
}, {
- "name" : "destination",
+ "name" : "topic",
"in" : "path",
"required" : true,
"type" : "string"
@@ -3227,12 +4970,6 @@
"default" : false
} ],
"responses" : {
- "200" : {
- "description" : "successful operation",
- "schema" : {
- "$ref" : "#/definitions/MessageId"
- }
- },
"403" : {
"description" : "Don't have admin permission"
},
@@ -3240,17 +4977,20 @@
"description" : "Topic does not exist"
},
"405" : {
- "description" : "Operation not allowed on non-persistent topic"
+ "description" : "Operation not allowed on persistent topic"
+ },
+ "409" : {
+ "description" : "Compaction already running"
}
}
}
},
- "/non-persistent/{property}/{cluster}/{namespace}/{destination}/unload" : {
+ "/persistent/{property}/{cluster}/{namespace}/{topic}/subscription/{subscriptionName}" : {
"put" : {
- "tags" : [ "non-persistent topic" ],
- "summary" : "Unload a topic",
- "description" : "",
- "operationId" : "unloadTopic",
+ "tags" : [ "persistent topic" ],
+ "summary" : "Reset subscription to message position closest to given position.",
+ "description" : "Creates a subscription on the topic at the specified message id",
+ "operationId" : "createSubscription",
"produces" : [ "application/json" ],
"parameters" : [ {
"name" : "property",
@@ -3268,7 +5008,12 @@
"required" : true,
"type" : "string"
}, {
- "name" : "destination",
+ "name" : "topic",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "subscriptionName",
"in" : "path",
"required" : true,
"type" : "string"
@@ -3284,25 +5029,23 @@
"description" : "Don't have admin permission"
},
"404" : {
- "description" : "Topic does not exist"
+ "description" : "Topic/Subscription does not exist"
+ },
+ "405" : {
+ "description" : "Not supported for partitioned topics"
}
}
}
},
- "/persistent/{property}/{cluster}/{namespace}" : {
+ "/persistent/{tenant}/{namespace}" : {
"get" : {
"tags" : [ "persistent topic" ],
- "summary" : "Get the list of destinations under a namespace.",
+ "summary" : "Get the list of topics under a namespace.",
"description" : "",
"operationId" : "getList",
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
- "in" : "path",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "cluster",
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
@@ -3331,7 +5074,7 @@
}
}
},
- "/persistent/{property}/{cluster}/{namespace}/partitioned" : {
+ "/persistent/{tenant}/{namespace}/partitioned" : {
"get" : {
"tags" : [ "persistent topic" ],
"summary" : "Get the list of partitioned topics under a namespace.",
@@ -3339,12 +5082,7 @@
"operationId" : "getPartitionedTopicList",
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
- "in" : "path",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "cluster",
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
@@ -3373,7 +5111,7 @@
}
}
},
- "/persistent/{property}/{cluster}/{namespace}/{destination}" : {
+ "/persistent/{tenant}/{namespace}/{topic}" : {
"delete" : {
"tags" : [ "persistent topic" ],
"summary" : "Delete a topic.",
@@ -3381,12 +5119,7 @@
"operationId" : "deleteTopic",
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
- "in" : "path",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "cluster",
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
@@ -3396,7 +5129,7 @@
"required" : true,
"type" : "string"
}, {
- "name" : "destination",
+ "name" : "topic",
"in" : "path",
"required" : true,
"type" : "string"
@@ -3420,7 +5153,7 @@
}
}
},
- "/persistent/{property}/{cluster}/{namespace}/{destination}/all_subscription/expireMessages/{expireTimeInSeconds}" : {
+ "/persistent/{tenant}/{namespace}/{topic}/all_subscription/expireMessages/{expireTimeInSeconds}" : {
"post" : {
"tags" : [ "persistent topic" ],
"summary" : "Expire messages on all subscriptions of topic.",
@@ -3428,12 +5161,7 @@
"operationId" : "expireMessagesForAllSubscriptions",
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
- "in" : "path",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "cluster",
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
@@ -3443,7 +5171,7 @@
"required" : true,
"type" : "string"
}, {
- "name" : "destination",
+ "name" : "topic",
"in" : "path",
"required" : true,
"type" : "string"
@@ -3470,7 +5198,7 @@
}
}
},
- "/persistent/{property}/{cluster}/{namespace}/{destination}/backlog" : {
+ "/persistent/{tenant}/{namespace}/{topic}/backlog" : {
"get" : {
"tags" : [ "persistent topic" ],
"summary" : "Get estimated backlog for offline topic.",
@@ -3478,12 +5206,7 @@
"operationId" : "getBacklog",
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
- "in" : "path",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "cluster",
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
@@ -3493,7 +5216,7 @@
"required" : true,
"type" : "string"
}, {
- "name" : "destination",
+ "name" : "topic",
"in" : "path",
"required" : true,
"type" : "string"
@@ -3520,20 +5243,61 @@
}
}
},
- "/persistent/{property}/{cluster}/{namespace}/{destination}/internal-info" : {
+ "/persistent/{tenant}/{namespace}/{topic}/compaction" : {
"get" : {
"tags" : [ "persistent topic" ],
- "summary" : "Get the internal stats for the topic.",
+ "summary" : "Get the status of a compaction operation for a topic.",
"description" : "",
- "operationId" : "getManagedLedgerInfo",
+ "operationId" : "compactionStatus",
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
}, {
- "name" : "cluster",
+ "name" : "namespace",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "topic",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "authoritative",
+ "in" : "query",
+ "required" : false,
+ "type" : "boolean",
+ "default" : false
+ } ],
+ "responses" : {
+ "200" : {
+ "description" : "successful operation",
+ "schema" : {
+ "$ref" : "#/definitions/CompactionStatus"
+ }
+ },
+ "403" : {
+ "description" : "Don't have admin permission"
+ },
+ "404" : {
+ "description" : "Topic does not exist, or compaction hasn't run"
+ },
+ "405" : {
+ "description" : "Operation not allowed on persistent topic"
+ }
+ }
+ },
+ "put" : {
+ "tags" : [ "persistent topic" ],
+ "summary" : "Trigger a compaction operation on a topic.",
+ "description" : "",
+ "operationId" : "compact",
+ "produces" : [ "application/json" ],
+ "parameters" : [ {
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
@@ -3543,10 +5307,16 @@
"required" : true,
"type" : "string"
}, {
- "name" : "destination",
+ "name" : "topic",
"in" : "path",
"required" : true,
"type" : "string"
+ }, {
+ "name" : "authoritative",
+ "in" : "query",
+ "required" : false,
+ "type" : "boolean",
+ "default" : false
} ],
"responses" : {
"403" : {
@@ -3554,24 +5324,58 @@
},
"404" : {
"description" : "Topic does not exist"
+ },
+ "405" : {
+ "description" : "Operation not allowed on persistent topic"
+ },
+ "409" : {
+ "description" : "Compaction already running"
}
}
}
},
- "/persistent/{property}/{cluster}/{namespace}/{destination}/internalStats" : {
+ "/persistent/{tenant}/{namespace}/{topic}/internal-info" : {
"get" : {
"tags" : [ "persistent topic" ],
"summary" : "Get the internal stats for the topic.",
"description" : "",
- "operationId" : "getInternalStats",
+ "operationId" : "getManagedLedgerInfo",
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
}, {
- "name" : "cluster",
+ "name" : "namespace",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "topic",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ } ],
+ "responses" : {
+ "403" : {
+ "description" : "Don't have admin permission"
+ },
+ "404" : {
+ "description" : "Topic does not exist"
+ }
+ }
+ }
+ },
+ "/persistent/{tenant}/{namespace}/{topic}/internalStats" : {
+ "get" : {
+ "tags" : [ "persistent topic" ],
+ "summary" : "Get the internal stats for the topic.",
+ "description" : "",
+ "operationId" : "getInternalStats",
+ "produces" : [ "application/json" ],
+ "parameters" : [ {
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
@@ -3581,7 +5385,7 @@
"required" : true,
"type" : "string"
}, {
- "name" : "destination",
+ "name" : "topic",
"in" : "path",
"required" : true,
"type" : "string"
@@ -3608,7 +5412,7 @@
}
}
},
- "/persistent/{property}/{cluster}/{namespace}/{destination}/partitioned-stats" : {
+ "/persistent/{tenant}/{namespace}/{topic}/partitioned-stats" : {
"get" : {
"tags" : [ "persistent topic" ],
"summary" : "Get the stats for the partitioned topic.",
@@ -3616,12 +5420,7 @@
"operationId" : "getPartitionedStats",
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
- "in" : "path",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "cluster",
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
@@ -3631,7 +5430,7 @@
"required" : true,
"type" : "string"
}, {
- "name" : "destination",
+ "name" : "topic",
"in" : "path",
"required" : true,
"type" : "string"
@@ -3658,7 +5457,7 @@
}
}
},
- "/persistent/{property}/{cluster}/{namespace}/{destination}/partitions" : {
+ "/persistent/{tenant}/{namespace}/{topic}/partitions" : {
"get" : {
"tags" : [ "persistent topic" ],
"summary" : "Get partitioned topic metadata.",
@@ -3666,12 +5465,7 @@
"operationId" : "getPartitionedMetadata",
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
- "in" : "path",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "cluster",
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
@@ -3681,7 +5475,7 @@
"required" : true,
"type" : "string"
}, {
- "name" : "destination",
+ "name" : "topic",
"in" : "path",
"required" : true,
"type" : "string"
@@ -3711,12 +5505,7 @@
"operationId" : "updatePartitionedTopic",
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
- "in" : "path",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "cluster",
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
@@ -3726,7 +5515,7 @@
"required" : true,
"type" : "string"
}, {
- "name" : "destination",
+ "name" : "topic",
"in" : "path",
"required" : true,
"type" : "string"
@@ -3746,13 +5535,8 @@
"description" : "It needs to be called before creating a producer on a partitioned topic.",
"operationId" : "createPartitionedTopic",
"produces" : [ "application/json" ],
- "parameters" : [ {
- "name" : "property",
- "in" : "path",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "cluster",
+ "parameters" : [ {
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
@@ -3762,7 +5546,7 @@
"required" : true,
"type" : "string"
}, {
- "name" : "destination",
+ "name" : "topic",
"in" : "path",
"required" : true,
"type" : "string"
@@ -3789,12 +5573,7 @@
"operationId" : "deletePartitionedTopic",
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
- "in" : "path",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "cluster",
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
@@ -3804,7 +5583,7 @@
"required" : true,
"type" : "string"
}, {
- "name" : "destination",
+ "name" : "topic",
"in" : "path",
"required" : true,
"type" : "string"
@@ -3825,20 +5604,15 @@
}
}
},
- "/persistent/{property}/{cluster}/{namespace}/{destination}/permissions" : {
+ "/persistent/{tenant}/{namespace}/{topic}/permissions" : {
"get" : {
"tags" : [ "persistent topic" ],
- "summary" : "Get permissions on a destination.",
- "description" : "Retrieve the effective permissions for a destination. These permissions are defined by the permissions set at thenamespace level combined (union) with any eventual specific permission set on the destination.",
- "operationId" : "getPermissionsOnDestination",
+ "summary" : "Get permissions on a topic.",
+ "description" : "Retrieve the effective permissions for a topic. These permissions are defined by the permissions set at thenamespace level combined (union) with any eventual specific permission set on the topic.",
+ "operationId" : "getPermissionsOnTopic",
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
- "in" : "path",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "cluster",
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
@@ -3848,7 +5622,7 @@
"required" : true,
"type" : "string"
}, {
- "name" : "destination",
+ "name" : "topic",
"in" : "path",
"required" : true,
"type" : "string"
@@ -3872,20 +5646,15 @@
}
}
},
- "/persistent/{property}/{cluster}/{namespace}/{destination}/permissions/{role}" : {
+ "/persistent/{tenant}/{namespace}/{topic}/permissions/{role}" : {
"post" : {
"tags" : [ "persistent topic" ],
- "summary" : "Grant a new permission to a role on a single destination.",
+ "summary" : "Grant a new permission to a role on a single topic.",
"description" : "",
- "operationId" : "grantPermissionsOnDestination",
+ "operationId" : "grantPermissionsOnTopic",
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
- "in" : "path",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "cluster",
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
@@ -3895,7 +5664,7 @@
"required" : true,
"type" : "string"
}, {
- "name" : "destination",
+ "name" : "topic",
"in" : "path",
"required" : true,
"type" : "string"
@@ -3919,17 +5688,12 @@
},
"delete" : {
"tags" : [ "persistent topic" ],
- "summary" : "Revoke permissions on a destination.",
- "description" : "Revoke permissions to a role on a single destination. If the permission was not set at the destinationlevel, but rather at the namespace level, this operation will return an error (HTTP status code 412).",
- "operationId" : "revokePermissionsOnDestination",
+ "summary" : "Revoke permissions on a topic.",
+ "description" : "Revoke permissions to a role on a single topic. If the permission was not set at the topiclevel, but rather at the namespace level, this operation will return an error (HTTP status code 412).",
+ "operationId" : "revokePermissionsOnTopic",
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
- "in" : "path",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "cluster",
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
@@ -3939,7 +5703,7 @@
"required" : true,
"type" : "string"
}, {
- "name" : "destination",
+ "name" : "topic",
"in" : "path",
"required" : true,
"type" : "string"
@@ -3957,12 +5721,12 @@
"description" : "Namespace doesn't exist"
},
"412" : {
- "description" : "Permissions are not set at the destination level"
+ "description" : "Permissions are not set at the topic level"
}
}
}
},
- "/persistent/{property}/{cluster}/{namespace}/{destination}/stats" : {
+ "/persistent/{tenant}/{namespace}/{topic}/stats" : {
"get" : {
"tags" : [ "persistent topic" ],
"summary" : "Get the stats for the topic.",
@@ -3970,12 +5734,7 @@
"operationId" : "getStats",
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
- "in" : "path",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "cluster",
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
@@ -3985,7 +5744,7 @@
"required" : true,
"type" : "string"
}, {
- "name" : "destination",
+ "name" : "topic",
"in" : "path",
"required" : true,
"type" : "string"
@@ -4012,7 +5771,7 @@
}
}
},
- "/persistent/{property}/{cluster}/{namespace}/{destination}/subscription/{subName}" : {
+ "/persistent/{tenant}/{namespace}/{topic}/subscription/{subName}" : {
"delete" : {
"tags" : [ "persistent topic" ],
"summary" : "Delete a subscription.",
@@ -4020,12 +5779,7 @@
"operationId" : "deleteSubscription",
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
- "in" : "path",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "cluster",
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
@@ -4035,7 +5789,7 @@
"required" : true,
"type" : "string"
}, {
- "name" : "destination",
+ "name" : "topic",
"in" : "path",
"required" : true,
"type" : "string"
@@ -4064,7 +5818,7 @@
}
}
},
- "/persistent/{property}/{cluster}/{namespace}/{destination}/subscription/{subName}/expireMessages/{expireTimeInSeconds}" : {
+ "/persistent/{tenant}/{namespace}/{topic}/subscription/{subName}/expireMessages/{expireTimeInSeconds}" : {
"post" : {
"tags" : [ "persistent topic" ],
"summary" : "Expire messages on a topic subscription.",
@@ -4072,12 +5826,7 @@
"operationId" : "expireTopicMessages",
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
- "in" : "path",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "cluster",
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
@@ -4087,7 +5836,7 @@
"required" : true,
"type" : "string"
}, {
- "name" : "destination",
+ "name" : "topic",
"in" : "path",
"required" : true,
"type" : "string"
@@ -4119,7 +5868,7 @@
}
}
},
- "/persistent/{property}/{cluster}/{namespace}/{destination}/subscription/{subName}/position/{messagePosition}" : {
+ "/persistent/{tenant}/{namespace}/{topic}/subscription/{subName}/position/{messagePosition}" : {
"get" : {
"tags" : [ "persistent topic" ],
"summary" : "Peek nth message on a topic subscription.",
@@ -4127,12 +5876,7 @@
"operationId" : "peekNthMessage",
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
- "in" : "path",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "cluster",
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
@@ -4142,7 +5886,7 @@
"required" : true,
"type" : "string"
}, {
- "name" : "destination",
+ "name" : "topic",
"in" : "path",
"required" : true,
"type" : "string"
@@ -4174,7 +5918,7 @@
}
}
},
- "/persistent/{property}/{cluster}/{namespace}/{destination}/subscription/{subName}/resetcursor" : {
+ "/persistent/{tenant}/{namespace}/{topic}/subscription/{subName}/resetcursor" : {
"post" : {
"tags" : [ "persistent topic" ],
"summary" : "Reset subscription to message position closest to given position.",
@@ -4182,12 +5926,7 @@
"operationId" : "resetCursorOnPosition",
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
- "in" : "path",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "cluster",
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
@@ -4197,7 +5936,7 @@
"required" : true,
"type" : "string"
}, {
- "name" : "destination",
+ "name" : "topic",
"in" : "path",
"required" : true,
"type" : "string"
@@ -4226,7 +5965,7 @@
}
}
},
- "/persistent/{property}/{cluster}/{namespace}/{destination}/subscription/{subName}/resetcursor/{timestamp}" : {
+ "/persistent/{tenant}/{namespace}/{topic}/subscription/{subName}/resetcursor/{timestamp}" : {
"post" : {
"tags" : [ "persistent topic" ],
"summary" : "Reset subscription to message position closest to absolute timestamp (in ms).",
@@ -4234,12 +5973,7 @@
"operationId" : "resetCursor",
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
- "in" : "path",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "cluster",
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
@@ -4249,7 +5983,7 @@
"required" : true,
"type" : "string"
}, {
- "name" : "destination",
+ "name" : "topic",
"in" : "path",
"required" : true,
"type" : "string"
@@ -4281,7 +6015,7 @@
}
}
},
- "/persistent/{property}/{cluster}/{namespace}/{destination}/subscription/{subName}/skip/{numMessages}" : {
+ "/persistent/{tenant}/{namespace}/{topic}/subscription/{subName}/skip/{numMessages}" : {
"post" : {
"tags" : [ "persistent topic" ],
"summary" : "Skip messages on a topic subscription.",
@@ -4289,12 +6023,7 @@
"operationId" : "skipMessages",
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
- "in" : "path",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "cluster",
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
@@ -4304,7 +6033,7 @@
"required" : true,
"type" : "string"
}, {
- "name" : "destination",
+ "name" : "topic",
"in" : "path",
"required" : true,
"type" : "string"
@@ -4336,7 +6065,7 @@
}
}
},
- "/persistent/{property}/{cluster}/{namespace}/{destination}/subscription/{subName}/skip_all" : {
+ "/persistent/{tenant}/{namespace}/{topic}/subscription/{subName}/skip_all" : {
"post" : {
"tags" : [ "persistent topic" ],
"summary" : "Skip all messages on a topic subscription.",
@@ -4344,12 +6073,54 @@
"operationId" : "skipAllMessages",
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
}, {
- "name" : "cluster",
+ "name" : "namespace",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "topic",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "subName",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "authoritative",
+ "in" : "query",
+ "required" : false,
+ "type" : "boolean",
+ "default" : false
+ } ],
+ "responses" : {
+ "403" : {
+ "description" : "Don't have admin permission"
+ },
+ "404" : {
+ "description" : "Topic or subscription does not exist"
+ },
+ "405" : {
+ "description" : "Operation not allowed on non-persistent topic"
+ }
+ }
+ }
+ },
+ "/persistent/{tenant}/{namespace}/{topic}/subscription/{subscriptionName}" : {
+ "put" : {
+ "tags" : [ "persistent topic" ],
+ "summary" : "Reset subscription to message position closest to given position.",
+ "description" : "Creates a subscription on the topic at the specified message id",
+ "operationId" : "createSubscription",
+ "produces" : [ "application/json" ],
+ "parameters" : [ {
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
@@ -4359,12 +6130,12 @@
"required" : true,
"type" : "string"
}, {
- "name" : "destination",
+ "name" : "topic",
"in" : "path",
"required" : true,
"type" : "string"
}, {
- "name" : "subName",
+ "name" : "subscriptionName",
"in" : "path",
"required" : true,
"type" : "string"
@@ -4380,15 +6151,15 @@
"description" : "Don't have admin permission"
},
"404" : {
- "description" : "Topic or subscription does not exist"
+ "description" : "Topic/Subscription does not exist"
},
"405" : {
- "description" : "Operation not allowed on non-persistent topic"
+ "description" : "Not supported for partitioned topics"
}
}
}
},
- "/persistent/{property}/{cluster}/{namespace}/{destination}/subscriptions" : {
+ "/persistent/{tenant}/{namespace}/{topic}/subscriptions" : {
"get" : {
"tags" : [ "persistent topic" ],
"summary" : "Get the list of persistent subscriptions for a given topic.",
@@ -4396,12 +6167,7 @@
"operationId" : "getSubscriptions",
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
- "in" : "path",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "cluster",
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
@@ -4411,7 +6177,7 @@
"required" : true,
"type" : "string"
}, {
- "name" : "destination",
+ "name" : "topic",
"in" : "path",
"required" : true,
"type" : "string"
@@ -4441,7 +6207,7 @@
}
}
},
- "/persistent/{property}/{cluster}/{namespace}/{destination}/terminate" : {
+ "/persistent/{tenant}/{namespace}/{topic}/terminate" : {
"post" : {
"tags" : [ "persistent topic" ],
"summary" : "Terminate a topic. A topic that is terminated will not accept any more messages to be published and will let consumer to drain existing messages in backlog",
@@ -4449,12 +6215,7 @@
"operationId" : "terminate",
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
- "in" : "path",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "cluster",
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
@@ -4464,7 +6225,7 @@
"required" : true,
"type" : "string"
}, {
- "name" : "destination",
+ "name" : "topic",
"in" : "path",
"required" : true,
"type" : "string"
@@ -4494,7 +6255,7 @@
}
}
},
- "/persistent/{property}/{cluster}/{namespace}/{destination}/unload" : {
+ "/persistent/{tenant}/{namespace}/{topic}/unload" : {
"put" : {
"tags" : [ "persistent topic" ],
"summary" : "Unload a topic",
@@ -4502,12 +6263,7 @@
"operationId" : "unloadTopic",
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
- "in" : "path",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "cluster",
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
@@ -4517,7 +6273,7 @@
"required" : true,
"type" : "string"
}, {
- "name" : "destination",
+ "name" : "topic",
"in" : "path",
"required" : true,
"type" : "string"
@@ -4541,7 +6297,7 @@
"/properties" : {
"get" : {
"tags" : [ "properties" ],
- "summary" : "Get the list of properties.",
+ "summary" : "Get the list of tenants.",
"description" : "",
"operationId" : "getProperties",
"consumes" : [ "application/json" ],
@@ -4565,16 +6321,16 @@
}
}
},
- "/properties/{property}" : {
+ "/properties/{tenant}" : {
"get" : {
"tags" : [ "properties" ],
- "summary" : "Get the admin configuration for a given property.",
+ "summary" : "Get the admin configuration for a given tenant.",
"description" : "",
"operationId" : "getPropertyAdmin",
"consumes" : [ "application/json" ],
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
@@ -4583,7 +6339,7 @@
"200" : {
"description" : "successful operation",
"schema" : {
- "$ref" : "#/definitions/PropertyAdmin"
+ "$ref" : "#/definitions/TenantInfo"
}
},
"403" : {
@@ -4596,13 +6352,13 @@
},
"post" : {
"tags" : [ "properties" ],
- "summary" : "Update the admins for a property.",
+ "summary" : "Update the admins for a tenant.",
"description" : "This operation requires Pulsar super-user privileges.",
"operationId" : "updateProperty",
"consumes" : [ "application/json" ],
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
@@ -4621,13 +6377,13 @@
},
"put" : {
"tags" : [ "properties" ],
- "summary" : "Create a new property.",
+ "summary" : "Create a new tenant.",
"description" : "This operation requires Pulsar super-user privileges.",
"operationId" : "createProperty",
"consumes" : [ "application/json" ],
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
@@ -4646,13 +6402,13 @@
},
"delete" : {
"tags" : [ "properties" ],
- "summary" : "elete a property and all namespaces and destinations under it.",
+ "summary" : "elete a tenant and all namespaces and topics under it.",
"description" : "",
"operationId" : "deleteProperty",
"consumes" : [ "application/json" ],
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
@@ -4665,7 +6421,7 @@
"description" : "Property does not exist"
},
"409" : {
- "description" : "The property still has active namespaces"
+ "description" : "The tenant still has active namespaces"
}
}
}
@@ -4698,7 +6454,136 @@
"tags" : [ "resource-quotas" ],
"summary" : "Set the default quota",
"description" : "",
- "operationId" : "setDefaultResourceQuota",
+ "operationId" : "setDefaultResourceQuota",
+ "consumes" : [ "application/json" ],
+ "produces" : [ "application/json" ],
+ "responses" : {
+ "200" : {
+ "description" : "successful operation",
+ "schema" : {
+ "type" : "array",
+ "uniqueItems" : true,
+ "items" : {
+ "type" : "string"
+ }
+ }
+ },
+ "403" : {
+ "description" : "Don't have admin permission"
+ }
+ }
+ }
+ },
+ "/resource-quotas/{tenant}/{namespace}/{bundle}" : {
+ "get" : {
+ "tags" : [ "resource-quotas" ],
+ "summary" : "Get resource quota of a namespace bundle.",
+ "description" : "",
+ "operationId" : "getNamespaceBundleResourceQuota",
+ "consumes" : [ "application/json" ],
+ "produces" : [ "application/json" ],
+ "parameters" : [ {
+ "name" : "tenant",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "namespace",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "bundle",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ } ],
+ "responses" : {
+ "200" : {
+ "description" : "successful operation",
+ "schema" : {
+ "$ref" : "#/definitions/ResourceQuota"
+ }
+ },
+ "403" : {
+ "description" : "Don't have admin permission"
+ },
+ "404" : {
+ "description" : "Namespace does not exist"
+ }
+ }
+ },
+ "post" : {
+ "tags" : [ "resource-quotas" ],
+ "summary" : "Set resource quota on a namespace.",
+ "description" : "",
+ "operationId" : "setNamespaceBundleResourceQuota",
+ "consumes" : [ "application/json" ],
+ "produces" : [ "application/json" ],
+ "parameters" : [ {
+ "name" : "tenant",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "namespace",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "bundle",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ } ],
+ "responses" : {
+ "403" : {
+ "description" : "Don't have admin permission"
+ },
+ "409" : {
+ "description" : "Concurrent modification"
+ }
+ }
+ },
+ "delete" : {
+ "tags" : [ "resource-quotas" ],
+ "summary" : "Remove resource quota for a namespace.",
+ "description" : "",
+ "operationId" : "removeNamespaceBundleResourceQuota",
+ "consumes" : [ "application/json" ],
+ "produces" : [ "application/json" ],
+ "parameters" : [ {
+ "name" : "tenant",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "namespace",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "bundle",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ } ],
+ "responses" : {
+ "403" : {
+ "description" : "Don't have admin permission"
+ },
+ "409" : {
+ "description" : "Concurrent modification"
+ }
+ }
+ }
+ },
+ "/tenants" : {
+ "get" : {
+ "tags" : [ "tenants" ],
+ "summary" : "Get the list of tenants.",
+ "description" : "",
+ "operationId" : "getProperties",
"consumes" : [ "application/json" ],
"produces" : [ "application/json" ],
"responses" : {
@@ -4706,7 +6591,6 @@
"description" : "successful operation",
"schema" : {
"type" : "array",
- "uniqueItems" : true,
"items" : {
"type" : "string"
}
@@ -4714,35 +6598,23 @@
},
"403" : {
"description" : "Don't have admin permission"
+ },
+ "404" : {
+ "description" : "Property doesn't exist"
}
}
}
},
- "/resource-quotas/{property}/{cluster}/{namespace}/{bundle}" : {
+ "/tenants/{tenant}" : {
"get" : {
- "tags" : [ "resource-quotas" ],
- "summary" : "Get resource quota of a namespace bundle.",
+ "tags" : [ "tenants" ],
+ "summary" : "Get the admin configuration for a given tenant.",
"description" : "",
- "operationId" : "getNamespaceBundleResourceQuota",
+ "operationId" : "getPropertyAdmin",
"consumes" : [ "application/json" ],
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
- "in" : "path",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "cluster",
- "in" : "path",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "namespace",
- "in" : "path",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "bundle",
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
@@ -4751,41 +6623,51 @@
"200" : {
"description" : "successful operation",
"schema" : {
- "$ref" : "#/definitions/ResourceQuota"
+ "$ref" : "#/definitions/TenantInfo"
}
},
"403" : {
"description" : "Don't have admin permission"
},
"404" : {
- "description" : "Namespace does not exist"
+ "description" : "Property doesn't exist"
}
}
},
"post" : {
- "tags" : [ "resource-quotas" ],
- "summary" : "Set resource quota on a namespace.",
- "description" : "",
- "operationId" : "setNamespaceBundleResourceQuota",
+ "tags" : [ "tenants" ],
+ "summary" : "Update the admins for a tenant.",
+ "description" : "This operation requires Pulsar super-user privileges.",
+ "operationId" : "updateProperty",
"consumes" : [ "application/json" ],
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
- "in" : "path",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "cluster",
- "in" : "path",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "namespace",
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
- }, {
- "name" : "bundle",
+ } ],
+ "responses" : {
+ "403" : {
+ "description" : "Don't have admin permission"
+ },
+ "404" : {
+ "description" : "Property does not exist"
+ },
+ "409" : {
+ "description" : "Property already exist"
+ }
+ }
+ },
+ "put" : {
+ "tags" : [ "tenants" ],
+ "summary" : "Create a new tenant.",
+ "description" : "This operation requires Pulsar super-user privileges.",
+ "operationId" : "createProperty",
+ "consumes" : [ "application/json" ],
+ "produces" : [ "application/json" ],
+ "parameters" : [ {
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
@@ -4795,34 +6677,22 @@
"description" : "Don't have admin permission"
},
"409" : {
- "description" : "Concurrent modification"
+ "description" : "Property already exist"
+ },
+ "412" : {
+ "description" : "Property name is not valid"
}
}
},
"delete" : {
- "tags" : [ "resource-quotas" ],
- "summary" : "Remove resource quota for a namespace.",
+ "tags" : [ "tenants" ],
+ "summary" : "elete a tenant and all namespaces and topics under it.",
"description" : "",
- "operationId" : "removeNamespaceBundleResourceQuota",
+ "operationId" : "deleteProperty",
"consumes" : [ "application/json" ],
"produces" : [ "application/json" ],
"parameters" : [ {
- "name" : "property",
- "in" : "path",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "cluster",
- "in" : "path",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "namespace",
- "in" : "path",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "bundle",
+ "name" : "tenant",
"in" : "path",
"required" : true,
"type" : "string"
@@ -4831,8 +6701,11 @@
"403" : {
"description" : "Don't have admin permission"
},
+ "404" : {
+ "description" : "Property does not exist"
+ },
"409" : {
- "description" : "Concurrent modification"
+ "description" : "The tenant still has active namespaces"
}
}
}
@@ -4938,6 +6811,20 @@
}
}
},
+ "BrokerNamespaceIsolationData" : {
+ "type" : "object",
+ "properties" : {
+ "brokerName" : {
+ "type" : "string"
+ },
+ "namespaceRegex" : {
+ "type" : "array",
+ "items" : {
+ "type" : "string"
+ }
+ }
+ }
+ },
"BundlesData" : {
"type" : "object",
"properties" : {
@@ -4977,6 +6864,18 @@
}
}
},
+ "CompactionStatus" : {
+ "type" : "object",
+ "properties" : {
+ "status" : {
+ "type" : "string",
+ "enum" : [ "NOT_RUN", "RUNNING", "SUCCESS", "ERROR" ]
+ },
+ "lastError" : {
+ "type" : "string"
+ }
+ }
+ },
"ConsumerStats" : {
"type" : "object",
"properties" : {
@@ -5006,6 +6905,12 @@
"blockedConsumerOnUnackedMsgs" : {
"type" : "boolean"
},
+ "metadata" : {
+ "type" : "object",
+ "additionalProperties" : {
+ "type" : "string"
+ }
+ },
"address" : {
"type" : "string"
},
@@ -5087,11 +6992,11 @@
"DispatchRate" : {
"type" : "object",
"properties" : {
- "dispatchThrottlingRatePerTopicInMsg" : {
+ "dispatchThrottlingRateInMsg" : {
"type" : "integer",
"format" : "int32"
},
- "dispatchThrottlingRatePerTopicInByte" : {
+ "dispatchThrottlingRateInByte" : {
"type" : "integer",
"format" : "int64"
},
@@ -5101,6 +7006,32 @@
}
}
},
+ "FailureDomain" : {
+ "type" : "object",
+ "properties" : {
+ "brokers" : {
+ "type" : "array",
+ "uniqueItems" : true,
+ "items" : {
+ "type" : "string"
+ }
+ }
+ }
+ },
+ "InternalConfigurationData" : {
+ "type" : "object",
+ "properties" : {
+ "zookeeperServers" : {
+ "type" : "string"
+ },
+ "globalZooKeeperServers" : {
+ "type" : "string"
+ },
+ "ledgersRootPath" : {
+ "type" : "string"
+ }
+ }
+ },
"LedgerDetails" : {
"type" : "object",
"properties" : {
@@ -5265,21 +7196,9 @@
"type" : "number",
"format" : "double"
},
- "cpu" : {
- "$ref" : "#/definitions/ResourceUsage"
- },
"directMemory" : {
"$ref" : "#/definitions/ResourceUsage"
},
- "bandwidthIn" : {
- "$ref" : "#/definitions/ResourceUsage"
- },
- "memory" : {
- "$ref" : "#/definitions/ResourceUsage"
- },
- "bandwidthOut" : {
- "$ref" : "#/definitions/ResourceUsage"
- },
"lastUpdate" : {
"type" : "integer",
"format" : "int64"
@@ -5292,6 +7211,18 @@
"type" : "number",
"format" : "double"
},
+ "cpu" : {
+ "$ref" : "#/definitions/ResourceUsage"
+ },
+ "bandwidthOut" : {
+ "$ref" : "#/definitions/ResourceUsage"
+ },
+ "memory" : {
+ "$ref" : "#/definitions/ResourceUsage"
+ },
+ "bandwidthIn" : {
+ "$ref" : "#/definitions/ResourceUsage"
+ },
"underLoaded" : {
"type" : "boolean"
},
@@ -5420,21 +7351,27 @@
"type" : "integer",
"format" : "int64"
},
- "producerName" : {
- "type" : "string"
+ "metadata" : {
+ "type" : "object",
+ "additionalProperties" : {
+ "type" : "string"
+ }
+ },
+ "msgDropRate" : {
+ "type" : "number",
+ "format" : "double"
},
"address" : {
"type" : "string"
},
+ "producerName" : {
+ "type" : "string"
+ },
"connectedSince" : {
"type" : "string"
},
"clientVersion" : {
"type" : "string"
- },
- "msgDropRate" : {
- "type" : "number",
- "format" : "double"
}
}
},
@@ -5873,6 +7810,7 @@
},
"replication_clusters" : {
"type" : "array",
+ "uniqueItems" : true,
"items" : {
"type" : "string"
}
@@ -5892,6 +7830,12 @@
"$ref" : "#/definitions/DispatchRate"
}
},
+ "subscriptionDispatchRate" : {
+ "type" : "object",
+ "additionalProperties" : {
+ "$ref" : "#/definitions/DispatchRate"
+ }
+ },
"persistence" : {
"$ref" : "#/definitions/PersistencePolicies"
},
@@ -5914,6 +7858,28 @@
},
"deleted" : {
"type" : "boolean"
+ },
+ "antiAffinityGroup" : {
+ "type" : "string"
+ },
+ "encryption_required" : {
+ "type" : "boolean"
+ },
+ "subscription_auth_mode" : {
+ "type" : "string",
+ "enum" : [ "None", "Prefix" ]
+ },
+ "max_producers_per_topic" : {
+ "type" : "integer",
+ "format" : "int32"
+ },
+ "max_consumers_per_topic" : {
+ "type" : "integer",
+ "format" : "int32"
+ },
+ "max_consumers_per_subscription" : {
+ "type" : "integer",
+ "format" : "int32"
}
}
},
@@ -6069,24 +8035,6 @@
}
}
},
- "PropertyAdmin" : {
- "type" : "object",
- "properties" : {
- "adminRoles" : {
- "type" : "array",
- "items" : {
- "type" : "string"
- }
- },
- "allowedClusters" : {
- "type" : "array",
- "uniqueItems" : true,
- "items" : {
- "type" : "string"
- }
- }
- }
- },
"PublisherStats" : {
"type" : "object",
"properties" : {
@@ -6106,12 +8054,18 @@
"type" : "integer",
"format" : "int64"
},
- "producerName" : {
- "type" : "string"
+ "metadata" : {
+ "type" : "object",
+ "additionalProperties" : {
+ "type" : "string"
+ }
},
"address" : {
"type" : "string"
},
+ "producerName" : {
+ "type" : "string"
+ },
"connectedSince" : {
"type" : "string"
},
@@ -6214,11 +8168,11 @@
"ResourceUnit" : {
"type" : "object",
"properties" : {
- "availableResource" : {
- "$ref" : "#/definitions/ResourceDescription"
- },
"resourceId" : {
"type" : "string"
+ },
+ "availableResource" : {
+ "$ref" : "#/definitions/ResourceDescription"
}
}
},
@@ -6309,6 +8263,25 @@
"$ref" : "#/definitions/ResourceUsage"
}
}
+ },
+ "TenantInfo" : {
+ "type" : "object",
+ "properties" : {
+ "adminRoles" : {
+ "type" : "array",
+ "uniqueItems" : true,
+ "items" : {
+ "type" : "string"
+ }
+ },
+ "allowedClusters" : {
+ "type" : "array",
+ "uniqueItems" : true,
+ "items" : {
+ "type" : "string"
+ }
+ }
+ }
}
}
}
\ No newline at end of file
--
To stop receiving notification emails like this one, please contact
mmerli@apache.org.