Skip to content

Latest commit

 

History

History
1266 lines (822 loc) · 39.4 KB

File metadata and controls

1266 lines (822 loc) · 39.4 KB

\MonitorAPI

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

Method HTTP request Description
MonitorCleanupMaintenancePeriods Post /Monitor/{monitorGuid}/MaintenancePeriod/Cleanup/{beforeDate} Clears out all one-time maintenance periods for the specified monitor older than the specified date
MonitorCloneMonitor Post /Monitor/{monitorGuid}/Clone Creates a clone (duplicate) of the specified monitor.
MonitorCreateAuthorizationForMonitor Post /Monitor/{monitorGuid}/Authorizations Create monitor authorizations for monitor If the wanted authorizations requires other authorizations, these will be added as well
MonitorCreateMaintenancePeriodForMonitor Post /Monitor/{monitorGuid}/MaintenancePeriod Saves the new maintenance period provided for the specified monitor
MonitorDeleteAuthorizationForMonitor Delete /Monitor/{monitorGuid}/Authorizations/{authorizationGuid} Delete monitor authorization for monitor
MonitorDeleteMaintenancePeriodFromMonitor Delete /Monitor/{monitorGuid}/MaintenancePeriod/{maintenancePeriodId} Deletes the specified maintenance period from the specified monitor
MonitorDeleteMonitor Delete /Monitor/{monitorGuid} Deletes the specified monitor.
MonitorGetAllMaintenancePeriodsForMonitor Get /Monitor/{monitorGuid}/MaintenancePeriod Finds all maintenance periods for a monitor.
MonitorGetAuthorizationsOfMonitor Get /Monitor/{monitorGuid}/Authorizations Get monitor authorizations of monitor
MonitorGetMonitor Get /Monitor/{monitorGuid} Returns the definition of the specified monitor.
MonitorGetMonitorGroups Get /Monitor/{monitorGuid}/MonitorGroup Returns the Guid of each monitor group where the specified monitor is a member of.
MonitorGetMonitors Get /Monitor Returns the definition of all monitors available in the account.
MonitorGetMonitorsByMonitorGroup Get /Monitor/MonitorGroup/{monitorGroupGuid} Returns the definition of all monitors available in the account that are a member of the specified monitor group.
MonitorPatchMonitor Patch /Monitor/{monitorGuid} Partially updates the definition of the specified monitor.
MonitorPostMonitor Post /Monitor Creates a new monitor.
MonitorPostMonitorAndAddToMonitorGroup Post /Monitor/MonitorGroup/{monitorGroupGuid} Creates a new monitor and adds it to specified monitor group.
MonitorPutMonitor Put /Monitor/{monitorGuid} Updates the definition of the specified monitor.
MonitorUpdateMaintenancePeriodForMonitor Put /Monitor/{monitorGuid}/MaintenancePeriod/{maintenancePeriodId} Updates the specified maintenance schedule for the specified monitor

MonitorCleanupMaintenancePeriods

MonitorCleanupMaintenancePeriods(ctx, monitorGuid, beforeDate).Execute()

Clears out all one-time maintenance periods for the specified monitor older than the specified date

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/JetManiack/go-uptrends-api"
)

