Monitoring

Endpoints related to gathered metrics for building dashboards, charts, and graphs.

Get Metrics

A basic query for retrieving metrics. For a more complex and granular report, see the /v1/monitoring/metrics/aggregate endpoint.

Requires the monitor-view capability.

SecuritybearerAuth and hubAuth
Request
query Parameters
object

Filter Field

The filter field is a key-value object, where the key is what you would like to filter, and the value is the value you're filtering for.

To search via labels, use label:<label key> as the filter. For example in URL parameters, filter[label:test]=abc.

Responses
200

Returns an array of metrics.

default

General error response from the platform

get/v1/monitoring/metrics
Response samples
application/json
{
  • "data": [
    ]
}

Generate Aggregated Metrics

Generate a metric report using an aggregated pipeline query with Mongo. This endpoint provides ultimate flexibility in generating data for dashboards, charts, graphs, etc.

You should always provide a time range filter to this call, either through the filter parameter or in the critera body. The aggregate is limited to 25,000 input documents, so a time frame will give the best results.

Requires the monitor-view capability.

SecuritybearerAuth and hubAuth
Request
query Parameters
object

Filter Field

The filter field is a key-value object, where the key is what you would like to filter, and the value is the value you're filtering for.

Request Body schema: application/json

The mongo syntax aggregate pipeline for querying metrics and formulating a report.

object

The criteria to add to the first match. Cycle will automatically provide the hub ID.

Array of objects

The aggregation pipeline. Supports Mongo-style syntax and operators.

Responses
200

Returns an object matching the shape of the output of the aggregated pipeline output.

default

General error response from the platform

post/v1/monitoring/metrics/aggregate
Request samples
application/json
{
  • "criteria": { },
  • "pipeline": [
    ]
}
Response samples
application/json
{
  • "data": [
    ]
}

Get Events

A basic query for retrieving events. For a more complex and granular report, see the /v1/monitoring/events/aggregate endpoint.

Requires the monitor-view capability.

SecuritybearerAuth and hubAuth
Request
query Parameters
object

Filter Field

The filter field is a key-value object, where the key is what you would like to filter, and the value is the value you're filtering for.

To search via labels, use label:<label key> as the filter. For example in URL parameters, filter[label:test]=abc.

Responses
200

Returns an array of events.

default

General error response from the platform

get/v1/monitoring/events
Response samples
application/json
{
  • "data": [
    ]
}

Generate Aggregated Events

Generate an events report using an aggregated pipeline query with Mongo. This endpoint provides ultimate flexibility in generating data for dashboards, charts, graphs, etc.

You should always provide a time range filter to this call, either through the filter parameter or in the critera body. The aggregate is limited to 25,000 input documents, so a time frame will give the best results.

Requires the monitor-view capability.

SecuritybearerAuth and hubAuth
Request
query Parameters
object

Filter Field

The filter field is a key-value object, where the key is what you would like to filter, and the value is the value you're filtering for.

Request Body schema: application/json

The mongo syntax aggregate pipeline for querying events and formulating a report.

object

The criteria to add to the first match. Cycle will automatically provide the hub ID.

Array of objects

The aggregation pipeline. Supports Mongo-style syntax and operators.

Responses
200

Returns an object matching the shape of the output of the aggregated pipeline output.

default

General error response from the platform

post/v1/monitoring/events/aggregate
Request samples
application/json
{
  • "criteria": { },
  • "pipeline": [
    ]
}
Response samples
application/json
{
  • "data": [
    ]
}