All URIs are relative to https://api.uptrends.com/v4
| Method | HTTP request | Description |
|---|---|---|
| SlaCreateSla | Post /Sla | Creates a new SLA. |
| SlaDeleteExclusionPeriod | Delete /Sla/{slaGuid}/ExclusionPeriod/{exclusionPeriodId} | Deletes the specified exclusion period for the specified SLA. |
| SlaDeleteSla | Delete /Sla/{slaGuid} | Deletes the specified SLA. |
| SlaGetExclusionPeriod | Get /Sla/{slaGuid}/ExclusionPeriod/{exclusionPeriodId} | Gets the specified exclusion period for the specified SLA. |
| SlaGetExclusionPeriods | Get /Sla/{slaGuid}/ExclusionPeriod | Gets a list of all exclusion periods for the specified SLA. |
| SlaGetSla | Get /Sla/{slaGuid} | Gets the specified SLA definition. |
| SlaGetSlas | Get /Sla | Gets a list of all SLA definitions. |
| SlaPatchExclusionPeriod | Patch /Sla/{slaGuid}/ExclusionPeriod/{exclusionPeriodId} | Partially updates the specified exclusion period for the specified SLA. |
| SlaPatchSla | Patch /Sla/{slaGuid} | Partially updates the definition of the specified SLA. |
| SlaPostExclusionPeriod | Post /Sla/{slaGuid}/ExclusionPeriod | Creates a new exclusion period for the specified SLA. |
| SlaPutExclusionPeriod | Put /Sla/{slaGuid}/ExclusionPeriod/{exclusionPeriodId} | Updates the specified exclusion period for the specified SLA. |
| SlaPutSla | Put /Sla/{slaGuid} | Updates the definition of the specified SLA. |
Sla SlaCreateSla(ctx).Sla(sla).Execute()
Creates a new SLA.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/JetManiack/go-uptrends-api"
)
func main() {
sla := *openapiclient.NewSla() // Sla | The complete SLA definition that should be created. (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SLAAPI.SlaCreateSla(context.Background()).Sla(sla).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SLAAPI.SlaCreateSla``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `SlaCreateSla`: Sla
fmt.Fprintf(os.Stdout, "Response from `SLAAPI.SlaCreateSla`: %v\n", resp)
}Other parameters are passed through a pointer to a apiSlaCreateSlaRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| sla | Sla | The complete SLA definition 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]
SlaDeleteExclusionPeriod(ctx, slaGuid, exclusionPeriodId).Execute()
Deletes the specified exclusion period for the specified SLA.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/JetManiack/go-uptrends-api"
)
func main() {
slaGuid := "slaGuid_example" // string | The Guid of the sla definition.
exclusionPeriodId := int32(56) // int32 | The id of the exclusion period.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.SLAAPI.SlaDeleteExclusionPeriod(context.Background(), slaGuid, exclusionPeriodId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SLAAPI.SlaDeleteExclusionPeriod``: %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. | |
| slaGuid | string | The Guid of the sla definition. | |
| exclusionPeriodId | int32 | The id of the exclusion period. |
Other parameters are passed through a pointer to a apiSlaDeleteExclusionPeriodRequest 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]
SlaDeleteSla(ctx, slaGuid).Execute()
Deletes the specified SLA.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/JetManiack/go-uptrends-api"
)
func main() {
slaGuid := "slaGuid_example" // string | The Guid of the SLA definition that should be deleted.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.SLAAPI.SlaDeleteSla(context.Background(), slaGuid).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SLAAPI.SlaDeleteSla``: %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. | |
| slaGuid | string | The Guid of the SLA definition that should be deleted. |
Other parameters are passed through a pointer to a apiSlaDeleteSlaRequest 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]
ExclusionPeriod SlaGetExclusionPeriod(ctx, slaGuid, exclusionPeriodId).Execute()
Gets the specified exclusion period for the specified SLA.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/JetManiack/go-uptrends-api"
)
func main() {
slaGuid := "slaGuid_example" // string | The Guid of the SLA definition.
exclusionPeriodId := int32(56) // int32 | The id of the exclusion period.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SLAAPI.SlaGetExclusionPeriod(context.Background(), slaGuid, exclusionPeriodId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SLAAPI.SlaGetExclusionPeriod``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `SlaGetExclusionPeriod`: ExclusionPeriod
fmt.Fprintf(os.Stdout, "Response from `SLAAPI.SlaGetExclusionPeriod`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| slaGuid | string | The Guid of the SLA definition. | |
| exclusionPeriodId | int32 | The id of the exclusion period. |
Other parameters are passed through a pointer to a apiSlaGetExclusionPeriodRequest 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]
[]ExclusionPeriod SlaGetExclusionPeriods(ctx, slaGuid).Execute()
Gets a list of all exclusion periods for the specified SLA.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/JetManiack/go-uptrends-api"
)
func main() {
slaGuid := "slaGuid_example" // string | The Guid of the SLA definition.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SLAAPI.SlaGetExclusionPeriods(context.Background(), slaGuid).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SLAAPI.SlaGetExclusionPeriods``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `SlaGetExclusionPeriods`: []ExclusionPeriod
fmt.Fprintf(os.Stdout, "Response from `SLAAPI.SlaGetExclusionPeriods`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| slaGuid | string | The Guid of the SLA definition. |
Other parameters are passed through a pointer to a apiSlaGetExclusionPeriodsRequest 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]
Sla SlaGetSla(ctx, slaGuid).Execute()
Gets the specified SLA definition.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/JetManiack/go-uptrends-api"
)
func main() {
slaGuid := "slaGuid_example" // string | The Guid of the SLA definition.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SLAAPI.SlaGetSla(context.Background(), slaGuid).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SLAAPI.SlaGetSla``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `SlaGetSla`: Sla
fmt.Fprintf(os.Stdout, "Response from `SLAAPI.SlaGetSla`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| slaGuid | string | The Guid of the SLA definition. |
Other parameters are passed through a pointer to a apiSlaGetSlaRequest 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]
[]Sla SlaGetSlas(ctx).Execute()
Gets a list of all SLA definitions.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/JetManiack/go-uptrends-api"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SLAAPI.SlaGetSlas(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SLAAPI.SlaGetSlas``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `SlaGetSlas`: []Sla
fmt.Fprintf(os.Stdout, "Response from `SLAAPI.SlaGetSlas`: %v\n", resp)
}This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiSlaGetSlasRequest struct via the builder pattern
- Content-Type: Not defined
- Accept: application/json, application/xml
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SlaPatchExclusionPeriod(ctx, slaGuid, exclusionPeriodId).ExclusionPeriod(exclusionPeriod).Execute()
Partially updates the specified exclusion period for the specified SLA.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/JetManiack/go-uptrends-api"
)
func main() {
slaGuid := "slaGuid_example" // string | The Guid of the SLA definition.
exclusionPeriodId := int32(56) // int32 | The id of the exclusion period.
exclusionPeriod := *openapiclient.NewExclusionPeriod() // ExclusionPeriod | The complete definition of the exclusion period. (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.SLAAPI.SlaPatchExclusionPeriod(context.Background(), slaGuid, exclusionPeriodId).ExclusionPeriod(exclusionPeriod).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SLAAPI.SlaPatchExclusionPeriod``: %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. | |
| slaGuid | string | The Guid of the SLA definition. | |
| exclusionPeriodId | int32 | The id of the exclusion period. |
Other parameters are passed through a pointer to a apiSlaPatchExclusionPeriodRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
exclusionPeriod | ExclusionPeriod | The complete definition of the exclusion period. |
(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]
SlaPatchSla(ctx, slaGuid).Sla(sla).Execute()
Partially updates the definition of the specified SLA.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/JetManiack/go-uptrends-api"
)
func main() {
slaGuid := "slaGuid_example" // string | The Guid of the SLA that should be updated.
sla := *openapiclient.NewSla() // Sla | The partial definition for the SLA that should be updated. (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.SLAAPI.SlaPatchSla(context.Background(), slaGuid).Sla(sla).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SLAAPI.SlaPatchSla``: %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. | |
| slaGuid | string | The Guid of the SLA that should be updated. |
Other parameters are passed through a pointer to a apiSlaPatchSlaRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
sla | Sla | The partial definition for the SLA 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]
ExclusionPeriod SlaPostExclusionPeriod(ctx, slaGuid).ExclusionPeriod(exclusionPeriod).Execute()
Creates a new exclusion period for the specified SLA.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/JetManiack/go-uptrends-api"
)
func main() {
slaGuid := "slaGuid_example" // string | The Guid of the SLA definition.
exclusionPeriod := *openapiclient.NewExclusionPeriod() // ExclusionPeriod | The complete definition of the exclusion period. (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SLAAPI.SlaPostExclusionPeriod(context.Background(), slaGuid).ExclusionPeriod(exclusionPeriod).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SLAAPI.SlaPostExclusionPeriod``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `SlaPostExclusionPeriod`: ExclusionPeriod
fmt.Fprintf(os.Stdout, "Response from `SLAAPI.SlaPostExclusionPeriod`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| slaGuid | string | The Guid of the SLA definition. |
Other parameters are passed through a pointer to a apiSlaPostExclusionPeriodRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
exclusionPeriod | ExclusionPeriod | The complete definition of the exclusion period. |
- 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]
SlaPutExclusionPeriod(ctx, slaGuid, exclusionPeriodId).ExclusionPeriod(exclusionPeriod).Execute()
Updates the specified exclusion period for the specified SLA.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/JetManiack/go-uptrends-api"
)
func main() {
slaGuid := "slaGuid_example" // string | The Guid of the SLA definition.
exclusionPeriodId := int32(56) // int32 | The id of the exclusion period.
exclusionPeriod := *openapiclient.NewExclusionPeriod() // ExclusionPeriod | The complete definition of the exclusion period. (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.SLAAPI.SlaPutExclusionPeriod(context.Background(), slaGuid, exclusionPeriodId).ExclusionPeriod(exclusionPeriod).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SLAAPI.SlaPutExclusionPeriod``: %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. | |
| slaGuid | string | The Guid of the SLA definition. | |
| exclusionPeriodId | int32 | The id of the exclusion period. |
Other parameters are passed through a pointer to a apiSlaPutExclusionPeriodRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
exclusionPeriod | ExclusionPeriod | The complete definition of the exclusion period. |
(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]
SlaPutSla(ctx, slaGuid).Sla(sla).Execute()
Updates the definition of the specified SLA.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/JetManiack/go-uptrends-api"
)
func main() {
slaGuid := "slaGuid_example" // string | The Guid of the SLA that should be updated.
sla := *openapiclient.NewSla() // Sla | The complete definition for the SLA that should be updated. (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.SLAAPI.SlaPutSla(context.Background(), slaGuid).Sla(sla).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SLAAPI.SlaPutSla``: %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. | |
| slaGuid | string | The Guid of the SLA that should be updated. |
Other parameters are passed through a pointer to a apiSlaPutSlaRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
sla | Sla | The complete definition for the SLA 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]