Skip to main content
PUT
/
workspace
/
{workspace_id}
/
table
/
{table_id}
/
index
Replace all indexes for a database table
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"
        }
      ]
    }
  ]
}
'
{}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

workspace_id
integer<int64>
required
table_id
integer<int64>
required

Body

index
object
required

Response

Success!