func main() {
	monitorGuid := "monitorGuid_example" // string | 
	beforeDate := TODO // interface{} | A string representing the date, formatted as \"yyyy-MM-dd\"

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.MonitorAPI.MonitorCleanupMaintenancePeriods(context.Background(), monitorGuid, beforeDate).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `MonitorAPI.MonitorCleanupMaintenancePeriods``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
monitorGuid string
beforeDate interface{} A string representing the date, formatted as "yyyy-MM-dd"

Other Parameters

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

Name Type Description Notes

Return type

(empty response body)

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]

MonitorCloneMonitor

Monitor MonitorCloneMonitor(ctx, monitorGuid).IncludeMaintenancePeriods(includeMaintenancePeriods).IncludeMonitorGroups(includeMonitorGroups).Execute()

Creates a clone (duplicate) of the specified monitor.

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/JetManiack/go-uptrends-api"
)

func main() {
	monitorGuid := "monitorGuid_example" // string | The guid of the monitor you want to clone.
	includeMaintenancePeriods := true // bool | Whether or not to also copy the maintenance periods into the clone. (optional) (default to true)
	includeMonitorGroups := true // bool | Whether or not to also copy the monitor group memberships into the clone. (optional) (default to true)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.MonitorAPI.MonitorCloneMonitor(context.Background(), monitorGuid).IncludeMaintenancePeriods(includeMaintenancePeriods).IncludeMonitorGroups(includeMonitorGroups).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `MonitorAPI.MonitorCloneMonitor``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `MonitorCloneMonitor`: Monitor
	fmt.Fprintf(os.Stdout, "Response from `MonitorAPI.MonitorCloneMonitor`: %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 you want to clone.

Other Parameters

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

Name Type Description Notes

includeMaintenancePeriods | bool | Whether or not to also copy the maintenance periods into the clone. | [default to true] includeMonitorGroups | bool | Whether or not to also copy the monitor group memberships into the clone. | [default to true]

Return type

Monitor

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]

MonitorCreateAuthorizationForMonitor

[]MonitorAuthorization MonitorCreateAuthorizationForMonitor(ctx, monitorGuid).MonitorAuthorization(monitorAuthorization).Execute()

Create monitor authorizations for monitor If the wanted authorizations requires other authorizations, these will be added as well

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/JetManiack/go-uptrends-api"
)

func main() {
	monitorGuid := "monitorGuid_example" // string | The monitor GUID
	monitorAuthorization := *openapiclient.NewMonitorAuthorization(openapiclient.MonitorAuthorizationType("ViewMonitorData")) // MonitorAuthorization | Authorization to add (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.MonitorAPI.MonitorCreateAuthorizationForMonitor(context.Background(), monitorGuid).MonitorAuthorization(monitorAuthorization).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `MonitorAPI.MonitorCreateAuthorizationForMonitor``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `MonitorCreateAuthorizationForMonitor`: []MonitorAuthorization
	fmt.Fprintf(os.Stdout, "Response from `MonitorAPI.MonitorCreateAuthorizationForMonitor`: %v\n", resp)
}

Path Parameters

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

Other Parameters

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

Name Type Description Notes

monitorAuthorization | MonitorAuthorization | Authorization to add |

Return type

[]MonitorAuthorization

Authorization

basicauth

HTTP request headers

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

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

MonitorCreateMaintenancePeriodForMonitor

MaintenancePeriod MonitorCreateMaintenancePeriodForMonitor(ctx, monitorGuid).MaintenancePeriod(maintenancePeriod).Execute()

Saves the new maintenance period provided for the specified monitor

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/JetManiack/go-uptrends-api"
)

