> 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/python-sdk/docs/sdks/squadsv4.md).

# SquadsV4

## Overview

### Available Operations

* [create](#create) - Create Squad
* [update\_name](#update_name) - Update Squad Name

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

```python
from squadcast import SquadcastSDK


with SquadcastSDK(
    refresh_token_auth="<YOUR_REFRESH_TOKEN_AUTH_HERE>",
) as squadcast_sdk:

    res = squadcast_sdk.squads_v4.create(owner_id="<id>", name="<value>", members=[
        {
            "user_id": "<id>",
        },
    ])

    # Handle response
    print(res)

```

### Parameters

| Parameter  | Type                                                                                                                                 | Required             | Description                                                         |
| ---------- | ------------------------------------------------------------------------------------------------------------------------------------ | -------------------- | ------------------------------------------------------------------- |
| `owner_id` | *str*                                                                                                                                | :heavy\_check\_mark: | N/A                                                                 |
| `name`     | *str*                                                                                                                                | :heavy\_check\_mark: | N/A                                                                 |
| `members`  | List\[[models.V4SquadsSquadMember](https://developers.incidents.cloud.solarwinds.com/python-sdk/docs/models/v4squadssquadmember.md)] | :heavy\_check\_mark: | N/A                                                                 |
| `retries`  | [Optional\[utils.RetryConfig\]](https://developers.incidents.cloud.solarwinds.com/python-sdk/docs/models/utils/retryconfig.md)       | :heavy\_minus\_sign: | Configuration to override the default retry behavior of the client. |

### Response

[**models.SquadsCreateSquadResponse**](https://developers.incidents.cloud.solarwinds.com/python-sdk/docs/models/squadscreatesquadresponse.md)

### Errors

| Error Type             | Status Code                       | Content Type     |
| ---------------------- | --------------------------------- | ---------------- |
| errors.CommonV4Error   | 400, 401, 402, 403, 404, 409, 422 | application/json |
| errors.CommonV4Error   | 500, 502, 503, 504                | application/json |
| errors.SDKDefaultError | 4XX, 5XX                          | \*/\*            |

## update\_name

This endpoint is used to update squad's name. Requires `access_token` as a `Bearer {{token}}` in the `Authorization` header with `squad-create` scope.

### Example Usage

```python
from squadcast import SquadcastSDK


with SquadcastSDK(
    refresh_token_auth="<YOUR_REFRESH_TOKEN_AUTH_HERE>",
) as squadcast_sdk:

    res = squadcast_sdk.squads_v4.update_name(squad_id="<id>", name="<value>")

    # Handle response
    print(res)

```

### Parameters

| Parameter  | Type                                                                                                                           | Required             | Description                                                         |
| ---------- | ------------------------------------------------------------------------------------------------------------------------------ | -------------------- | ------------------------------------------------------------------- |
| `squad_id` | *str*                                                                                                                          | :heavy\_check\_mark: | N/A                                                                 |
| `name`     | *str*                                                                                                                          | :heavy\_check\_mark: | N/A                                                                 |
| `retries`  | [Optional\[utils.RetryConfig\]](https://developers.incidents.cloud.solarwinds.com/python-sdk/docs/models/utils/retryconfig.md) | :heavy\_minus\_sign: | Configuration to override the default retry behavior of the client. |

### Response

[**models.SquadsUpdateSquadNameResponse**](https://developers.incidents.cloud.solarwinds.com/python-sdk/docs/models/squadsupdatesquadnameresponse.md)

### Errors

| Error Type             | Status Code                       | Content Type     |
| ---------------------- | --------------------------------- | ---------------- |
| errors.CommonV4Error   | 400, 401, 402, 403, 404, 409, 422 | application/json |
| errors.CommonV4Error   | 500, 502, 503, 504                | application/json |
| errors.SDKDefaultError | 4XX, 5XX                          | \*/\*            |
