0

I'm working with Pulsar Admin Rest API and want to get policies of a namespace with API from the docs: /admin/v2/namespaces/{tenant}/{namespace}

Pulsar have 2 default tenants: public, sample. From that, I've got:

  • public: public/default, public/functions.
  • sample: sample/standalone/ns1.

We can understand that in public/default: namespace name is default, tenant is public.

The problem is with sample/standalone/ns1, the tenant is sample and namespace is standalone/ns1 is the name, isn't it? If so, how can I get policies from that?

I tried above API /admin/v2/namespaces/sample/standalone/ns1 but got 405: Method not Allowed

I hope someone can explain me this issue. Thanks!

NickNgn
  • 122
  • 2
  • 8

1 Answers1

2

I think there might be some confusion in there as standalone is mostlikle the name of the cluster. This cluster name is usually created when you run the Pulsar in standalone mode.

Also, if you need to get the policies of the namespace ns1 that is in the sample tenant, you would need to run a request against the following URL:

/admin/v2/namespaces/sample/ns1

Please note that namespaces in the above URL is referring to endpoint to work with the namespace resources, and it has nothing to do with naming.

QuirkyBit
  • 654
  • 7
  • 20