Squads
Overview
Available Operations
List - Get All Squads
RemoveMember - Remove Squad Member
UpdateMemberRole - Update Squad Member
UpdateName - Update Squad Name
Delete - Delete Squad
List
This endpoint is used to get all the squads details of your organization. Requires access_token as a Bearer {{token}} in the Authorization header with squad-read scope.
Example Usage
package main
import(
"context"
"os"
squadcastsdk "github.com/solarwinds/squadcast-sdk-go"
"log"
)
func main() {
ctx := context.Background()
s := squadcastsdk.New(
squadcastsdk.WithSecurity(os.Getenv("SQUADCASTSDK_REFRESH_TOKEN_AUTH")),
)
res, err := s.Squads.List(ctx, "<id>")
if err != nil {
log.Fatal(err)
}
if res.Object != nil {
// handle response
}
}Parameters
ownerID
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
*/*
RemoveMember
This endpoint is used to update squad member's role.
If you're attempting to remove a member whose role is 'owner', and that 'owner' is the last squad owner, then the 'replaceWith' query parameter is required. Setting 'replaceWith' to 'member' will promote another member as the owner, and the specified member will be removed.
Requires access_token as a Bearer {{token}} in the Authorization header with squad-create scope.
Example Usage
Parameters
squadID
string
✔️
N/A
memberID
string
✔️
N/A
replaceWith
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
*/*
UpdateMemberRole
This endpoint is used to update a squad member's role and is only accessible if your organization is using the OBAC permission model.
If you're attempting to update a member's role from 'owner' to 'member', and that 'owner' is the last squad owner, then the 'replaceWith' query parameter is required. Setting 'replaceWith' to 'member' will promote the member to the role of owner.
Requires access_token as a Bearer {{token}} in the Authorization header with squad-create scope.
Example Usage
Parameters
squadID
string
✔️
N/A
memberID
string
✔️
N/A
replaceWith
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
*/*
UpdateName
This endpoint is used to update squad's name. Requires access_token as a Bearer {{token}} in the Authorization header with squad-create scope.
Example Usage
Parameters
squadID
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
*/*
Delete
This endpoint is used to delete the squad. Squad should not be assigned to any incident or part of any escalation policy. Requires access_token as a Bearer {{token}} in the Authorization header with squad-update scope.
Example Usage
Parameters
squadID
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