Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -798,7 +798,8 @@
"vector/api/endpoints/reset",
"vector/api/endpoints/info",
"vector/api/endpoints/list-namespaces",
"vector/api/endpoints/delete-namespace"
"vector/api/endpoints/delete-namespace",
"vector/api/endpoints/rename-namespace"
]
}
]
Expand Down
51 changes: 51 additions & 0 deletions vector/api/endpoints/rename-namespace.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
title: "Rename Namespace"
description: "Renames a namespace of an index."
api: "POST https://{endpoint}/rename-namespace"
authMethod: "bearer"
---

<Note>
The default namespace, which is the empty string `""`, cannot be renamed.
</Note>

<Note>
There should not be a namespace with the given new namespace name.
</Note>

## Request

<ParamField body="namespace" type="string" required>
The name of the namespace to rename.
</ParamField>

<ParamField body="newNamespace" type="string" required>
The new name of the namespace.
</ParamField>

## Response

<ResponseField name="renamed" type="boolean">
Whether the namespace is renamed or not.
</ResponseField>

<RequestExample>

```sh curl
curl $UPSTASH_VECTOR_REST_URL/rename-namespace \
-X POST \
-d '{ "namespace": "ns", "newNamespace": "newNs" }' \
-H "Authorization: Bearer $UPSTASH_VECTOR_REST_TOKEN"
```

</RequestExample>

<ResponseExample>

```json 200 OK
{
"result": { "renamed": true }
}
```

</ResponseExample>
4 changes: 4 additions & 0 deletions vector/overall/changelog.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
title: Changelog
---

<Update label="August 2025">
- Introduced a new api to [rename a namespace](../api/endpoints/rename-namespace)
</Update>

<Update label="March 2025">
- Allow deleting vectors with [id prefix](../api/endpoints/delete#param-prefix)
or [metadata filter](../api/endpoints/delete#param-filter).
Expand Down