Skip to content

Latest commit

 

History

History
837 lines (541 loc) · 23.2 KB

File metadata and controls

837 lines (541 loc) · 23.2 KB

\SLAAPI

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.

SlaCreateSla

Sla SlaCreateSla(ctx).Sla(sla).Execute()

Creates a new SLA.

Example

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)
}

Path Parameters

Other Parameters

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.

Return type

Sla

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]

SlaDeleteExclusionPeriod

SlaDeleteExclusionPeriod(ctx, slaGuid, exclusionPeriodId).Execute()

Deletes the specified exclusion period for the specified SLA.

Example

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)
	}
}

Path Parameters

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

Other parameters are passed through a pointer to a apiSlaDeleteExclusionPeriodRequest 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]

SlaDeleteSla

SlaDeleteSla(ctx, slaGuid).Execute()

Deletes the specified SLA.

Example

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)
	}
}

Path Parameters

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

Other parameters are passed through a pointer to a apiSlaDeleteSlaRequest 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]

SlaGetExclusionPeriod

ExclusionPeriod SlaGetExclusionPeriod(ctx, slaGuid, exclusionPeriodId).Execute()

Gets the specified exclusion period for the specified SLA.

Example

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)
}

Path Parameters

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

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

Name Type Description Notes

Return type

ExclusionPeriod

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]

SlaGetExclusionPeriods

[]ExclusionPeriod SlaGetExclusionPeriods(ctx, slaGuid).Execute()

Gets a list of all exclusion periods for the specified SLA.

Example

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)
}

Path Parameters

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

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

Name Type Description Notes

Return type

[]ExclusionPeriod

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]

SlaGetSla

Sla SlaGetSla(ctx, slaGuid).Execute()

Gets the specified SLA definition.

Example

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)
}

Path Parameters

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

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

Name Type Description Notes

Return type

Sla

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]

SlaGetSlas

[]Sla SlaGetSlas(ctx).Execute()

Gets a list of all SLA definitions.

Example

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)
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

[]Sla

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]

SlaPatchExclusionPeriod

SlaPatchExclusionPeriod(ctx, slaGuid, exclusionPeriodId).ExclusionPeriod(exclusionPeriod).Execute()

Partially updates the specified exclusion period for the specified SLA.

Example

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)
	}
}

Path Parameters

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

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. |

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]

SlaPatchSla

SlaPatchSla(ctx, slaGuid).Sla(sla).Execute()

Partially updates the definition of the specified SLA.

Example

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)
	}
}

Path Parameters

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

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. |

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]

SlaPostExclusionPeriod

ExclusionPeriod SlaPostExclusionPeriod(ctx, slaGuid).ExclusionPeriod(exclusionPeriod).Execute()

Creates a new exclusion period for the specified SLA.

Example

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)
}

Path Parameters

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

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. |

Return type

ExclusionPeriod

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]

SlaPutExclusionPeriod

SlaPutExclusionPeriod(ctx, slaGuid, exclusionPeriodId).ExclusionPeriod(exclusionPeriod).Execute()

Updates the specified exclusion period for the specified SLA.

Example

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)
	}
}

Path Parameters

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

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. |

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]

SlaPutSla

SlaPutSla(ctx, slaGuid).Sla(sla).Execute()

Updates the definition of the specified SLA.

Example

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)
	}
}

Path Parameters

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

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. |

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]