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(ctx, monitorGuid, beforeDate).Execute()
Clears out all one-time maintenance periods for the specified monitor older than the specified date
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)
}
}| 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 are passed through a pointer to a apiMonitorCleanupMaintenancePeriodsRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
(empty response body)
- Content-Type: Not defined
- Accept: application/json, application/xml
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Monitor MonitorCloneMonitor(ctx, monitorGuid).IncludeMaintenancePeriods(includeMaintenancePeriods).IncludeMonitorGroups(includeMonitorGroups).Execute()
Creates a clone (duplicate) of the specified monitor.
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)
}| 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 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]
- Content-Type: Not defined
- Accept: application/json, application/xml
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]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
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)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| monitorGuid | string | The monitor GUID |
Other parameters are passed through a pointer to a apiMonitorCreateAuthorizationForMonitorRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
monitorAuthorization | MonitorAuthorization | Authorization to add |
- 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]
MaintenancePeriod MonitorCreateMaintenancePeriodForMonitor(ctx, monitorGuid).MaintenancePeriod(maintenancePeriod).Execute()
Saves the new maintenance period provided for the specified monitor
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)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| monitorGuid | string |
Other parameters are passed through a pointer to a apiMonitorCreateMaintenancePeriodForMonitorRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
maintenancePeriod | MaintenancePeriod | |
- 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(ctx, monitorGuid, authorizationGuid).Execute()
Delete monitor authorization for monitor
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)
}
}| 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 are passed through a pointer to a apiMonitorDeleteAuthorizationForMonitorRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
(empty response body)
- Content-Type: Not defined
- Accept: application/json, application/xml
[Back to top] [Back to API list] [Back to Model list] [Back to README]
MonitorDeleteMaintenancePeriodFromMonitor(ctx, monitorGuid, maintenancePeriodId).Execute()
Deletes the specified maintenance period from the specified monitor
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)
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| monitorGuid | string | ||
| maintenancePeriodId | int32 |
Other parameters are passed through a pointer to a apiMonitorDeleteMaintenancePeriodFromMonitorRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
(empty response body)
- Content-Type: Not defined
- Accept: application/json, application/xml
[Back to top] [Back to API list] [Back to Model list] [Back to README]
MonitorDeleteMonitor(ctx, monitorGuid).Execute()
Deletes the specified monitor.
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)
}
}| 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 are passed through a pointer to a apiMonitorDeleteMonitorRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
(empty response body)
- Content-Type: Not defined
- Accept: application/json, application/xml
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]MaintenancePeriod MonitorGetAllMaintenancePeriodsForMonitor(ctx, monitorGuid).Execute()
Finds all maintenance periods for a monitor.
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)
}| 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 are passed through a pointer to a apiMonitorGetAllMaintenancePeriodsForMonitorRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
- Content-Type: Not defined
- Accept: application/json, application/xml
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]MonitorAuthorization MonitorGetAuthorizationsOfMonitor(ctx, monitorGuid).Execute()
Get monitor authorizations of monitor
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)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| monitorGuid | string | The monitor GUID |
Other parameters are passed through a pointer to a apiMonitorGetAuthorizationsOfMonitorRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
- Content-Type: Not defined
- Accept: application/json, application/xml
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Monitor MonitorGetMonitor(ctx, monitorGuid).Filter(filter).Execute()
Returns the definition of the specified monitor.
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)
}| 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 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". |
- Content-Type: Not defined
- Accept: application/json, application/xml
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]string MonitorGetMonitorGroups(ctx, monitorGuid).Execute()
Returns the Guid of each monitor group where the specified monitor is a member of.
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)
}| 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 are passed through a pointer to a apiMonitorGetMonitorGroupsRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
[]string
- Content-Type: Not defined
- Accept: application/json, application/xml
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]Monitor MonitorGetMonitors(ctx).Filter(filter).Execute()
Returns the definition of all monitors available in the account.
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)
}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". |
- Content-Type: Not defined
- Accept: application/json, application/xml
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]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.
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)
}| 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 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". |
- Content-Type: Not defined
- Accept: application/json, application/xml
[Back to top] [Back to API list] [Back to Model list] [Back to README]
MonitorPatchMonitor(ctx, monitorGuid).Monitor(monitor).Execute()
Partially updates the definition of the specified monitor.
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)
}
}| 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 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. |
(empty response body)
- 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]
Monitor MonitorPostMonitor(ctx).Monitor(monitor).Execute()
Creates a new monitor.
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)
}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. |
- 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]
Monitor MonitorPostMonitorAndAddToMonitorGroup(ctx, monitorGroupGuid).Monitor(monitor).Execute()
Creates a new monitor and adds it to specified monitor group.
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)
}| 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 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. |
- 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(ctx, monitorGuid).Monitor(monitor).Execute()
Updates the definition of the specified monitor.
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)
}
}| 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 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. |
(empty response body)
- 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(ctx, monitorGuid, maintenancePeriodId).MaintenancePeriod(maintenancePeriod).Execute()
Updates the specified maintenance schedule for the specified monitor
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)
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| monitorGuid | string | ||
| maintenancePeriodId | int32 |
Other parameters are passed through a pointer to a apiMonitorUpdateMaintenancePeriodForMonitorRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
maintenancePeriod | MaintenancePeriod | |
(empty response body)
- 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]