Skip to content

Latest commit

 

History

History
162 lines (110 loc) · 6.27 KB

StatisticsApi.md

File metadata and controls

162 lines (110 loc) · 6.27 KB

\StatisticsApi

All URIs are relative to https://api.uptrends.com/v4

Method HTTP request Description
StatisticsGetMonitorGroupStatistics Get /Statistics/MonitorGroup/{monitorGroupGuid} Gets the monitor group statistics.
StatisticsGetMonitorStatistics Get /Statistics/Monitor/{monitorGuid} Gets the monitor statistics.

StatisticsGetMonitorGroupStatistics

StatisticsResponse StatisticsGetMonitorGroupStatistics(ctx, monitorGroupGuid).Filter(filter).Start(start).End(end).PresetPeriod(presetPeriod).Execute()

Gets the monitor group statistics.

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    monitorGroupGuid := "monitorGroupGuid_example" // string | The Guid of the monitor group.
    filter := "filter_example" // string | The filter for the requested response fields. E.g. \"Alerts,SlaTarget\". (optional)
    start := TODO // interface{} | The start of a custom period (can't be used together with the PresetPeriod parameter) (optional)
    end := TODO // interface{} | The end of a custom period (optional)
    presetPeriod := "presetPeriod_example" // string | The requested time period. (optional) (default to "Last24Hours")

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.StatisticsApi.StatisticsGetMonitorGroupStatistics(context.Background(), monitorGroupGuid).Filter(filter).Start(start).End(end).PresetPeriod(presetPeriod).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `StatisticsApi.StatisticsGetMonitorGroupStatistics``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `StatisticsGetMonitorGroupStatistics`: StatisticsResponse
    fmt.Fprintf(os.Stdout, "Response from `StatisticsApi.StatisticsGetMonitorGroupStatistics`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
monitorGroupGuid string The Guid of the monitor group.

Other Parameters

Other parameters are passed through a pointer to a apiStatisticsGetMonitorGroupStatisticsRequest struct via the builder pattern

Name Type Description Notes

filter | string | The filter for the requested response fields. E.g. "Alerts,SlaTarget". | start | interface{} | The start of a custom period (can't be used together with the PresetPeriod parameter) | end | interface{} | The end of a custom period | presetPeriod | string | The requested time period. | [default to "Last24Hours"]

Return type

StatisticsResponse

Authorization

basicauth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/xml

[Back to top] [Back to API list] [Back to Model list] [Back to README]

StatisticsGetMonitorStatistics

StatisticsResponse StatisticsGetMonitorStatistics(ctx, monitorGuid).Filter(filter).Start(start).End(end).PresetPeriod(presetPeriod).Execute()

Gets the monitor statistics.

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    monitorGuid := "monitorGuid_example" // string | The Guid of the monitor.
    filter := "filter_example" // string | The filter for the requested response fields. E.g. \"Alerts,SlaTarget\". (optional)
    start := TODO // interface{} | The start of a custom period (can't be used together with the PresetPeriod parameter) (optional)
    end := TODO // interface{} | The end of a custom period (optional)
    presetPeriod := "presetPeriod_example" // string | The requested time period. (optional) (default to "Last24Hours")

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.StatisticsApi.StatisticsGetMonitorStatistics(context.Background(), monitorGuid).Filter(filter).Start(start).End(end).PresetPeriod(presetPeriod).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `StatisticsApi.StatisticsGetMonitorStatistics``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `StatisticsGetMonitorStatistics`: StatisticsResponse
    fmt.Fprintf(os.Stdout, "Response from `StatisticsApi.StatisticsGetMonitorStatistics`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
monitorGuid string The Guid of the monitor.

Other Parameters

Other parameters are passed through a pointer to a apiStatisticsGetMonitorStatisticsRequest struct via the builder pattern

Name Type Description Notes

filter | string | The filter for the requested response fields. E.g. "Alerts,SlaTarget". | start | interface{} | The start of a custom period (can't be used together with the PresetPeriod parameter) | end | interface{} | The end of a custom period | presetPeriod | string | The requested time period. | [default to "Last24Hours"]

Return type

StatisticsResponse

Authorization

basicauth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/xml

[Back to top] [Back to API list] [Back to Model list] [Back to README]