func main() {
	monitorGuid := "monitorGuid_example" // string | 
	maintenancePeriod := *openapiclient.NewMaintenancePeriod(int32(123), openapiclient.ScheduleMode("OneTime"), openapiclient.MaintenanceTypes("DisableMonitoring")) // MaintenancePeriod |  (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.MonitorAPI.MonitorCreateMaintenancePeriodForMonitor(context.Background(), monitorGuid).MaintenancePeriod(maintenancePeriod).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `MonitorAPI.MonitorCreateMaintenancePeriodForMonitor``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `MonitorCreateMaintenancePeriodForMonitor`: MaintenancePeriod
	fmt.Fprintf(os.Stdout, "Response from `MonitorAPI.MonitorCreateMaintenancePeriodForMonitor`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
monitorGuid string

Other Parameters

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

Name Type Description Notes

maintenancePeriod | MaintenancePeriod | |

Return type

MaintenancePeriod

Authorization

basicauth

HTTP request headers

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

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

MonitorDeleteAuthorizationForMonitor

MonitorDeleteAuthorizationForMonitor(ctx, monitorGuid, authorizationGuid).Execute()

Delete monitor authorization for monitor

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/JetManiack/go-uptrends-api"
)

func main() {
	monitorGuid := "monitorGuid_example" // string | The monitor GUID
	authorizationGuid := "authorizationGuid_example" // string | The authorization GUID that needs to be deleted

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.MonitorAPI.MonitorDeleteAuthorizationForMonitor(context.Background(), monitorGuid, authorizationGuid).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `MonitorAPI.MonitorDeleteAuthorizationForMonitor``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
monitorGuid string The monitor GUID
authorizationGuid string The authorization GUID that needs to be deleted

Other Parameters

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

Name Type Description Notes

Return type

(empty response body)

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]

MonitorDeleteMaintenancePeriodFromMonitor

MonitorDeleteMaintenancePeriodFromMonitor(ctx, monitorGuid, maintenancePeriodId).Execute()

Deletes the specified maintenance period from the specified monitor

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/JetManiack/go-uptrends-api"
)

func main() {
	monitorGuid := "monitorGuid_example" // string | 
	maintenancePeriodId := int32(56) // int32 | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.MonitorAPI.MonitorDeleteMaintenancePeriodFromMonitor(context.Background(), monitorGuid, maintenancePeriodId).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `MonitorAPI.MonitorDeleteMaintenancePeriodFromMonitor``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
monitorGuid string
maintenancePeriodId int32

Other Parameters

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

Name Type Description Notes

Return type

(empty response body)

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]

MonitorDeleteMonitor

MonitorDeleteMonitor(ctx, monitorGuid).Execute()

Deletes the specified monitor.

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/JetManiack/go-uptrends-api"
)

func main() {
	monitorGuid := "monitorGuid_example" // string | The guid of the monitor you want to delete.

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.MonitorAPI.MonitorDeleteMonitor(context.Background(), monitorGuid).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `MonitorAPI.MonitorDeleteMonitor``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
monitorGuid string The guid of the monitor you want to delete.

Other Parameters

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

Name Type Description Notes

Return type

(empty response body)

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]

MonitorGetAllMaintenancePeriodsForMonitor

[]MaintenancePeriod MonitorGetAllMaintenancePeriodsForMonitor(ctx, monitorGuid).Execute()

Finds all maintenance periods for a monitor.

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/JetManiack/go-uptrends-api"
)

func main() {
	monitorGuid := "monitorGuid_example" // string | The guid of the monitor you want to find the maintenance periods of.

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.MonitorAPI.MonitorGetAllMaintenancePeriodsForMonitor(context.Background(), monitorGuid).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `MonitorAPI.MonitorGetAllMaintenancePeriodsForMonitor``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `MonitorGetAllMaintenancePeriodsForMonitor`: []MaintenancePeriod
	fmt.Fprintf(os.Stdout, "Response from `MonitorAPI.MonitorGetAllMaintenancePeriodsForMonitor`: %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 you want to find the maintenance periods of.

Other Parameters

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

Name Type Description Notes

Return type

[]MaintenancePeriod

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]

MonitorGetAuthorizationsOfMonitor

[]MonitorAuthorization MonitorGetAuthorizationsOfMonitor(ctx, monitorGuid).Execute()

Get monitor authorizations of monitor

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/JetManiack/go-uptrends-api"
)

func main() {
	monitorGuid := "monitorGuid_example" // string | The monitor GUID

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.MonitorAPI.MonitorGetAuthorizationsOfMonitor(context.Background(), monitorGuid).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `MonitorAPI.MonitorGetAuthorizationsOfMonitor``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `MonitorGetAuthorizationsOfMonitor`: []MonitorAuthorization
	fmt.Fprintf(os.Stdout, "Response from `MonitorAPI.MonitorGetAuthorizationsOfMonitor`: %v\n", resp)
}

Path Parameters

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

Other Parameters

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

Name Type Description Notes

Return type

[]MonitorAuthorization

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]

MonitorGetMonitor

Monitor MonitorGetMonitor(ctx, monitorGuid).Filter(filter).Execute()

Returns the definition of the specified monitor.

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/JetManiack/go-uptrends-api"
)

func main() {
	monitorGuid := "monitorGuid_example" // string | The Guid of the requested monitor.
	filter := "filter_example" // string | Provide the option to only retrieve the requested fields. E.g. \"Name,IsActive\". (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.MonitorAPI.MonitorGetMonitor(context.Background(), monitorGuid).Filter(filter).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `MonitorAPI.MonitorGetMonitor``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `MonitorGetMonitor`: Monitor
	fmt.Fprintf(os.Stdout, "Response from `MonitorAPI.MonitorGetMonitor`: %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 requested monitor.

Other Parameters

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

Name Type Description Notes

filter | string | Provide the option to only retrieve the requested fields. E.g. "Name,IsActive". |

Return type

Monitor

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]

MonitorGetMonitorGroups

[]string MonitorGetMonitorGroups(ctx, monitorGuid).Execute()

Returns the Guid of each monitor group where the specified monitor is a member of.

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/JetManiack/go-uptrends-api"
)

