Rotations
Overview
Available Operations
Create - Create Rotation
GetByID - Get Schedule Rotation by ID
Update - Update Rotation
GetParticipants - Get Rotation Participants
UpdateParticipants - Update Rotation Participants
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_REFRESH_TOKEN_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
scheduleID
string
✔️
N/A
Response
Errors
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
scheduleID
string
✔️
N/A
rotationID
string
✔️
N/A
Response
Errors
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
scheduleID
string
✔️
N/A
rotationID
string
✔️
N/A
Response
Errors
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
scheduleID
string
✔️
N/A
rotationID
string
✔️
N/A
Response
Errors
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
scheduleID
string
✔️
N/A
rotationID
string
✔️
N/A
Response
Errors
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