Menu

GraphQL API

This feature is in a private beta. All apps on the pro plan have access. You can also contact us to use the api. After the beta, the api will be included in all paid plans.

While in beta, there could be breaking changes to the schema.

Most data collected and aggregated for your app can be accessed through the graphql api. Use it to build custom dashboards or integrations, or to explore data in ways not possible through Monti APM's UI.

We value all feedback related to the api. Think something could be improved or is missing? Please send us a message using the Support button on https://app.montiapm.com.

Authenticate

Send a POST request to https://api.montiapm.com/auth with a json object in the body:

{
  "appId": "< app id >",
  "appSecret": "< app secret >",
  "schema": "core"
}

Replace the app id and app secret with the values for your app. You can view them in the app's setting window on https://app.montiapm.com.

The response will be a JWT token. A separate JWT token will be needed for each app.

Quering

Queries can be sent in a POST request to https://api.montiapm.com/core. The authorization header should be set to the JWT token created for the app.

Documentation

A GraphiQL instance can be accessed at http://api.montiapm.com/docs/explore.html. Documentation is available in the sidebar.

Example Queries

Highest memory usage for each server during the last hour:

meteorSystemMetrics (appId: "Xp7kch4E5Yr9HMjuw" metric:RAM_USAGE groupByHost:true) {
    host
    percentile(value:100)
}

Method traces with response time larger than 1,000ms in the last hour:

meteorMethodTraces (appId: "Xp7kch4E5Yr9HMjuw" minValue:1000) {
    id
    host
    method
    totalValue
}

Limits

Each aggregation is limited to 3,000ms. If it exceeds the limit, try reducing the difference between the start and stop times, or change the resolution. In the future, we will add limits for the total time spent by aggregations each hour and for other types of data.