circle-info
Squadcast is now SolarWinds Incident Response

Rotations

Overview

Available Operations

Create

Create Rotation

Example Usage

package main

import(
	"context"
	"os"
	squadcastsdk "github.com/solarwinds/squadcast-sdk-go"
	"github.com/solarwinds/squadcast-sdk-go/models/components"
	"log"
)

func main() {
    ctx := context.Background()

    s := squadcastsdk.New(
        squadcastsdk.WithSecurity(os.Getenv("SQUADCASTSDK_BEARER_AUTH")),
    )

    res, err := s.Rotations.Create(ctx, "<id>", components.V4CreateRotationRequest{
        Name: "<value>",
        StartDate: "<value>",
        Period: "<value>",
        ChangeParticipantsFrequency: 62013,
        ChangeParticipantsUnit: "<value>",
        ParticipantGroups: []components.V4ParticipantGroup{},
    })
    if err != nil {
        log.Fatal(err)
    }
    if res.Object != nil {
        // handle response
    }
}

Parameters

Parameter
Type
Required
Description

ctx

✔️

The context to use for the request.

scheduleID

string

✔️

N/A

v4CreateRotationRequest

✔️

N/A

opts

The options for this request.

Response

*operations.RotationsCreateRotationResponse, error

Errors

Error Type
Status Code
Content Type

apierrors.CommonV4Error

400, 401, 402, 403, 404, 409, 422

application/json

apierrors.CommonV4Error

500, 502, 503, 504

application/json

apierrors.APIError

4XX, 5XX

*/*

GetByID

Get Schedule Rotation by ID

Example Usage

Parameters

Parameter
Type
Required
Description

ctx

✔️

The context to use for the request.

scheduleID

string

✔️

N/A

rotationID

string

✔️

N/A

opts

The options for this request.

Response

*operations.RotationsGetScheduleRotationByIDResponse, error

Errors

Error Type
Status Code
Content Type

apierrors.CommonV4Error

400, 401, 402, 403, 404, 409, 422

application/json

apierrors.CommonV4Error

500, 502, 503, 504

application/json

apierrors.APIError

4XX, 5XX

*/*

Update

Update Rotation

Example Usage

Parameters

Parameter
Type
Required
Description

ctx

✔️

The context to use for the request.

scheduleID

string

✔️

N/A

rotationID

string

✔️

N/A

v4UpdateRotationRequest

✔️

N/A

opts

The options for this request.

Response

*operations.RotationsUpdateRotationResponse, error

Errors

Error Type
Status Code
Content Type

apierrors.CommonV4Error

400, 401, 402, 403, 404, 409, 422

application/json

apierrors.CommonV4Error

500, 502, 503, 504

application/json

apierrors.APIError

4XX, 5XX

*/*

GetParticipants

Get Rotation Participants

Example Usage

Parameters

Parameter
Type
Required
Description

ctx

✔️

The context to use for the request.

scheduleID

string

✔️

N/A

rotationID

string

✔️

N/A

opts

The options for this request.

Response

*operations.RotationsGetRotationParticipantsResponse, error

Errors

Error Type
Status Code
Content Type

apierrors.CommonV4Error

400, 401, 402, 403, 404, 409, 422

application/json

apierrors.CommonV4Error

500, 502, 503, 504

application/json

apierrors.APIError

4XX, 5XX

*/*

UpdateParticipants

Update Rotation Participants

Example Usage

Parameters

Parameter
Type
Required
Description

ctx

✔️

The context to use for the request.

scheduleID

string

✔️

N/A

rotationID

string

✔️

N/A

v4UpdateRotationParticipantsRequest

✔️

N/A

opts

The options for this request.

Response

*operations.RotationsUpdateRotationParticipantsResponse, error

Errors

Error Type
Status Code
Content Type

apierrors.CommonV4Error

400, 401, 402, 403, 404, 409, 422

application/json

apierrors.CommonV4Error

500, 502, 503, 504

application/json

apierrors.APIError

4XX, 5XX

*/*

Last updated