func main() {
	monitorGuid := "monitorGuid_example" // string | The Guid of the requested monitor.

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.MonitorAPI.MonitorGetMonitorGroups(context.Background(), monitorGuid).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `MonitorAPI.MonitorGetMonitorGroups``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `MonitorGetMonitorGroups`: []string
	fmt.Fprintf(os.Stdout, "Response from `MonitorAPI.MonitorGetMonitorGroups`: %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 requested monitor.

Other Parameters

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

Name Type Description Notes

Return type

[]string

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]

MonitorGetMonitors

[]Monitor MonitorGetMonitors(ctx).Filter(filter).Execute()

Returns the definition of all monitors available in the account.

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/JetManiack/go-uptrends-api"
)

func main() {
	filter := "filter_example" // string | Provide the option to only retrieve the requested fields. E.g. \"Name,IsActive\". (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.MonitorAPI.MonitorGetMonitors(context.Background()).Filter(filter).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `MonitorAPI.MonitorGetMonitors``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `MonitorGetMonitors`: []Monitor
	fmt.Fprintf(os.Stdout, "Response from `MonitorAPI.MonitorGetMonitors`: %v\n", resp)
}

Path Parameters

Other Parameters

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

Name Type Description Notes
filter string Provide the option to only retrieve the requested fields. E.g. "Name,IsActive".

Return type

[]Monitor

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]

MonitorGetMonitorsByMonitorGroup

[]Monitor MonitorGetMonitorsByMonitorGroup(ctx, monitorGroupGuid).Filter(filter).Execute()

Returns the definition of all monitors available in the account that are a member of the specified monitor group.

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/JetManiack/go-uptrends-api"
)

func main() {
	monitorGroupGuid := "monitorGroupGuid_example" // string | The Guid of the requested monitor group to retrieve the monitors of.
	filter := "filter_example" // string | Provide the option to only retrieve the requested fields. E.g. \"Name,IsActive\". (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.MonitorAPI.MonitorGetMonitorsByMonitorGroup(context.Background(), monitorGroupGuid).Filter(filter).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `MonitorAPI.MonitorGetMonitorsByMonitorGroup``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `MonitorGetMonitorsByMonitorGroup`: []Monitor
	fmt.Fprintf(os.Stdout, "Response from `MonitorAPI.MonitorGetMonitorsByMonitorGroup`: %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 requested monitor group to retrieve the monitors of.

Other Parameters

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

Name Type Description Notes

filter | string | Provide the option to only retrieve the requested fields. E.g. "Name,IsActive". |

Return type

[]Monitor

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]

MonitorPatchMonitor

MonitorPatchMonitor(ctx, monitorGuid).Monitor(monitor).Execute()

Partially updates the definition of the specified monitor.

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/JetManiack/go-uptrends-api"
)

func main() {
	monitorGuid := "monitorGuid_example" // string | The Guid of the monitor that should be updated.
	monitor := *openapiclient.NewMonitor() // Monitor | The partial definition for the monitor that should be updated. (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.MonitorAPI.MonitorPatchMonitor(context.Background(), monitorGuid).Monitor(monitor).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `MonitorAPI.MonitorPatchMonitor``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
}

Path Parameters

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

Other Parameters

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

Name Type Description Notes

monitor | Monitor | The partial definition for the monitor that should be updated. |

Return type

(empty response body)

Authorization

