circle-info
Squadcast is now SolarWinds Incident Response

Slos

Overview

Available Operations

ListAll

Returns all the SLOs of the passed owner_id in the params. Requires access_token as a Bearer {{token}} in the Authorization header with 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.Slos.ListAll(ctx, "<id>", "<value>", "<value>")
    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

offset

string

✔️

N/A

limit

string

✔️

N/A

opts

The options for this request.

Response

*operations.SLOGetAllSLOsResponse, error

Errors

Error Type
Status Code
Content Type

apierrors.BadRequestError

400

application/json

apierrors.UnauthorizedError

401

application/json

apierrors.PaymentRequiredError

402

application/json

apierrors.ForbiddenError

403

application/json

apierrors.NotFoundError

404

application/json

apierrors.ConflictError

409

application/json

apierrors.UnprocessableEntityError

422

application/json

apierrors.InternalServerError

500

application/json

apierrors.BadGatewayError

502

application/json

apierrors.ServiceUnavailableError

503

application/json

apierrors.GatewayTimeoutError

504

application/json

apierrors.APIError

4XX, 5XX

*/*

Create

  • This API will create SLO. Requires access_token as a Bearer {{token}} in the Authorization header with user-write scope.

Example Usage

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.SLOCreateSLOResponse, error

Errors

Error Type
Status Code
Content Type

apierrors.BadRequestError

400

application/json

apierrors.UnauthorizedError

401

application/json

apierrors.PaymentRequiredError

402

application/json

apierrors.ForbiddenError

403

application/json

apierrors.NotFoundError

404

application/json

apierrors.ConflictError

409

application/json

apierrors.UnprocessableEntityError

422

application/json

apierrors.InternalServerError

500

application/json

apierrors.BadGatewayError

502

application/json

apierrors.ServiceUnavailableError

503

application/json

apierrors.GatewayTimeoutError

504

application/json

apierrors.APIError

4XX, 5XX

*/*

Update

  • This API will update SLO. Requires access_token as a Bearer {{token}} in the Authorization header with user-write scope.

Example Usage

Parameters

Parameter
Type
Required
Description

ctx

✔️

The context to use for the request.

sloID

int64

✔️

N/A

ownerID

string

✔️

N/A

v3SLOCreateSLORequest

✔️

N/A

opts

The options for this request.

Response

*operations.SLOUpdateSLOResponse, error

Errors

Error Type
Status Code
Content Type

apierrors.BadRequestError

400

application/json

apierrors.UnauthorizedError

401

application/json

apierrors.PaymentRequiredError

402

application/json

apierrors.ForbiddenError

403

application/json

apierrors.NotFoundError

404

application/json

apierrors.ConflictError

409

application/json

apierrors.UnprocessableEntityError

422

application/json

apierrors.InternalServerError

500

application/json

apierrors.BadGatewayError

502

application/json

apierrors.ServiceUnavailableError

503

application/json

apierrors.GatewayTimeoutError

504

application/json

apierrors.APIError

4XX, 5XX

*/*

Remove

Remove SLO from passed owner_id (team_id) in the params . Upon sccess the slo will be removed. Requires access_token as a Bearer {{token}} in the Authorization header with user-write scope.

Example Usage

Parameters

Parameter
Type
Required
Description

ctx

✔️

The context to use for the request.

sloID

int64

✔️

N/A

ownerID

string

✔️

N/A

opts

The options for this request.

Response

*operations.SLORemoveSLOResponse, error

Errors

Error Type
Status Code
Content Type

apierrors.BadRequestError

400

application/json

apierrors.UnauthorizedError

401

application/json

apierrors.PaymentRequiredError

402

application/json

apierrors.ForbiddenError

403

application/json

apierrors.NotFoundError

404

application/json

apierrors.ConflictError

409

application/json

apierrors.UnprocessableEntityError

422

application/json

apierrors.InternalServerError

500

application/json

apierrors.BadGatewayError

502

application/json

apierrors.ServiceUnavailableError

503

application/json

apierrors.GatewayTimeoutError

504

application/json

apierrors.APIError

4XX, 5XX

*/*

GetByID

Returns a SLO details of the given sloID in the request param. Requires access_token as a Bearer {{token}} in the Authorization header with read scope.

Example Usage

Parameters

Parameter
Type
Required
Description

ctx

✔️

The context to use for the request.

sloID

int64

✔️

N/A

ownerID

string

✔️

N/A

opts

The options for this request.

Response

*operations.SLOGetSLOByIDResponse, error

Errors

Error Type
Status Code
Content Type

apierrors.BadRequestError

400

application/json

apierrors.UnauthorizedError

401

application/json

apierrors.PaymentRequiredError

402

application/json

apierrors.ForbiddenError

403

application/json

apierrors.NotFoundError

404

application/json

apierrors.ConflictError

409

application/json

apierrors.UnprocessableEntityError

422

application/json

apierrors.InternalServerError

500

application/json

apierrors.BadGatewayError

502

application/json

apierrors.ServiceUnavailableError

503

application/json

apierrors.GatewayTimeoutError

504

application/json

apierrors.APIError

4XX, 5XX

*/*

MarkAffected

This endpoint is used for mark slo affected.

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

Example Usage

Parameters

Parameter
Type
Required
Description

ctx

✔️

The context to use for the request.

sloID

int64

✔️

N/A

ownerID

string

✔️

N/A

v3SLOMarkSLOAffectedRequest

✔️

N/A

opts

The options for this request.

Response

*operations.SLOMarkSLOAffectedResponse, error

Errors

Error Type
Status Code
Content Type

apierrors.BadRequestError

400

application/json

apierrors.UnauthorizedError

401

application/json

apierrors.PaymentRequiredError

402

application/json

apierrors.ForbiddenError

403

application/json

apierrors.NotFoundError

404

application/json

apierrors.ConflictError

409

application/json

apierrors.UnprocessableEntityError

422

application/json

apierrors.InternalServerError

500

application/json

apierrors.BadGatewayError

502

application/json

apierrors.ServiceUnavailableError

503

application/json

apierrors.GatewayTimeoutError

504

application/json

apierrors.APIError

4XX, 5XX

*/*

MarkFalsePositive

Value is a boolean (true or false)

Example Usage

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.SLOMarkSLOFalsePositiveResponse, error

Errors

Error Type
Status Code
Content Type

apierrors.BadRequestError

400

application/json

apierrors.UnauthorizedError

401

application/json

apierrors.PaymentRequiredError

402

application/json

apierrors.ForbiddenError

403

application/json

apierrors.NotFoundError

404

application/json

apierrors.ConflictError

409

application/json

apierrors.UnprocessableEntityError

422

application/json

apierrors.InternalServerError

500

application/json

apierrors.BadGatewayError

502

application/json

apierrors.ServiceUnavailableError

503

application/json

apierrors.GatewayTimeoutError

504

application/json

apierrors.APIError

4XX, 5XX

*/*

Last updated