Docs Menu
Docs Home
/
MongoDB Cloud Manager
/ / / /

Add Pinned Namespaces

On this page

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

Add a list of namespaces to an existing pinned namespaces list for collection-level query latency metrics collection for the specified project and cluster.

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

PATCH /groups/{PROJECT-ID}/clusters/{hostClusterId}/collStats/pinned
Parameter
Type
Description
PROJECT-ID
string
(Required.) Unique 24-hexadecimal digit string that identifies the project that contains the namespaces to pin.
hostClusterId
string
(Required.) Unique identifier for the cluster that contains the namespaces to pin.

All parameters are optional.

Name
Type
Description
Default
pretty
boolean
false
envelope
boolean
Indicates whether or not to wrap the response in an envelope.
false
Name
Type
Description
Default
namespaces
array
List that contains each namespace to add to your pinned namespaces.
Name
Type
Description
clusterId
string
Unique string that identifies the cluster.
groupId
string
Unique 24-hexadecimal digit string that identifies the project.
pinnedNamespaces
array
List that contains each pinned namespace after the update completes.
curl --user '{PUBLIC-KEY}:{PRIVATE-KEY}' --digest \
--header 'Accept: application/json' \
--include \
--request PATCH 'https://{CLOUD-MANAGER-HOST}:{PORT}/api/public/v1.0/groups/{PROJECT-ID}/clusters/{hostClusterId}/collStats/pinned?pretty=true'
--data '{
"namespaces": ["testDb.collection1", "testDb.collection2"]
}'
HTTP/1.1 201 Created
Vary: Accept-Encoding
Content-Type: application/json
Strict-Transport-Security: max-age=300
Date: {dateInUnixFormat}
Connection: keep-alive
Content-Length: {requestLengthInBytes}
X-MongoDB-Service-Version: gitHash={gitHash}; versionString={ApplicationVersion}
{
"clusterId": "{hostClusterId}",
"groupId": "{PROJECT-ID}",
"pinnedNamespaces": [
"testDb.collection1",
"testDb.collection2"
]
}

Back

Pin Namespaces