Retrieve App Services metrics

GET /groups/{groupId}/apps/{appId}/metrics

Retrieves a variety of metrics, including: Compute Time, Data Transfer, Sync Minutes, Requests Succeeded, Requests Failed. For a complete list of available metrics, see App Services Metrics Reference.

Path parameters

Query parameters

  • start string Required

    The ISO-8601 date and time of the start of the query period (e.g. "2022-10-27T14:01:01Z").

  • end string Required

    The ISO-8601 date and time of the end of the query period (e.g. "2022-12-27T14:01:01Z").

  • granularity string Required

    Specifies the granularity of the query period as an ISO-8601 duration value. Examples include "P31D" (31 day), "PT1H" (1 hour), and "PT5M" (5 minutes).

  • metrics string

    The name of the metric to filter by. For detailed information on the available metrics and their units, see App Services Metrics Reference.

    Values are ACTIVE_OPEN_SYNC_SESSIONS, AUTH_EGRESS_BYTES, AUTH_FAILED_REQUESTS, AUTH_RESPONSE_MS, AUTH_SUCCESSFUL_LOGIN, AUTH_SUCCESSFUL_REQUESTS, AUTH_TOTAL_USERS, ENDPOINTS_COMPUTE_MS, ENDPOINTS_EGRESS_BYTES, ENDPOINTS_FAILED_REQUEST, ENDPOINTS_RESPONSE_MS, ENDPOINTS_SUCCESSFUL_REQUESTS, GRAPHQL_RESPONSE_MS, GRAPHQL_COMPUTE_MS, GRAPHQL_EGRESS_BYTES, GRAPHQL_FAILED_REQUESTS, GRAPHQL_SUCCESSFUL_REQUESTS, LF_RESPONSE_MS, OVERALL_COMPUTE_MS, OVERALL_EGRESS_BYTES, OVERALL_FAILED_REQUESTS, OVERALL_SUCCESSFUL_REQUESTS, OVERALL_SYNC_MINUTES, SDK_COMPUTE_MS, SDK_EGRESS_BYTES, SDK_FAILED_REQUESTS, SDK_FNS_RESPONSE_MS, SDK_MQL_COMPUTE_MS, SDK_MQL_EGRESS_BYTES, SDK_MQL_FAILED_REQUESTS, SDK_MQL_RESPONSE_MS, SDK_MQL_SUCCESSFUL_REQUESTS, SDK_SUCCESSFUL_REQUESTS, SYNC_CLIENT_BOOTSTRAP_MS, SYNC_CLIENT_UPLOADS_INVALID, SYNC_CURRENT_OPLOG_LAG_MS_SUM, SYNC_EGRESS_BYTES, SYNC_FAILED_REQUESTS, SYNC_HISTORY_WRITE_MS, SYNC_MINUTES, SYNC_NUM_INTEGRATION_ATTEMPTS, SYNC_NUM_UNSYNCABLE_DOC, SYNC_OT_MS, SYNC_SESSIONS_ENDED, SYNC_SESSIONS_STARTED, SYNC_SUCCESSFUL_REQUESTS, SYNC_UPLOAD_PROPS_MS, TRIGGERS_COMPUTE_MS, TRIGGERS_CURRENT_OPLOG_LAG_MS_SUM, TRIGGERS_EGRESS_BYTES, TRIGGERS_FAILED_REQUESTS, TRIGGERS_RESPONSE_MS, or TRIGGERS_SUCCESSFUL_REQUESTS.

Responses

  • 200 application/json

    Successfully retrieved.

    Hide response attributes Show response attributes object
    • measurements array[object] Required

      The list of metrics.

      Hide measurements attributes Show measurements attributes object
      • data_points array[object]

        A set of data points for the given metric.

        Hide data_points attributes Show data_points attributes object
        • timestamp string

          The ISO-8601 date and time of the measurement.

        • value number

          The value of the measurement in the unit specified by the metric's unit property.

      • name string

        The name of the metric. For a complete list of available metrics and their units, see App Services Metrics Reference.

      • units string

        The unit of each data point's value property.

    • app_id string Required

      The app ID sent in the request.

    • app_name string Required

      The app's human-readable name.

    • group_id string Required

      The group ID sent in the request.

    • start string Required

      The date and time (ISO-8601 format) of the earliest requested measurement.

    • end string Required

      The date and time (ISO-8601 format) of the latest requested measurement.

    • granularity string Required

      The requested granularity of the metrics in ISO-8601 duration format.

GET /groups/{groupId}/apps/{appId}/metrics
curl \
 --request GET 'https://services.cloud.mongodb.com/api/admin/v3.0/groups/{groupId}/apps/{appId}/metrics?start=string&end=string&granularity=string' \
 --header "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
  "measurements": [
    {
      "data_points": [
        {
          "timestamp": "string",
          "value": 42.0
        }
      ],
      "name": "string",
      "units": "string"
    }
  ],
  "app_id": "string",
  "app_name": "string",
  "group_id": "string",
  "start": "2022-10-27T14:01:01Z",
  "end": "2022-12-27T14:01:01Z",
  "granularity": "string"
}