Skip to content

Latest commit

 

History

History
1174 lines (762 loc) · 35.5 KB

File metadata and controls

1174 lines (762 loc) · 35.5 KB

\OperatorAPI

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

Method HTTP request Description
OperatorAddDutyPeriodForOperator Post /Operator/{operatorGuid}/DutySchedule Adds a duty schedule to the specified operator.
OperatorCreateOperator Post /Operator Creates a new operator.
OperatorCreateOperatorAndAddToOperatorGroup Post /Operator/OperatorGroup/{operatorGroupGuid} Creates a new operator and adds it to specified operator group.
OperatorDeleteAuthorizationForOperator Delete /Operator/{operatorGuid}/Authorization/{authorizationType} Removes the specified authorization of this operator.
OperatorDeleteDutyScheduleFromOperator Delete /Operator/{operatorGuid}/DutySchedule/{dutyScheduleId} Deletes the specified duty schedule of the specified operator.
OperatorDeleteOperator Delete /Operator/{operatorGuid} Deletes an existing operator.
OperatorGetAllOperators Get /Operator Gets a list of all operators.
OperatorGetAuthorizationsForOperator Get /Operator/{operatorGuid}/Authorization Gets all authorizations for the specified operator.
OperatorGetDutyScheduleForOperator Get /Operator/{operatorGuid}/DutySchedule Gets the duty schedules for an specified operator.
OperatorGetNewsletterSubscription Get /Operator/{operatorGuid}/Newsletter Gets the newsletter subscription values.
OperatorGetOperator Get /Operator/{operatorGuid} Gets the details of the operator with the provided OperatorGuid.
OperatorGetOperatorGroupsForOperator Get /Operator/{operatorGuid}/OperatorGroup Gets a list of all operator groups for the specified operator.
OperatorPostAuthorizationForOperator Post /Operator/{operatorGuid}/Authorization/{authorizationType} Assigns the specified authorization to this operator.
OperatorUpdateDutyPeriodForOperator Put /Operator/{operatorGuid}/DutySchedule/{dutyScheduleId} Updates the specified duty schedule of the specified operator.
OperatorUpdateNewsletterSubscription Put /Operator/{operatorGuid}/Newsletter Update the newsletter subscription values for the specified operator.
OperatorUpdateOperator Put /Operator/{operatorGuid} Updates an existing operator.
OperatorUpdateOperatorWithPatch Patch /Operator/{operatorGuid} Updates an existing operator.

OperatorAddDutyPeriodForOperator

OperatorAddDutyPeriodForOperator(ctx, operatorGuid).Schedule(schedule).Execute()

Adds a duty schedule to the specified operator.

Example

package main

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

func main() {
	operatorGuid := "operatorGuid_example" // string | The Guid of the operator to add the duty schedule to
	schedule := *openapiclient.NewOperatorDutySchedule(int32(123), openapiclient.OperatorScheduleMode("OneTime")) // OperatorDutySchedule | The duty schedule to add (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.OperatorAPI.OperatorAddDutyPeriodForOperator(context.Background(), operatorGuid).Schedule(schedule).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `OperatorAPI.OperatorAddDutyPeriodForOperator``: %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.
operatorGuid string The Guid of the operator to add the duty schedule to

Other Parameters

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

Name Type Description Notes

schedule | OperatorDutySchedule | The duty schedule to add |

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]

OperatorCreateOperator

Operator OperatorCreateOperator(ctx).UptrendsOperator(uptrendsOperator).Execute()

Creates a new operator.

Example

package main

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

func main() {
	uptrendsOperator := *openapiclient.NewOperator() // Operator | The details of the operator to create (optional)

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

Path Parameters

Other Parameters

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

Name Type Description Notes
uptrendsOperator Operator The details of the operator to create

Return type

Operator

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]

OperatorCreateOperatorAndAddToOperatorGroup

Operator OperatorCreateOperatorAndAddToOperatorGroup(ctx, operatorGroupGuid).UptrendsOperator(uptrendsOperator).Execute()

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

Example

package main

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

func main() {
	operatorGroupGuid := "operatorGroupGuid_example" // string | The Guid of the operator group to add new operator to.
	uptrendsOperator := *openapiclient.NewOperator() // Operator | The details of the operator to create (optional)

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
operatorGroupGuid string The Guid of the operator group to add new operator to.

Other Parameters

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

Name Type Description Notes

uptrendsOperator | Operator | The details of the operator to create |

Return type

Operator

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]

