Generate Daily Usage Snapshot
On this page
If MongoDB Usage UI
is set to On, you can
trigger this endpoint which tells Ops Manager to:
Generate a snapshot. This snapshot of all deployments belonging to all projects and organizations includes the current information for each
mongod
andmongos
process:memory statistics
date
organization
project
IP
IANA port
Calculate assignments. This populates the
assignment
collection. The endpoint makes Ops Manager review the snapshot for that day and copy each process with an assigned server type. Ops Manager discovers the process's server type from its host. The host's server type could have been set in the admin page. If the host's server type was not set, Ops Manager assigns the project's default server type when the host was created to that host.
You might call this endpoint if you have no assignments in the
assignments
collection but want to view the MongoDB Usage Admin UI.
This may happen in the following cases:
You enabled
MongoDB Usage Data Collection
but the automated job that collects the data has yet run for the first time.You dropped or emptied the
assignments
collection.You did not enable
MongoDB Usage Data Collection
because you wanted to collect usage data one time, not every day.
Base URL: https://{OPSMANAGER-HOST}:{PORT}/api/public/v1.0
Required Role
This resource requires the
API Key to have
the Global Owner
role.
Resource
POST /usage/dailyCapture
Request Path Parameters
This endpoint doesn't use HTTP request path parameters.
Request Query Parameters
The following query parameters are optional:
Name | Type | Description | Default | ||||||
---|---|---|---|---|---|---|---|---|---|
pageNum | integer | Page number (1-index based). | 1 | ||||||
itemsPerPage | integer | Number of items to return per page, up to a maximum of 500. | 100 | ||||||
pretty | boolean | Indicates whether the response body should be in a
prettyprint format. | false | ||||||
envelope | boolean | Indicates whether or not to wrap the response in an envelope. Some API clients cannot access the HTTP response headers or
status code. To remediate this, set For endpoints that return one result, response body includes:
For endpoints that return a list of results, the | None |
Request Body Parameters
This endpoint doesn't use HTTP request body parameters.
Response
This endpoint does not have response elements.
Example Request
1 curl --user "{PUBLIC-KEY}:{PRIVATE-KEY}" --digest \ 2 --header "Accept: application/json" \ 3 --header "Content-Type: application/json" \ 4 --include \ 5 --request POST "https://<OpsManagerHost>:<Port>/api/public/v1.0/usage/dailyCapture?pretty=true"
Example Response
Response Header
401 Unauthorized Content-Type: application/json;charset=ISO-8859-1 Date: {dateInUnixFormat} WWW-Authenticate: Digest realm="MMS Public API", domain="", nonce="{nonce}", algorithm=MD5, op="auth", stale=false Content-Length: {requestLengthInBytes} Connection: keep-alive
200 OK 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}
Response Body
This endpoint doesn't return a response body.