🔗 Indexes
Update Index
🔗 Indexes
Update Index
This endpoint updates an index.
PUT
/
v1
/
indexes
/
{indexId}
x-metal-api-key
string
*
x-metal-api-key
Required
string
An API key for your org.
x-metal-client-id
string
*
x-metal-client-id
Required
string
A Client ID for your org.
indexId
string
*
indexId
Required
string
The Index ID to update
object
status
string
*
status
Required
string
Status to update the index. Can only be
chunkConfig
object
chunkConfig
object
size
number
size
number
The token size of each chunk.
overlap
number
overlap
number
The token amount of overlap between chunks.
tableChunkConfig
object
tableChunkConfig
object
size
number
size
number
The token size of each table chunk.
curl --location --request PUT 'https://api.getmetal.io/v1/indexes/test-index-id' \
--header 'Content-Type: application/json' \
--header 'x-metal-api-key: <api-key>' \
--header 'x-metal-client-id: <client-id>' \
--data-raw '{
"status": "DEACTIVATING"
}'
{
"data": {
"id": "1",
"createdAt": "2023-08-23T22:13:31.539Z",
"status": "DEACTIVATING",
"name": "Ozzy Osbourne",
"model": "text-embedding-ada-002",
"dimensions": 1536,
"filters": [
{
"field": "name",
"type": "string"
},
{
"field": "age",
"type": "number"
}
],
"chunkConfig": {
"size": 500,
"overlap": 20
},
"tableChunkConfig": {
"size": 4000
},
"counts": {
"docs": 0,
}
}
}
Auth Headers
x-metal-api-key
string
requiredAn API key for your org.
x-metal-client-id
string
requiredA Client ID for your org.
Params
indexId
string
requiredThe Index ID to update
Body
status
string
requiredStatus to update the index. Can only be DEACTIVATING
to start the archiving process
chunkConfig
object
size
number
default: 500The token size of each chunk.
overlap
number
default: 20The token amount of overlap between chunks.
tableChunkConfig
object
size
number
default: 4000The token size of each table chunk.
Response
data
Index Object
id
string
Id of the index
status
string
Status of the index
name
string
Name of the index
model
string
Model used to generate the embeddings
dimensions
number
Dimensions of the embeddings
chunkConfig
object
size
number
default: 500The token size of each chunk.
overlap
number
default: 20The token amount of overlap between chunks.
tableChunkConfig
object
size
number
default: 4000The token size of each chunk.
curl --location --request PUT 'https://api.getmetal.io/v1/indexes/test-index-id' \
--header 'Content-Type: application/json' \
--header 'x-metal-api-key: <api-key>' \
--header 'x-metal-client-id: <client-id>' \
--data-raw '{
"status": "DEACTIVATING"
}'
{
"data": {
"id": "1",
"createdAt": "2023-08-23T22:13:31.539Z",
"status": "DEACTIVATING",
"name": "Ozzy Osbourne",
"model": "text-embedding-ada-002",
"dimensions": 1536,
"filters": [
{
"field": "name",
"type": "string"
},
{
"field": "age",
"type": "number"
}
],
"chunkConfig": {
"size": 500,
"overlap": 20
},
"tableChunkConfig": {
"size": 4000
},
"counts": {
"docs": 0,
}
}
}