Skip to main content
POST
/
v2
/
vector
/
index
/
{id}
/
rename
curl -X POST \
  https://api.upstash.com/v2/vector/index/14841111-b834-4788-925c-04ab156d1123/rename \
  -u 'EMAIL:API_KEY' \
  -d '{"name":"myindex"}'
const axios = require('axios');

const postData = {
  name: "myindex",
};

const config = {
  auth: {
    username: 'EMAIL',
    password: 'API_KEY',
  },
  headers: {
    'Content-Type': 'application/json',
  },
};

const url = 'https://api.upstash.com/v2/vector/index/14841111-b834-4788-925c-04ab156d1123/rename';

axios.post(url, postData, config)
  .then((response) => {
    console.log('Rename successful:', response.data);
  })
  .catch((error) => {
    console.error('Error:', error);
  });
import requests

data = '{"name":"myindex"}'

response = requests.post('https://api.upstash.com/v2/vector/index/14841111-b834-4788-925c-04ab156d1123/rename', data=data, auth=('EMAIL', 'API_KEY'))
response.content
client := &http.Client{}
var data = strings.NewReader(`{
    "name":"myindex",
}`)
req, err := http.NewRequest("POST", "https://api.upstash.com/v2/vector/index/14841111-b834-4788-925c-04ab156d1123/rename", data)
if err != nil {
    log.Fatal(err)
}
req.SetBasicAuth("email", "api_key")
resp, err := client.Do(req)
if err != nil {
    log.Fatal(err)
}
bodyText, err := ioutil.ReadAll(resp.Body)
if err != nil {
    log.Fatal(err)
}
fmt.Printf("%s\n", bodyText);
"OK"

Request Parameters

id
string
required
The unique ID of the index to be deleted.
name
string
required
The new name of the index.

Response Parameters

"OK" on successfull deletion operation.
curl -X POST \
  https://api.upstash.com/v2/vector/index/14841111-b834-4788-925c-04ab156d1123/rename \
  -u 'EMAIL:API_KEY' \
  -d '{"name":"myindex"}'
const axios = require('axios');

const postData = {
  name: "myindex",
};

const config = {
  auth: {
    username: 'EMAIL',
    password: 'API_KEY',
  },
  headers: {
    'Content-Type': 'application/json',
  },
};

const url = 'https://api.upstash.com/v2/vector/index/14841111-b834-4788-925c-04ab156d1123/rename';

axios.post(url, postData, config)
  .then((response) => {
    console.log('Rename successful:', response.data);
  })
  .catch((error) => {
    console.error('Error:', error);
  });
import requests

data = '{"name":"myindex"}'

response = requests.post('https://api.upstash.com/v2/vector/index/14841111-b834-4788-925c-04ab156d1123/rename', data=data, auth=('EMAIL', 'API_KEY'))
response.content
client := &http.Client{}
var data = strings.NewReader(`{
    "name":"myindex",
}`)
req, err := http.NewRequest("POST", "https://api.upstash.com/v2/vector/index/14841111-b834-4788-925c-04ab156d1123/rename", data)
if err != nil {
    log.Fatal(err)
}
req.SetBasicAuth("email", "api_key")
resp, err := client.Do(req)
if err != nil {
    log.Fatal(err)
}
bodyText, err := ioutil.ReadAll(resp.Body)
if err != nil {
    log.Fatal(err)
}
fmt.Printf("%s\n", bodyText);
"OK"