> 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/schedulessdk.md).

# Schedules

## Overview

### Available Operations

* [list](#list) - List Schedules
* [create](#create) - Create Schedule
* [delete](#delete) - Delete Schedule
* [get\_by\_id](#get_by_id) - Get Schedule by ID
* [update](#update) - Update Schedule
* [pause\_resume](#pause_resume) - Pause/Resume Schedule
* [change\_timezone](#change_timezone) - Change Timezone
* [clone](#clone) - Clone Schedule
* [get\_ical\_link](#get_ical_link) - Get Schedule ICal Link
* [create\_ical\_link](#create_ical_link) - Create Schedule ICal Link

## list

List Schedules

### Example Usage

```python
from squadcast import SquadcastSDK


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

    res = squadcast_sdk.schedules.list(team_id="<id>")

    while res is not None:
        # Handle items

        res = res.next()

```

### Parameters

| Parameter                   | Type                                                                                                                           | Required             | Description                                                         |
| --------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | -------------------- | ------------------------------------------------------------------- |
| `team_id`                   | *str*                                                                                                                          | :heavy\_check\_mark: | N/A                                                                 |
| `schedule_i_ds`             | List\[*int*]                                                                                                                   | :heavy\_minus\_sign: | N/A                                                                 |
| `participants`              | List\[*str*]                                                                                                                   | :heavy\_minus\_sign: | N/A                                                                 |
| `schedule_name`             | *Optional\[str]*                                                                                                               | :heavy\_minus\_sign: | N/A                                                                 |
| `my_on_call`                | *Optional\[bool]*                                                                                                              | :heavy\_minus\_sign: | N/A                                                                 |
| `you_and_your_squads`       | *Optional\[bool]*                                                                                                              | :heavy\_minus\_sign: | N/A                                                                 |
| `search`                    | *Optional\[str]*                                                                                                               | :heavy\_minus\_sign: | N/A                                                                 |
| `hide_paused`               | *Optional\[bool]*                                                                                                              | :heavy\_minus\_sign: | N/A                                                                 |
| `owner_id`                  | *Optional\[str]*                                                                                                               | :heavy\_minus\_sign: | N/A                                                                 |
| `escalation_policies`       | List\[*str*]                                                                                                                   | :heavy\_minus\_sign: | N/A                                                                 |
| `without_escalation_policy` | *Optional\[bool]*                                                                                                              | :heavy\_minus\_sign: | N/A                                                                 |
| `page_size`                 | *Optional\[int]*                                                                                                               | :heavy\_minus\_sign: | N/A                                                                 |
| `cursor`                    | *Optional\[str]*                                                                                                               | :heavy\_minus\_sign: | 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.SchedulesListSchedulesResponse**](https://developers.incidents.cloud.solarwinds.com/python-sdk/docs/models/scheduleslistschedulesresponse.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                          | \*/\*            |

## create

Create Schedule

### Example Usage

```python
from squadcast import SquadcastSDK


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

    res = squadcast_sdk.schedules.create(name="<value>", description="fumigate pfft kooky whoa but lighthearted popularity", team_id="<id>", owner_id="<id>", owner_type="user", time_zone="Pacific/Easter", tags=[
        {
            "key": "<key>",
            "value": "<value>",
            "color": "pink",
        },
    ])

    # Handle response
    print(res)

```

### Parameters

| Parameter     | Type                                                                                                                                                    | Required             | Description                                                         |
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------- | ------------------------------------------------------------------- |
| `name`        | *str*                                                                                                                                                   | :heavy\_check\_mark: | N/A                                                                 |
| `description` | *str*                                                                                                                                                   | :heavy\_check\_mark: | N/A                                                                 |
| `team_id`     | *str*                                                                                                                                                   | :heavy\_check\_mark: | N/A                                                                 |
| `owner_id`    | *str*                                                                                                                                                   | :heavy\_check\_mark: | N/A                                                                 |
| `owner_type`  | [models.V4CreateScheduleRequestOwnerType](https://developers.incidents.cloud.solarwinds.com/python-sdk/docs/models/v4createschedulerequestownertype.md) | :heavy\_check\_mark: | N/A                                                                 |
| `time_zone`   | *str*                                                                                                                                                   | :heavy\_check\_mark: | N/A                                                                 |
| `tags`        | List\[[models.V4Tag](https://developers.incidents.cloud.solarwinds.com/python-sdk/docs/models/v4tag.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.SchedulesCreateScheduleResponse**](https://developers.incidents.cloud.solarwinds.com/python-sdk/docs/models/schedulescreatescheduleresponse.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                          | \*/\*            |

## delete

Delete Schedule

### Example Usage

```python
from squadcast import SquadcastSDK


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

    res = squadcast_sdk.schedules.delete(schedule_id="<id>")

    # Handle response
    print(res)

```

### Parameters

| Parameter     | Type                                                                                                                           | Required             | Description                                                         |
| ------------- | ------------------------------------------------------------------------------------------------------------------------------ | -------------------- | ------------------------------------------------------------------- |
| `schedule_id` | *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

[**bytes**](https://github.com/solarwinds/squadcast-sdk-python/tree/main/squadcastv1/docs/models/.md/README.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                          | \*/\*            |

## get\_by\_id

Get Schedule by ID

### Example Usage

```python
from squadcast import SquadcastSDK


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

    res = squadcast_sdk.schedules.get_by_id(schedule_id="<id>")

    # Handle response
    print(res)

```

### Parameters

| Parameter     | Type                                                                                                                           | Required             | Description                                                         |
| ------------- | ------------------------------------------------------------------------------------------------------------------------------ | -------------------- | ------------------------------------------------------------------- |
| `schedule_id` | *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.SchedulesGetScheduleByIDResponse**](https://developers.incidents.cloud.solarwinds.com/python-sdk/docs/models/schedulesgetschedulebyidresponse.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

Update Schedule

### Example Usage

```python
from squadcast import SquadcastSDK


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

    res = squadcast_sdk.schedules.update(schedule_id="<id>", name="<value>", description="smoothly festival unruly alert now far provided absentmindedly", owner_id="<id>", owner_type="squad", tags=[])

    # Handle response
    print(res)

```

### Parameters

| Parameter     | Type                                                                                                                                                    | Required             | Description                                                         |
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------- | ------------------------------------------------------------------- |
| `schedule_id` | *str*                                                                                                                                                   | :heavy\_check\_mark: | N/A                                                                 |
| `name`        | *str*                                                                                                                                                   | :heavy\_check\_mark: | N/A                                                                 |
| `description` | *str*                                                                                                                                                   | :heavy\_check\_mark: | N/A                                                                 |
| `owner_id`    | *str*                                                                                                                                                   | :heavy\_check\_mark: | N/A                                                                 |
| `owner_type`  | [models.V4UpdateScheduleRequestOwnerType](https://developers.incidents.cloud.solarwinds.com/python-sdk/docs/models/v4updateschedulerequestownertype.md) | :heavy\_check\_mark: | N/A                                                                 |
| `tags`        | List\[[models.V4Tag](https://developers.incidents.cloud.solarwinds.com/python-sdk/docs/models/v4tag.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.SchedulesUpdateScheduleResponse**](https://developers.incidents.cloud.solarwinds.com/python-sdk/docs/models/schedulesupdatescheduleresponse.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                          | \*/\*            |

## pause\_resume

Pause/Resume Schedule

### Example Usage

```python
from squadcast import SquadcastSDK


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

    res = squadcast_sdk.schedules.pause_resume(schedule_id="<id>")

    # Handle response
    print(res)

```

### Parameters

| Parameter     | Type                                                                                                                           | Required             | Description                                                         |
| ------------- | ------------------------------------------------------------------------------------------------------------------------------ | -------------------- | ------------------------------------------------------------------- |
| `schedule_id` | *str*                                                                                                                          | :heavy\_check\_mark: | N/A                                                                 |
| `action`      | [Optional\[models.Action\]](https://developers.incidents.cloud.solarwinds.com/python-sdk/docs/models/action.md)                | :heavy\_minus\_sign: | 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.SchedulesPauseresumeScheduleResponse**](https://developers.incidents.cloud.solarwinds.com/python-sdk/docs/models/schedulespauseresumescheduleresponse.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                          | \*/\*            |

## change\_timezone

Change Timezone

### Example Usage

```python
from squadcast import SquadcastSDK


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

    res = squadcast_sdk.schedules.change_timezone(schedule_id="<id>")

    # Handle response
    print(res)

```

### Parameters

| Parameter     | Type                                                                                                                           | Required             | Description                                                         |
| ------------- | ------------------------------------------------------------------------------------------------------------------------------ | -------------------- | ------------------------------------------------------------------- |
| `schedule_id` | *str*                                                                                                                          | :heavy\_check\_mark: | N/A                                                                 |
| `time_zone`   | *Optional\[str]*                                                                                                               | :heavy\_minus\_sign: | 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.SchedulesChangeTimezoneResponse**](https://developers.incidents.cloud.solarwinds.com/python-sdk/docs/models/scheduleschangetimezoneresponse.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                          | \*/\*            |

## clone

Clone Schedule

### Example Usage

```python
from squadcast import SquadcastSDK


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

    res = squadcast_sdk.schedules.clone(schedule_id="<id>", request_body={})

    # Handle response
    print(res)

```

### Parameters

| Parameter      | Type                                                                                                                                                      | Required             | Description                                                         |
| -------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------- | ------------------------------------------------------------------- |
| `schedule_id`  | *str*                                                                                                                                                     | :heavy\_check\_mark: | N/A                                                                 |
| `request_body` | [models.SchedulesCloneScheduleRequestBody](https://developers.incidents.cloud.solarwinds.com/python-sdk/docs/models/schedulescloneschedulerequestbody.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.SchedulesCloneScheduleResponse**](https://developers.incidents.cloud.solarwinds.com/python-sdk/docs/models/schedulesclonescheduleresponse.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                          | \*/\*            |

## get\_ical\_link

Get Schedule ICal Link

### Example Usage

```python
from squadcast import SquadcastSDK


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

    res = squadcast_sdk.schedules.get_ical_link(schedule_id="<id>", my_on_call=False)

    # Handle response
    print(res)

```

### Parameters

| Parameter     | Type                                                                                                                           | Required             | Description                                                         |
| ------------- | ------------------------------------------------------------------------------------------------------------------------------ | -------------------- | ------------------------------------------------------------------- |
| `schedule_id` | *str*                                                                                                                          | :heavy\_check\_mark: | N/A                                                                 |
| `my_on_call`  | *bool*                                                                                                                         | :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.ExportGetScheduleIcalLinkResponse**](https://developers.incidents.cloud.solarwinds.com/python-sdk/docs/models/exportgetscheduleicallinkresponse.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                          | \*/\*            |

## create\_ical\_link

Create Schedule ICal Link

### Example Usage

```python
from squadcast import SquadcastSDK


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

    res = squadcast_sdk.schedules.create_ical_link(schedule_id="<id>", my_on_call=True, request_body={})

    # Handle response
    print(res)

```

### Parameters

| Parameter      | Type                                                                                                                                                                  | Required             | Description                                                         |
| -------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------- | ------------------------------------------------------------------- |
| `schedule_id`  | *str*                                                                                                                                                                 | :heavy\_check\_mark: | N/A                                                                 |
| `my_on_call`   | *bool*                                                                                                                                                                | :heavy\_check\_mark: | N/A                                                                 |
| `request_body` | [models.ExportCreateScheduleIcalLinkRequestBody](https://developers.incidents.cloud.solarwinds.com/python-sdk/docs/models/exportcreatescheduleicallinkrequestbody.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.ExportCreateScheduleIcalLinkResponse**](https://developers.incidents.cloud.solarwinds.com/python-sdk/docs/models/exportcreatescheduleicallinkresponse.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                          | \*/\*            |
