> For the complete documentation index, see [llms.txt](https://developers.incidents.cloud.solarwinds.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.incidents.cloud.solarwinds.com/typescript/docs/sdks/componentgroups.md).

# StatusPages.ComponentGroups

## Overview

### Available Operations

* [list](#list) - List Component Groups
* [create](#create) - Create Component Group
* [deleteById](#deletebyid) - Delete Component Group By ID
* [getById](#getbyid) - Get Component Group By ID

## list

List Component Groups

### Example Usage

```typescript
import { SquadcastSDK } from "@solarwinds/squadcast-sdk-typescript";

const squadcastSDK = new SquadcastSDK({
  refreshTokenAuth: "<YOUR_REFRESH_TOKEN_AUTH_HERE>",
});

async function run() {
  const result = await squadcastSDK.statusPages.componentGroups.list({
    statuspageID: "<id>",
  });

  console.log(result);
}

run();
```

### Standalone function

The standalone function version of this method:

```typescript
import { SquadcastSDKCore } from "@solarwinds/squadcast-sdk-typescript/core.js";
import { statusPagesComponentGroupsList } from "@solarwinds/squadcast-sdk-typescript/funcs/statusPagesComponentGroupsList.js";

// Use `SquadcastSDKCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const squadcastSDK = new SquadcastSDKCore({
  refreshTokenAuth: "<YOUR_REFRESH_TOKEN_AUTH_HERE>",
});

async function run() {
  const res = await statusPagesComponentGroupsList(squadcastSDK, {
    statuspageID: "<id>",
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("statusPagesComponentGroupsList failed:", res.error);
  }
}

run();
```

### Parameters

| Parameter              | Type                                                                                                                                                                                     | Required             | Description                                                                                                                                                                    |
| ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `request`              | [operations.ComponentGroupsListComponentGroupsRequest](https://developers.incidents.cloud.solarwinds.com/typescript/docs/models/operations/componentgroupslistcomponentgroupsrequest.md) | :heavy\_check\_mark: | The request object to use for the request.                                                                                                                                     |
| `options`              | RequestOptions                                                                                                                                                                           | :heavy\_minus\_sign: | Used to set various options for making HTTP requests.                                                                                                                          |
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options)                                                                                                  | :heavy\_minus\_sign: | 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`      | [RetryConfig](https://developers.incidents.cloud.solarwinds.com/typescript/docs/lib/utils/retryconfig.md)                                                                                | :heavy\_minus\_sign: | Enables retrying HTTP requests under certain failure conditions.                                                                                                               |

### Response

**Promise<**[**operations.ComponentGroupsListComponentGroupsResponse**](https://developers.incidents.cloud.solarwinds.com/typescript/docs/models/operations/componentgroupslistcomponentgroupsresponse.md)**>**

### 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

Create Component Group

### Example Usage

```typescript
import { SquadcastSDK } from "@solarwinds/squadcast-sdk-typescript";

const squadcastSDK = new SquadcastSDK({
  refreshTokenAuth: "<YOUR_REFRESH_TOKEN_AUTH_HERE>",
});

async function run() {
  const result = await squadcastSDK.statusPages.componentGroups.create({
    statuspageID: "<id>",
    v4StatusPagesComponentGroupsCreateComponentGroupRequest: {
      name: "<value>",
    },
  });

  console.log(result);
}

run();
```

### Standalone function

The standalone function version of this method:

```typescript
import { SquadcastSDKCore } from "@solarwinds/squadcast-sdk-typescript/core.js";
import { statusPagesComponentGroupsCreate } from "@solarwinds/squadcast-sdk-typescript/funcs/statusPagesComponentGroupsCreate.js";

// Use `SquadcastSDKCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const squadcastSDK = new SquadcastSDKCore({
  refreshTokenAuth: "<YOUR_REFRESH_TOKEN_AUTH_HERE>",
});

async function run() {
  const res = await statusPagesComponentGroupsCreate(squadcastSDK, {
    statuspageID: "<id>",
    v4StatusPagesComponentGroupsCreateComponentGroupRequest: {
      name: "<value>",
    },
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("statusPagesComponentGroupsCreate failed:", res.error);
  }
}

run();
```

### Parameters

| Parameter              | Type                                                                                                                                                                                       | Required             | Description                                                                                                                                                                    |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `request`              | [operations.ComponentGroupsCreateComponentGroupRequest](https://developers.incidents.cloud.solarwinds.com/typescript/docs/models/operations/componentgroupscreatecomponentgrouprequest.md) | :heavy\_check\_mark: | The request object to use for the request.                                                                                                                                     |
| `options`              | RequestOptions                                                                                                                                                                             | :heavy\_minus\_sign: | Used to set various options for making HTTP requests.                                                                                                                          |
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options)                                                                                                    | :heavy\_minus\_sign: | 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`      | [RetryConfig](https://developers.incidents.cloud.solarwinds.com/typescript/docs/lib/utils/retryconfig.md)                                                                                  | :heavy\_minus\_sign: | Enables retrying HTTP requests under certain failure conditions.                                                                                                               |

### Response

**Promise<**[**operations.ComponentGroupsCreateComponentGroupResponse**](https://developers.incidents.cloud.solarwinds.com/typescript/docs/models/operations/componentgroupscreatecomponentgroupresponse.md)**>**

### 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    | \*/\*            |

## deleteById

Delete Component Group By ID

### Example Usage

```typescript
import { SquadcastSDK } from "@solarwinds/squadcast-sdk-typescript";

const squadcastSDK = new SquadcastSDK({
  refreshTokenAuth: "<YOUR_REFRESH_TOKEN_AUTH_HERE>",
});

async function run() {
  const result = await squadcastSDK.statusPages.componentGroups.deleteById({
    statuspageID: "<id>",
    groupId: "<id>",
  });

  console.log(result);
}

run();
```

### Standalone function

The standalone function version of this method:

```typescript
import { SquadcastSDKCore } from "@solarwinds/squadcast-sdk-typescript/core.js";
import { statusPagesComponentGroupsDeleteById } from "@solarwinds/squadcast-sdk-typescript/funcs/statusPagesComponentGroupsDeleteById.js";

// Use `SquadcastSDKCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const squadcastSDK = new SquadcastSDKCore({
  refreshTokenAuth: "<YOUR_REFRESH_TOKEN_AUTH_HERE>",
});

async function run() {
  const res = await statusPagesComponentGroupsDeleteById(squadcastSDK, {
    statuspageID: "<id>",
    groupId: "<id>",
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("statusPagesComponentGroupsDeleteById failed:", res.error);
  }
}

run();
```

### Parameters

| Parameter              | Type                                                                                                                                                                                               | Required             | Description                                                                                                                                                                    |
| ---------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `request`              | [operations.ComponentGroupsDeleteComponentGroupByIdRequest](https://developers.incidents.cloud.solarwinds.com/typescript/docs/models/operations/componentgroupsdeletecomponentgroupbyidrequest.md) | :heavy\_check\_mark: | The request object to use for the request.                                                                                                                                     |
| `options`              | RequestOptions                                                                                                                                                                                     | :heavy\_minus\_sign: | Used to set various options for making HTTP requests.                                                                                                                          |
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options)                                                                                                            | :heavy\_minus\_sign: | 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`      | [RetryConfig](https://developers.incidents.cloud.solarwinds.com/typescript/docs/lib/utils/retryconfig.md)                                                                                          | :heavy\_minus\_sign: | Enables retrying HTTP requests under certain failure conditions.                                                                                                               |

### Response

**Promise<**[**operations.ComponentGroupsDeleteComponentGroupByIdResponse**](https://developers.incidents.cloud.solarwinds.com/typescript/docs/models/operations/componentgroupsdeletecomponentgroupbyidresponse.md)**>**

### 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

Get Component Group By ID

### Example Usage

```typescript
import { SquadcastSDK } from "@solarwinds/squadcast-sdk-typescript";

const squadcastSDK = new SquadcastSDK({
  refreshTokenAuth: "<YOUR_REFRESH_TOKEN_AUTH_HERE>",
});

async function run() {
  const result = await squadcastSDK.statusPages.componentGroups.getById({
    statuspageID: "<id>",
    groupId: "<id>",
  });

  console.log(result);
}

run();
```

### Standalone function

The standalone function version of this method:

```typescript
import { SquadcastSDKCore } from "@solarwinds/squadcast-sdk-typescript/core.js";
import { statusPagesComponentGroupsGetById } from "@solarwinds/squadcast-sdk-typescript/funcs/statusPagesComponentGroupsGetById.js";

// Use `SquadcastSDKCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const squadcastSDK = new SquadcastSDKCore({
  refreshTokenAuth: "<YOUR_REFRESH_TOKEN_AUTH_HERE>",
});

async function run() {
  const res = await statusPagesComponentGroupsGetById(squadcastSDK, {
    statuspageID: "<id>",
    groupId: "<id>",
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("statusPagesComponentGroupsGetById failed:", res.error);
  }
}

run();
```

### Parameters

| Parameter              | Type                                                                                                                                                                                         | Required             | Description                                                                                                                                                                    |
| ---------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `request`              | [operations.ComponentGroupsGetComponentGroupByIdRequest](https://developers.incidents.cloud.solarwinds.com/typescript/docs/models/operations/componentgroupsgetcomponentgroupbyidrequest.md) | :heavy\_check\_mark: | The request object to use for the request.                                                                                                                                     |
| `options`              | RequestOptions                                                                                                                                                                               | :heavy\_minus\_sign: | Used to set various options for making HTTP requests.                                                                                                                          |
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options)                                                                                                      | :heavy\_minus\_sign: | 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`      | [RetryConfig](https://developers.incidents.cloud.solarwinds.com/typescript/docs/lib/utils/retryconfig.md)                                                                                    | :heavy\_minus\_sign: | Enables retrying HTTP requests under certain failure conditions.                                                                                                               |

### Response

**Promise<**[**operations.ComponentGroupsGetComponentGroupByIdResponse**](https://developers.incidents.cloud.solarwinds.com/typescript/docs/models/operations/componentgroupsgetcomponentgroupbyidresponse.md)**>**

### 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    | \*/\*            |
