MongoDB Collection Level Metrics API

Returns, adds, and edits pinned namespaces for the specified cluster or process. Also returns collection level latency metric data.

GitHub OpenAPI

Operations 9

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/collStats/pinned List namespaces pinned for collection latency metrics · Return Pinned Namespaces #
Ask an LLM
“Which namespaces am I currently pinning for collection-level latency metrics on a cluster?”
“Can I see the pinned namespaces list for a cluster?”
Tell an agent
List the pinned namespaces for cluster {clusterName} in project {groupId}.
Show which namespaces cluster {clusterName} is collecting collection latency metrics on.
PATCH /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/collStats/pinned Add namespaces to the pinned list · Add Pinned Namespaces #
Ask an LLM
“Can I add more namespaces to the existing collection latency pinned list?”
“How do I grow the pinned namespaces list without replacing it?”
Tell an agent
Add namespaces {namespaces} to the pinned list on cluster {clusterName} in project {groupId}.
Grow the existing collection latency pinned namespaces on cluster {clusterName}.
PUT /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/collStats/pinned Pin namespaces for collection latency metrics · Pin Namespaces #
Ask an LLM
“How do I start collecting collection-level latency metrics on specific collections?”
“Does pinning a namespace replace the existing pinned list?”
Tell an agent
Pin namespaces {namespaces} for collection latency metrics on cluster {clusterName} in project {groupId}.
Replace the pinned namespaces list on cluster {clusterName} with {namespaces}.
PATCH /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/collStats/unpin Unpin namespaces from collection latency metrics · Unpin Namespaces #
Ask an LLM
“How do I stop collecting collection-level latency metrics on certain namespaces?”
“Can I remove namespaces from the pinned list?”
Tell an agent destructive · confirm first
Unpin namespaces {namespaces} from collection latency metrics on cluster {clusterName} in project {groupId}.
Remove {namespaces} from the pinned namespaces list on cluster {clusterName}.
GET /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/{clusterView}/collStats/namespaces Rank a cluster's namespaces by execution time · Return Ranked Namespaces from One Cluster #
Ask an LLM
“Which namespaces in a cluster spent the most total time executing?”
“Can I rank a cluster's namespaces by execution time over a time range?”
Tell an agent
Rank the namespaces of cluster {clusterName} ({clusterView}) in project {groupId} by execution time from {start} to {end}.
Show the highest-executing namespaces in cluster {clusterName} ({clusterView}) over the last {period}.
GET /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/{clusterView}/{databaseName}/{collectionName}/collStats/measurements Get cluster-level collection latency measurements · Return Cluster-Level Query Latency #
Ask an LLM
“What query latency measurements are available for a collection at the cluster level?”
“Can I filter cluster-level collection latency metrics to specific metrics?”
Tell an agent
Get cluster-level collection latency measurements for {databaseName}.{collectionName} on cluster {clusterName} ({clusterView}) in project {groupId}.
Show {metrics} cluster-level collection latency metrics for {databaseName}.{collectionName} on cluster {clusterName} ({clusterView}) from {start} to {end}.
GET /api/atlas/v2/groups/{groupId}/collStats/metrics List available collection latency metric names · Return All Metric Names #
Ask an LLM
“What collection-level latency metric names and units are available in my project?”
“Which metric names can I request for collection latency measurements?”
Tell an agent
List all available collection latency metric names and units for project {groupId}.
Show the metric names and units I can use for collection latency measurements in project {groupId}.
GET /api/atlas/v2/groups/{groupId}/processes/{processId}/collStats/namespaces Rank a process's namespaces by execution time · Return Ranked Namespaces from One Host #
Ask an LLM
“Which namespaces on one MongoDB process used the most time?”
“Can I rank namespaces for a single host process by execution time?”
Tell an agent
Rank the namespaces of process {processId} in project {groupId} by execution time from {start} to {end}.
Show the highest-executing namespaces on host {processId} over the last {period}.
GET /api/atlas/v2/groups/{groupId}/processes/{processId}/{databaseName}/{collectionName}/collStats/measurements Get host-level collection latency measurements · Return Host-Level Query Latency #
Ask an LLM
“What query latency measurements are available for a collection at the host process level?”
“Can I filter host-level collection latency metrics to specific metrics?”
Tell an agent
Get host-level collection latency measurements for {databaseName}.{collectionName} on process {processId} in project {groupId}.
Show {metrics} host-level collection latency metrics for {databaseName}.{collectionName} on process {processId} from {start} to {end}.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/mongodb:mongodb-collection-level-metrics-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

mongodb-collection-level-metrics-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Mongodb Collection Level Metrics API
  version: '2.0'
  license:
    name: CC BY-NC-SA 3.0 US
    url: https://creativecommons.org/licenses/by-nc-sa/3.0/us/
  termsOfService: https://www.mongodb.com/mongodb-management-service-terms-and-conditions
  x-refined-note:
  - x-xgen-sha differs across the merged source definitions and was not carried
  description: 'Operations tagged Collection Level Metrics across 2 of this provider''s published API definitions: mongodb-atlas-openapi.yaml, mongodb-openapi.yaml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://cloud.mongodb.com
security:
- ServiceAccounts: []
- DigestAuth: []
tags:


# --- truncated at 32 KB (60 KB total) ---
# Full source: https://artifacts.apis.io/mongodb/openapi/mongodb-collection-level-metrics-api-openapi.yml