Replace all indexes for a database table with new index configuration
Authentication: required
Required API Scope: Workspace Database: Update
curl --request PUT \
--url https://your-xano-instance.xano.io/api:meta/workspace/{workspace_id}/table/{table_id}/index \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"index": [
{
"type": "primary",
"fields": [
{
"name": "id"
}
]
},
{
"type": "btree",
"fields": [
{
"name": "created_at",
"op": "desc"
}
]
}
]
}
'{}Was this page helpful?
curl --request PUT \
--url https://your-xano-instance.xano.io/api:meta/workspace/{workspace_id}/table/{table_id}/index \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"index": [
{
"type": "primary",
"fields": [
{
"name": "id"
}
]
},
{
"type": "btree",
"fields": [
{
"name": "created_at",
"op": "desc"
}
]
}
]
}
'{}