> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # DropIndex # Package: collectionManagement # Namespace: IndexService # Method link: https://dev.wix.com/docs/api-reference/business-solutions/cms/collection-management/indexes/drop-index.md ## Permission Scopes: Manage Data Indexes: SCOPE.DC-DATA.INDEXES-MANAGE ## Introduction Removes an index from a data collection. The process of dropping an index from a collection takes time. You can check whether an index has been dropped by calling List Indexes. --- ## REST API ### Schema ``` Method: dropIndex Description: Removes an index from a data collection. The process of dropping an index from a collection takes time. You can check whether an index has been dropped by calling List Indexes. URL: https://www.wixapis.com/wix-data/v2/indexes Method: DELETE # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: indexName, dataCollectionId Method parameters: query param name: dataCollectionId | type: dataCollectionId | description: GUID of the data collection for which the index to be dropped is defined. | required: true query param name: indexName | type: indexName | description: Name of the index to drop. | required: true Return type: DropIndexResponse EMPTY-OBJECT {} ``` ### Examples ### Drop an index from a collection ```curl curl -X DELETE \ 'https://www.wixapis.com/wix-data/v2/indexes' \ -H 'Content-Type: application/json' \ -H 'Authorization: ' -d { "dataCollectionId": "my-collection", "indexName": "my-index" } ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.collectionManagement.IndexService.dropIndex(dataCollectionId, indexName) Description: Removes an index from a data collection. The process of dropping an index from a collection takes time. You can check whether an index has been dropped by calling List Indexes. # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: dataCollectionId, indexName Method parameters: param name: dataCollectionId | type: string | description: GUID of the data collection for which the index to be dropped is defined. | required: true param name: indexName | type: string | description: Name of the index to drop. | required: true Return type: PROMISE EMPTY-OBJECT {} ``` ### Examples ### dropIndex ```javascript import { indexes } from '@wix/data'; async function dropIndex(dataCollectionId,indexName) { const response = await indexes.dropIndex(dataCollectionId,indexName); }; ``` ### dropIndex (with elevated permissions) ```javascript import { indexes } from '@wix/data'; import { auth } from '@wix/essentials'; async function myDropIndexMethod(dataCollectionId,indexName) { const elevatedDropIndex = auth.elevate(indexes.dropIndex); const response = await elevatedDropIndex(dataCollectionId,indexName); } ``` ### dropIndex (self-hosted) Self-hosted SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md). ```javascript import { createClient } from '@wix/sdk'; import { indexes } from '@wix/data'; // Import the auth strategy for the relevant access type // Import the relevant host module if needed const myWixClient = createClient ({ modules: { indexes }, // Include the auth strategy and host as relevant }); async function dropIndex(dataCollectionId,indexName) { const response = await myWixClient.indexes.dropIndex(dataCollectionId,indexName); }; ``` ---