circle-info
Squadcast is now SolarWinds Incident Response

Squads.V4

Overview

Available Operations

Create

This endpoint is used to create a new squad. The role will be considered only if your organization is on the OBAC permission model; otherwise, the role field will be ignored, and only the member will be added to the squad.

Requires access_token as a Bearer {{token}} in the Authorization header with squad-create scope.

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.Squads.V4.Create(ctx, components.V4SquadsCreateSquadRequest{
        OwnerID: "<id>",
        Name: "<value>",
        Members: []components.V4SquadsSquadMember{},
    })
    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.

request

✔️

The request object to use for the request.

opts

The options for this request.

Response

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

This endpoint is used to get the squads details by id. Requires access_token as a Bearer {{token}} in the Authorization header with squad-read 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.SquadsGetSquadByIDResponse, 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