OperatorDeleteAuthorizationForOperator

OperatorDeleteAuthorizationForOperator(ctx, operatorGuid, authorizationType).Execute()

Removes the specified authorization of this operator.

Example

package main

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

func main() {
	operatorGuid := "operatorGuid_example" // string | The Guid of the operator
	authorizationType := "authorizationType_example" // string | The type of authorization

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.OperatorAPI.OperatorDeleteAuthorizationForOperator(context.Background(), operatorGuid, authorizationType).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `OperatorAPI.OperatorDeleteAuthorizationForOperator``: %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.
operatorGuid string The Guid of the operator
authorizationType string The type of authorization

Other Parameters

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

OperatorDeleteDutyScheduleFromOperator

OperatorDeleteDutyScheduleFromOperator(ctx, operatorGuid, dutyScheduleId).Execute()

Deletes the specified duty schedule of the specified operator.

Example

package main

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

func main() {
	operatorGuid := "operatorGuid_example" // string | 
	dutyScheduleId := int32(56) // int32 | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.OperatorAPI.OperatorDeleteDutyScheduleFromOperator(context.Background(), operatorGuid, dutyScheduleId).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `OperatorAPI.OperatorDeleteDutyScheduleFromOperator``: %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.
operatorGuid string
dutyScheduleId int32

Other Parameters

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

OperatorDeleteOperator

OperatorDeleteOperator(ctx, operatorGuid).Execute()

Deletes an existing operator.

Example

package main

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

func main() {
	operatorGuid := "operatorGuid_example" // string | The Guid of the operator to delete

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.OperatorAPI.OperatorDeleteOperator(context.Background(), operatorGuid).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `OperatorAPI.OperatorDeleteOperator``: %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.
operatorGuid string The Guid of the operator to delete

Other Parameters

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

OperatorGetAllOperators

[]Operator OperatorGetAllOperators(ctx).Execute()

Gets a list of all operators.

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.OperatorAPI.OperatorGetAllOperators(context.Background()).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `OperatorAPI.OperatorGetAllOperators``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `OperatorGetAllOperators`: []Operator
	fmt.Fprintf(os.Stdout, "Response from `OperatorAPI.OperatorGetAllOperators`: %v\n", resp)
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

[]Operator

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]

OperatorGetAuthorizationsForOperator

[]OperatorAuthorizationType OperatorGetAuthorizationsForOperator(ctx, operatorGuid).Execute()

Gets all authorizations for the specified operator.

Example

package main

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

func main() {
	operatorGuid := "operatorGuid_example" // string | The Guid of the operator

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

Return type

[]OperatorAuthorizationType

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]

OperatorGetDutyScheduleForOperator

[]OperatorDutySchedule OperatorGetDutyScheduleForOperator(ctx, operatorGuid).Execute()

Gets the duty schedules for an specified operator.

Example

package main

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

func main() {
	operatorGuid := "operatorGuid_example" // string | The Guid of the operator to get the duty schedule for

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
operatorGuid string The Guid of the operator to get the duty schedule for

Other Parameters

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

Name Type Description Notes

Return type

[]OperatorDutySchedule

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]

OperatorGetNewsletterSubscription

NewsletterSubscription OperatorGetNewsletterSubscription(ctx, operatorGuid).Execute()

Gets the newsletter subscription values.

Example

package main

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

func main() {
	operatorGuid := "operatorGuid_example" // string | The Guid of the operator to get the newsletter subscription values for

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
operatorGuid string The Guid of the operator to get the newsletter subscription values for

Other Parameters

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

Name Type Description Notes

Return type

NewsletterSubscription

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]

OperatorGetOperator

Operator OperatorGetOperator(ctx, operatorGuid).Execute()

Gets the details of the operator with the provided OperatorGuid.

Example

package main

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

func main() {
	operatorGuid := "operatorGuid_example" // string | The Guid of the operator for which to retrieve the details

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
operatorGuid string The Guid of the operator for which to retrieve the details

Other Parameters

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

Name Type Description Notes

Return type

Operator

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]

OperatorGetOperatorGroupsForOperator

[]OperatorMember OperatorGetOperatorGroupsForOperator(ctx, operatorGuid).Execute()

Gets a list of all operator groups for the specified operator.

Example

package main

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

func main() {
	operatorGuid := "operatorGuid_example" // string | The Guid of the operator for which to retrieve the operator group guids

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
operatorGuid string The Guid of the operator for which to retrieve the operator group guids

Other Parameters

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

Name Type Description Notes

Return type

[]OperatorMember

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]

OperatorPostAuthorizationForOperator

OperatorPostAuthorizationForOperator(ctx, operatorGuid, authorizationType).Execute()

Assigns the specified authorization to this operator.

Example

package main

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

func main() {
	operatorGuid := "operatorGuid_example" // string | The Guid of the operator
	authorizationType := "authorizationType_example" // string | The type of authorization

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.OperatorAPI.OperatorPostAuthorizationForOperator(context.Background(), operatorGuid, authorizationType).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `OperatorAPI.OperatorPostAuthorizationForOperator``: %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.
operatorGuid string The Guid of the operator
authorizationType string The type of authorization

Other Parameters

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

OperatorUpdateDutyPeriodForOperator

OperatorUpdateDutyPeriodForOperator(ctx, operatorGuid, dutyScheduleId).Schedule(schedule).Execute()

Updates the specified duty schedule of the specified operator.

Example

package main

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

func main() {
	operatorGuid := "operatorGuid_example" // string | 
	dutyScheduleId := int32(56) // int32 | 
	schedule := *openapiclient.NewOperatorDutySchedule(int32(123), openapiclient.OperatorScheduleMode("OneTime")) // OperatorDutySchedule |  (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.OperatorAPI.OperatorUpdateDutyPeriodForOperator(context.Background(), operatorGuid, dutyScheduleId).Schedule(schedule).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `OperatorAPI.OperatorUpdateDutyPeriodForOperator``: %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.
operatorGuid string
dutyScheduleId int32

Other Parameters

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

Name Type Description Notes

schedule | OperatorDutySchedule | |

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]

OperatorUpdateNewsletterSubscription

OperatorUpdateNewsletterSubscription(ctx, operatorGuid).NewsletterSubscription(newsletterSubscription).Execute()

Update the newsletter subscription values for the specified operator.

Example

package main

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

func main() {
	operatorGuid := "operatorGuid_example" // string | The Guid of the operator to update the newsletter subscription values for
	newsletterSubscription := *openapiclient.NewNewsletterSubscription(false, false) // NewsletterSubscription | The newsletter subscription values (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.OperatorAPI.OperatorUpdateNewsletterSubscription(context.Background(), operatorGuid).NewsletterSubscription(newsletterSubscription).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `OperatorAPI.OperatorUpdateNewsletterSubscription``: %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.
operatorGuid string The Guid of the operator to update the newsletter subscription values for

Other Parameters

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

Name Type Description Notes

newsletterSubscription | NewsletterSubscription | The newsletter subscription values |

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]

OperatorUpdateOperator

OperatorUpdateOperator(ctx, operatorGuid).UptrendsOperator(uptrendsOperator).Execute()

Updates an existing operator.

Example

package main

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

func main() {
	operatorGuid := "operatorGuid_example" // string | The Guid of the operator to update
	uptrendsOperator := *openapiclient.NewOperator() // Operator | The updated details of the operator (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.OperatorAPI.OperatorUpdateOperator(context.Background(), operatorGuid).UptrendsOperator(uptrendsOperator).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `OperatorAPI.OperatorUpdateOperator``: %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.
operatorGuid string The Guid of the operator to update

Other Parameters

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

Name Type Description Notes

uptrendsOperator | Operator | The updated details of the operator |

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]

OperatorUpdateOperatorWithPatch

OperatorUpdateOperatorWithPatch(ctx, operatorGuid).UptrendsOperator(uptrendsOperator).Execute()

Updates an existing operator.

Example

package main

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

func main() {
	operatorGuid := "operatorGuid_example" // string | The Guid of the operator to update
	uptrendsOperator := *openapiclient.NewOperator() // Operator | The updated details of the operator (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.OperatorAPI.OperatorUpdateOperatorWithPatch(context.Background(), operatorGuid).UptrendsOperator(uptrendsOperator).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `OperatorAPI.OperatorUpdateOperatorWithPatch``: %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.
operatorGuid string The Guid of the operator to update

Other Parameters

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

Name Type Description Notes

uptrendsOperator | Operator | The updated details of the operator |

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]