Docs Menu
Docs Home
/
Cloud Manager
/ / / /

Get Index Removal Suggestions

On this page

  • Resource
  • Request Path Parameters
  • Request Query Parameters
  • Request Body Parameters
  • Response
  • Example Request
  • Example Response

Retrieves index removal suggestions as determined by the Performance Advisor.

Base URL: https://cloud.mongodb.com/api/public/v1.0

GET /groups/{PROJECT-ID}/performanceAdvisor/dropIndexSuggestions
Parameter
Type
Description

PROJECT-ID

string

(Required) Unique identifier of the project that owns this MongoDB deployment. Groups and projects are synonymous terms. Your group ID is the same as your project ID.

Either clusterId or hostId is required.

Parameter
Type
Description

pretty

boolean

envelope

boolean

Indicates whether or not to wrap the response in an envelope.

clusterId

string

Unique identifier of a replica set or sharded cluster. Set this parameter to null if you want index removal suggestions for a standalone instance using hostId.

hostId

string

Unique identifier of the standalone instance for which you want index removal suggestions. Required if clusterId is null.

This endpoint doesn't use HTTP request body parameters.

Name
Type
Description

unusedIndexes

array of documents

Information about unused indexes considered candidates for removal.

hiddenIndexes

array of documents

Information about hidden indexes that are candidates for removal.

redundantIndexes

array of documents

Information about redundant indexes that might overlap with existing ones and are considered for removal.

curl --user '{PUBLIC-KEY}:{PRIVATE-KEY}' --digest \
--header 'Accept: application/json' \
--include \
--request GET 'https://cloud.mongodb.com/api/public/v1.0/groups/{PROJECT-ID}/performanceAdvisor/dropIndexSuggestions?clusterId={clusterId}&pretty=true'
{
"hiddenIndexes": [
{
"shardIds": ["shard-0"],
"accessCount": 0,
"index": [
{
"_fts": "text"
},
{
"_ftsx": 1
}
],
"name": "product_description_reviews_text",
"namespace": "inventory.products",
"since": "2024-10-02T18:02:22Z",
"sizeBytes": 4096
},
{
"shardIds": ["shard-0"],
"accessCount": 0,
"index": [
{
"unseenFeature": 1
}
],
"name": "unseenFeature_1",
"namespace": "inventory.products",
"since": "2024-10-02T18:02:22Z",
"sizeBytes": 4096
}
],
"redundantIndexes": [
{
"shardIds": ["shard-0"],
"accessCount": 0,
"index": [
{
"category": 1
}
],
"name": "category_1",
"namespace": "inventory.products",
"relatedIndexes": [
{
"accessCount": 1,
"index": [
{
"category": 1
},
{
"price": -1
}
],
"name": "category_1_price_-1",
"namespace": "inventory.products",
"since": "2024-10-02T18:02:22Z",
"sizeBytes": 4096
}
],
"since": "2024-10-02T18:02:22Z",
"sizeBytes": 4096
}
],
"unusedIndexes": []
}

Back

Get Suggested Indexes