circle-info
Squadcast is now SolarWinds Incident Response

Webforms

Overview

Available Operations

getAll

Returns all webforms of the given owner_id (teamId) in the request param. 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.webforms.getAll({
    ownerId: "<id>",
  });

  for await (const page of result) {
    console.log(page);
  }
}

run();

Standalone function

The standalone function version of this method:

Parameters

Parameter
Type
Required
Description

request

✔️

The request object to use for the request.

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.

options.retries

Enables retrying HTTP requests under certain failure conditions.

Response

Promise<operations.WebformsGetAllWebformsResponse>

Errors

Error Type
Status Code
Content Type

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

Add a webform to the organization. Returns the webform object in response. 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

Parameter
Type
Required
Description

request

✔️

The request object to use for the request.

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.

options.retries

Enables retrying HTTP requests under certain failure conditions.

Response

Promise<operations.WebformsCreateWebformResponse>

Errors

Error Type
Status Code
Content Type

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

Update a webform to the organization. Returns the webform object in response. 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

Parameter
Type
Required
Description

request

✔️

The request object to use for the request.

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.

options.retries

Enables retrying HTTP requests under certain failure conditions.

Response

Promise<operations.WebformsUpdateWebformResponse>

Errors

Error Type
Status Code
Content Type

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 a webform from the organization. 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

Parameter
Type
Required
Description

request

✔️

The request object to use for the request.

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.

options.retries

Enables retrying HTTP requests under certain failure conditions.

Response

Promise<operations.WebformsRemoveWebformResponse>

Errors

Error Type
Status Code
Content Type

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 webform details of the given webformId 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

Parameter
Type
Required
Description

request

✔️

The request object to use for the request.

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.

options.retries

Enables retrying HTTP requests under certain failure conditions.

Response

Promise<operations.WebformsGetWebformByIdResponse>

Errors

Error Type
Status Code
Content Type

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