DELETE/v2/namespaces/:namespace

Delete a namespace. Deletes the namespace and all its documents entirely. There is no way to recover a deleted namespace.

After the delete operation returns HTTP 200, you can reuse the same namespace name by writing to it again.

Examples

import turbopuffer

tpuf = turbopuffer.Turbopuffer(
    region='gcp-us-central1', # choose best region: https://turbopuffer.com/docs/regions
)

ns = tpuf.namespace(f'delete-namespace-example-py')
# If an error occurs, this call raises a turbopuffer.APIError if a retry was not successful.
ns.delete_all()