basicauth

HTTP request headers

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

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

MonitorPostMonitor

Monitor MonitorPostMonitor(ctx).Monitor(monitor).Execute()

Creates a new monitor.

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/JetManiack/go-uptrends-api"
)

func main() {
	monitor := *openapiclient.NewMonitor() // Monitor | The complete definition of the monitor that should be created. (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.MonitorAPI.MonitorPostMonitor(context.Background()).Monitor(monitor).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `MonitorAPI.MonitorPostMonitor``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `MonitorPostMonitor`: Monitor
	fmt.Fprintf(os.Stdout, "Response from `MonitorAPI.MonitorPostMonitor`: %v\n", resp)
}

Path Parameters

Other Parameters

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

Name Type Description Notes
monitor Monitor The complete definition of the monitor that should be created.

Return type

Monitor

Authorization

basicauth

HTTP request headers

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

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

MonitorPostMonitorAndAddToMonitorGroup

Monitor MonitorPostMonitorAndAddToMonitorGroup(ctx, monitorGroupGuid).Monitor(monitor).Execute()

Creates a new monitor and adds it to specified monitor group.

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/JetManiack/go-uptrends-api"
)

func main() {
	monitorGroupGuid := "monitorGroupGuid_example" // string | The Guid of the monitor group to add new monitor to.
	monitor := *openapiclient.NewMonitor() // Monitor | The complete definition of the monitor that should be created. (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.MonitorAPI.MonitorPostMonitorAndAddToMonitorGroup(context.Background(), monitorGroupGuid).Monitor(monitor).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `MonitorAPI.MonitorPostMonitorAndAddToMonitorGroup``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `MonitorPostMonitorAndAddToMonitorGroup`: Monitor
	fmt.Fprintf(os.Stdout, "Response from `MonitorAPI.MonitorPostMonitorAndAddToMonitorGroup`: %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 to add new monitor to.

Other Parameters

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

Name Type Description Notes

monitor | Monitor | The complete definition of the monitor that should be created. |

Return type

Monitor

Authorization

basicauth

HTTP request headers

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

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

MonitorPutMonitor

MonitorPutMonitor(ctx, monitorGuid).Monitor(monitor).Execute()

Updates the definition of the specified monitor.

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/JetManiack/go-uptrends-api"
)

func main() {
	monitorGuid := "monitorGuid_example" // string | The Guid of the monitor that should be updated.
	monitor := *openapiclient.NewMonitor() // Monitor | The complete definition for the monitor that should be updated. (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.MonitorAPI.MonitorPutMonitor(context.Background(), monitorGuid).Monitor(monitor).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `MonitorAPI.MonitorPutMonitor``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
}

Path Parameters

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

Other Parameters

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

Name Type Description Notes

monitor | Monitor | The complete definition for the monitor that should be updated. |

Return type

(empty response body)

Authorization

basicauth

HTTP request headers

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

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

MonitorUpdateMaintenancePeriodForMonitor

MonitorUpdateMaintenancePeriodForMonitor(ctx, monitorGuid, maintenancePeriodId).MaintenancePeriod(maintenancePeriod).Execute()

Updates the specified maintenance schedule for the specified monitor

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/JetManiack/go-uptrends-api"
)

func main() {
	monitorGuid := "monitorGuid_example" // string | 
	maintenancePeriodId := int32(56) // int32 | 
	maintenancePeriod := *openapiclient.NewMaintenancePeriod(int32(123), openapiclient.ScheduleMode("OneTime"), openapiclient.MaintenanceTypes("DisableMonitoring")) // MaintenancePeriod |  (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.MonitorAPI.MonitorUpdateMaintenancePeriodForMonitor(context.Background(), monitorGuid, maintenancePeriodId).MaintenancePeriod(maintenancePeriod).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `MonitorAPI.MonitorUpdateMaintenancePeriodForMonitor``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
monitorGuid string
maintenancePeriodId int32

Other Parameters

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

Name Type Description Notes

maintenancePeriod | MaintenancePeriod | |

Return type

(empty response body)

Authorization

basicauth

HTTP request headers

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

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