circle-info
Squadcast is now SolarWinds Incident Response

Squads

Overview

Available Operations

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_BEARER_AUTH")),
    )

    res, err := s.Squads.List(ctx, "<id>")
    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.

ownerID

string

✔️

N/A

opts

The options for this request.

Response

*operations.SquadsGetAllSquadsResponse, 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

*/*

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

Parameter
Type
Required
Description

ctx

✔️

The context to use for the request.

squadID

string

✔️

N/A

memberID

string

✔️

N/A

replaceWith

string

✔️

N/A

opts

The options for this request.

Response

*operations.SquadsRemoveSquadMemberResponse, 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

*/*

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

Parameter
Type
Required
Description

ctx

✔️

The context to use for the request.

squadID

string

✔️

N/A

memberID

string

✔️

N/A

replaceWith

string

✔️

N/A

v4SquadsUpdateSquadMemberRequest

✔️

N/A

opts

The options for this request.

Response

*operations.SquadsUpdateSquadMemberResponse, 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

*/*

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

Parameter
Type
Required
Description

ctx

✔️

The context to use for the request.

squadID

string

✔️

N/A

v4SquadsUpdateSquadNameRequest

✔️

N/A

opts

The options for this request.

Response

*operations.SquadsUpdateSquadNameResponse, 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

*/*

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

Parameter
Type
Required
Description

ctx

✔️

The context to use for the request.

squadID

string

✔️

N/A

opts

The options for this request.

Response

*operations.SquadsDeleteSquadResponse, 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