Slos
Overview
Available Operations
list - Get All SLOs
create - Create SLO
update - Update SLO
remove - Remove SLO
getById - Get SLO By ID
markFalsePositive - Mark SLO False Positive
list
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
import { SquadcastSDK } from "@solarwinds/squadcast-sdk-typescript";
const squadcastSDK = new SquadcastSDK({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await squadcastSDK.slos.list({
ownerId: "<id>",
offset: "<value>",
limit: "<value>",
});
console.log(result);
}
run();Standalone function
The standalone function version of this method:
Parameters
options
RequestOptions
➖
Used to set various options for making HTTP requests.
options.fetchOptions
➖
Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
Response
Promise<operations.SLOGetAllSLOsResponse>
Errors
errors.BadRequestError
400
application/json
errors.UnauthorizedError
401
application/json
errors.PaymentRequiredError
402
application/json
errors.ForbiddenError
403
application/json
errors.NotFoundError
404
application/json
errors.ConflictError
409
application/json
errors.UnprocessableEntityError
422
application/json
errors.InternalServerError
500
application/json
errors.BadGatewayError
502
application/json
errors.ServiceUnavailableError
503
application/json
errors.GatewayTimeoutError
504
application/json
errors.SDKDefaultError
4XX, 5XX
*/*
create
This API will create SLO. Requires
access_tokenas aBearer {{token}}in theAuthorizationheader withuser-writescope.
Example Usage
Standalone function
The standalone function version of this method:
Parameters
options
RequestOptions
➖
Used to set various options for making HTTP requests.
options.fetchOptions
➖
Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
Response
Promise<operations.SLOCreateSLOResponse>
Errors
errors.BadRequestError
400
application/json
errors.UnauthorizedError
401
application/json
errors.PaymentRequiredError
402
application/json
errors.ForbiddenError
403
application/json
errors.NotFoundError
404
application/json
errors.ConflictError
409
application/json
errors.UnprocessableEntityError
422
application/json
errors.InternalServerError
500
application/json
errors.BadGatewayError
502
application/json
errors.ServiceUnavailableError
503
application/json
errors.GatewayTimeoutError
504
application/json
errors.SDKDefaultError
4XX, 5XX
*/*
update
This API will update SLO. Requires
access_tokenas aBearer {{token}}in theAuthorizationheader withuser-writescope.
Example Usage
Standalone function
The standalone function version of this method:
Parameters
options
RequestOptions
➖
Used to set various options for making HTTP requests.
options.fetchOptions
➖
Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
Response
Promise<operations.SLOUpdateSLOResponse>
Errors
errors.BadRequestError
400
application/json
errors.UnauthorizedError
401
application/json
errors.PaymentRequiredError
402
application/json
errors.ForbiddenError
403
application/json
errors.NotFoundError
404
application/json
errors.ConflictError
409
application/json
errors.UnprocessableEntityError
422
application/json
errors.InternalServerError
500
application/json
errors.BadGatewayError
502
application/json
errors.ServiceUnavailableError
503
application/json
errors.GatewayTimeoutError
504
application/json
errors.SDKDefaultError
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
Standalone function
The standalone function version of this method:
Parameters
options
RequestOptions
➖
Used to set various options for making HTTP requests.
options.fetchOptions
➖
Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
Response
Promise<operations.SLORemoveSLOResponse>
Errors
errors.BadRequestError
400
application/json
errors.UnauthorizedError
401
application/json
errors.PaymentRequiredError
402
application/json
errors.ForbiddenError
403
application/json
errors.NotFoundError
404
application/json
errors.ConflictError
409
application/json
errors.UnprocessableEntityError
422
application/json
errors.InternalServerError
500
application/json
errors.BadGatewayError
502
application/json
errors.ServiceUnavailableError
503
application/json
errors.GatewayTimeoutError
504
application/json
errors.SDKDefaultError
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
Standalone function
The standalone function version of this method:
Parameters
options
RequestOptions
➖
Used to set various options for making HTTP requests.
options.fetchOptions
➖
Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
Response
Promise<operations.SLOGetSLOByIdResponse>
Errors
errors.BadRequestError
400
application/json
errors.UnauthorizedError
401
application/json
errors.PaymentRequiredError
402
application/json
errors.ForbiddenError
403
application/json
errors.NotFoundError
404
application/json
errors.ConflictError
409
application/json
errors.UnprocessableEntityError
422
application/json
errors.InternalServerError
500
application/json
errors.BadGatewayError
502
application/json
errors.ServiceUnavailableError
503
application/json
errors.GatewayTimeoutError
504
application/json
errors.SDKDefaultError
4XX, 5XX
*/*
markFalsePositive
Value is a boolean (true or false)
Example Usage
Standalone function
The standalone function version of this method:
Parameters
options
RequestOptions
➖
Used to set various options for making HTTP requests.
options.fetchOptions
➖
Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
Response
Promise<operations.SLOMarkSLOFalsePositiveResponse>
Errors
errors.BadRequestError
400
application/json
errors.UnauthorizedError
401
application/json
errors.PaymentRequiredError
402
application/json
errors.ForbiddenError
403
application/json
errors.NotFoundError
404
application/json
errors.ConflictError
409
application/json
errors.UnprocessableEntityError
422
application/json
errors.InternalServerError
500
application/json
errors.BadGatewayError
502
application/json
errors.ServiceUnavailableError
503
application/json
errors.GatewayTimeoutError
504
application/json
errors.SDKDefaultError
4XX, 5XX
*/*
Last updated