> 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\]](/python-sdk/docs/models/utils/retryconfig.md) | :heavy\_minus\_sign: | Configuration to override the default retry behavior of the client. |

### Response

[**models.SchedulesListSchedulesResponse**](/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](/python-sdk/docs/models/v4createschedulerequestownertype.md) | :heavy\_check\_mark: | N/A                                                                 |
| `time_zone`   | *str*                                                                                                  | :heavy\_check\_mark: | N/A                                                                 |
| `tags`        | List\[[models.V4Tag](/python-sdk/docs/models/v4tag.md)]                                                | :heavy\_check\_mark: | N/A                                                                 |
| `retries`     | [Optional\[utils.RetryConfig\]](/python-sdk/docs/models/utils/retryconfig.md)                          | :heavy\_minus\_sign: | Configuration to override the default retry behavior of the client. |

### Response

[**models.SchedulesCreateScheduleResponse**](/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\]](/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/blob/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\]](/python-sdk/docs/models/utils/retryconfig.md) | :heavy\_minus\_sign: | Configuration to override the default retry behavior of the client. |

### Response

[**models.SchedulesGetScheduleByIDResponse**](/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](/python-sdk/docs/models/v4updateschedulerequestownertype.md) | :heavy\_check\_mark: | N/A                                                                 |
| `tags`        | List\[[models.V4Tag](/python-sdk/docs/models/v4tag.md)]                                                | :heavy\_check\_mark: | N/A                                                                 |
| `retries`     | [Optional\[utils.RetryConfig\]](/python-sdk/docs/models/utils/retryconfig.md)                          | :heavy\_minus\_sign: | Configuration to override the default retry behavior of the client. |

### Response

[**models.SchedulesUpdateScheduleResponse**](/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\]](/python-sdk/docs/models/action.md)                | :heavy\_minus\_sign: | N/A                                                                 |
| `retries`     | [Optional\[utils.RetryConfig\]](/python-sdk/docs/models/utils/retryconfig.md) | :heavy\_minus\_sign: | Configuration to override the default retry behavior of the client. |

### Response

[**models.SchedulesPauseresumeScheduleResponse**](/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\]](/python-sdk/docs/models/utils/retryconfig.md) | :heavy\_minus\_sign: | Configuration to override the default retry behavior of the client. |

### Response

[**models.SchedulesChangeTimezoneResponse**](/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](/python-sdk/docs/models/schedulescloneschedulerequestbody.md) | :heavy\_check\_mark: | N/A                                                                 |
| `retries`      | [Optional\[utils.RetryConfig\]](/python-sdk/docs/models/utils/retryconfig.md)                            | :heavy\_minus\_sign: | Configuration to override the default retry behavior of the client. |

### Response

[**models.SchedulesCloneScheduleResponse**](/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\]](/python-sdk/docs/models/utils/retryconfig.md) | :heavy\_minus\_sign: | Configuration to override the default retry behavior of the client. |

### Response

[**models.ExportGetScheduleIcalLinkResponse**](/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](/python-sdk/docs/models/exportcreatescheduleicallinkrequestbody.md) | :heavy\_check\_mark: | N/A                                                                 |
| `retries`      | [Optional\[utils.RetryConfig\]](/python-sdk/docs/models/utils/retryconfig.md)                                        | :heavy\_minus\_sign: | Configuration to override the default retry behavior of the client. |

### Response

[**models.ExportCreateScheduleIcalLinkResponse**](/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                          | \*/\*            |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://developers.incidents.cloud.solarwinds.com/python-sdk/docs/sdks/schedulessdk.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
