# Services

## Overview

### Available Operations

* [get\_all](#get_all) - Get All Services
* [create](#create) - Create Service
* [get\_by\_name](#get_by_name) - Get Services By Name
* [get\_by\_id](#get_by_id) - Get Service By ID
* [update](#update) - Update Service
* [delete](#delete) - Delete Service
* [update\_apta\_config](#update_apta_config) - Auto Pause Transient Alerts (APTA)
* [create\_or\_update\_iag\_config](#create_or_update_iag_config) - Intelligent Alert Grouping (IAG)
* [update\_notification\_delay\_config](#update_notification_delay_config) - Delayed Notification Config

## get\_all

Get All Services

### Example Usage

```python
from squadcast import SquadcastSDK


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

    res = squadcast_sdk.services.get_all(owner_id="<id>")

    # Handle response
    print(res)

```

### Parameters

| Parameter      | Type                                                                          | Required             | Description                                                         |
| -------------- | ----------------------------------------------------------------------------- | -------------------- | ------------------------------------------------------------------- |
| `owner_id`     | *str*                                                                         | :heavy\_check\_mark: | N/A                                                                 |
| `entity_owner` | *Optional\[str]*                                                              | :heavy\_minus\_sign: | N/A                                                                 |
| `name`         | *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.ServicesGetServicesResponse**](/python-sdk/docs/models/servicesgetservicesresponse.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 Service

### Example Usage

```python
from squadcast import SquadcastSDK


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

    res = squadcast_sdk.services.create(owner_id="<id>", name="<value>", escalation_policy_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                                                                 |
| `escalation_policy_id`               | *str*                                                                                                                              | :heavy\_check\_mark: | N/A                                                                 |
| `description`                        | *Optional\[str]*                                                                                                                   | :heavy\_minus\_sign: | N/A                                                                 |
| `email_prefix`                       | *Optional\[str]*                                                                                                                   | :heavy\_minus\_sign: | N/A                                                                 |
| `maintainer`                         | [Optional\[models.V3ServicesServiceMaintainer\]](/python-sdk/docs/models/v3servicesservicemaintainer.md)                           | :heavy\_minus\_sign: | N/A                                                                 |
| `tags`                               | List\[[models.V3ServicesServiceTag](/python-sdk/docs/models/v3servicesservicetag.md)]                                              | :heavy\_minus\_sign: | N/A                                                                 |
| `auto_pause_transient_alerts_config` | [Optional\[models.V3ServicesAPTAConfig\]](/python-sdk/docs/models/v3servicesaptaconfig.md)                                         | :heavy\_minus\_sign: | N/A                                                                 |
| `intelligent_alerts_grouping_config` | [Optional\[models.V3ServicesIAGConfig\]](/python-sdk/docs/models/v3servicesiagconfig.md)                                           | :heavy\_minus\_sign: | N/A                                                                 |
| `delay_notification_config`          | [Optional\[models.V3ServicesNotificationDelayConfigRequest\]](/python-sdk/docs/models/v3servicesnotificationdelayconfigrequest.md) | :heavy\_minus\_sign: | N/A                                                                 |
| `dedup_init_config`                  | [Optional\[models.V3ServicesDedupInitConfig\]](/python-sdk/docs/models/v3servicesdedupinitconfig.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.ServicesCreateServiceResponse**](/python-sdk/docs/models/servicescreateserviceresponse.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    | \*/\*            |

## get\_by\_name

Get Services By Name

### Example Usage

```python
from squadcast import SquadcastSDK


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

    res = squadcast_sdk.services.get_by_name(name="<value>", owner_id="<id>")

    # Handle response
    print(res)

```

### Parameters

| Parameter  | Type                                                                          | Required             | Description                                                         |
| ---------- | ----------------------------------------------------------------------------- | -------------------- | ------------------------------------------------------------------- |
| `name`     | *str*                                                                         | :heavy\_check\_mark: | N/A                                                                 |
| `owner_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.ServicesGetServicesByNameResponse**](/python-sdk/docs/models/servicesgetservicesbynameresponse.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    | \*/\*            |

## get\_by\_id

Get Service 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.services.get_by_id(service_id="<id>")

    # Handle response
    print(res)

```

### Parameters

| Parameter    | Type                                                                          | Required             | Description                                                         |
| ------------ | ----------------------------------------------------------------------------- | -------------------- | ------------------------------------------------------------------- |
| `service_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.ServicesGetServiceByIDResponse**](/python-sdk/docs/models/servicesgetservicebyidresponse.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    | \*/\*            |

## update

Update Service

### Example Usage

```python
from squadcast import SquadcastSDK


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

    res = squadcast_sdk.services.update(service_id="<id>")

    # Handle response
    print(res)

```

### Parameters

| Parameter                            | Type                                                                                                                               | Required             | Description                                                         |
| ------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------- | -------------------- | ------------------------------------------------------------------- |
| `service_id`                         | *str*                                                                                                                              | :heavy\_check\_mark: | N/A                                                                 |
| `name`                               | *Optional\[str]*                                                                                                                   | :heavy\_minus\_sign: | N/A                                                                 |
| `escalation_policy_id`               | *Optional\[str]*                                                                                                                   | :heavy\_minus\_sign: | N/A                                                                 |
| `description`                        | *Optional\[str]*                                                                                                                   | :heavy\_minus\_sign: | N/A                                                                 |
| `email_prefix`                       | *Optional\[str]*                                                                                                                   | :heavy\_minus\_sign: | N/A                                                                 |
| `maintainer`                         | [Optional\[models.V3ServicesServiceMaintainer\]](/python-sdk/docs/models/v3servicesservicemaintainer.md)                           | :heavy\_minus\_sign: | N/A                                                                 |
| `tags`                               | List\[[models.V3ServicesServiceTag](/python-sdk/docs/models/v3servicesservicetag.md)]                                              | :heavy\_minus\_sign: | N/A                                                                 |
| `auto_pause_transient_alerts_config` | [Optional\[models.V3ServicesAPTAConfig\]](/python-sdk/docs/models/v3servicesaptaconfig.md)                                         | :heavy\_minus\_sign: | N/A                                                                 |
| `intelligent_alerts_grouping_config` | [Optional\[models.V3ServicesIAGConfig\]](/python-sdk/docs/models/v3servicesiagconfig.md)                                           | :heavy\_minus\_sign: | N/A                                                                 |
| `delay_notification_config`          | [Optional\[models.V3ServicesNotificationDelayConfigRequest\]](/python-sdk/docs/models/v3servicesnotificationdelayconfigrequest.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.ServicesUpdateServiceResponse**](/python-sdk/docs/models/servicesupdateserviceresponse.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    | \*/\*            |

## delete

Delete Service

### Example Usage

```python
from squadcast import SquadcastSDK


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

    res = squadcast_sdk.services.delete(service_id="<id>")

    # Handle response
    print(res)

```

### Parameters

| Parameter    | Type                                                                          | Required             | Description                                                         |
| ------------ | ----------------------------------------------------------------------------- | -------------------- | ------------------------------------------------------------------- |
| `service_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.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\_apta\_config

Auto Pause Transient Alerts (APTA)

### Example Usage

```python
from squadcast import SquadcastSDK


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

    res = squadcast_sdk.services.update_apta_config(service_id="<id>", is_enabled=False, timeout_in_mins=680029)

    # Handle response
    print(res)

```

### Parameters

| Parameter         | Type                                                                          | Required             | Description                                                         |
| ----------------- | ----------------------------------------------------------------------------- | -------------------- | ------------------------------------------------------------------- |
| `service_id`      | *str*                                                                         | :heavy\_check\_mark: | N/A                                                                 |
| `is_enabled`      | *bool*                                                                        | :heavy\_check\_mark: | N/A                                                                 |
| `timeout_in_mins` | *int*                                                                         | :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.ServicesCreateOrUpdateAPTAConfigResponse**](/python-sdk/docs/models/servicescreateorupdateaptaconfigresponse.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\_or\_update\_iag\_config

Intelligent Alert Grouping (IAG)

### Example Usage

```python
from squadcast import SquadcastSDK


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

    res = squadcast_sdk.services.create_or_update_iag_config(service_id="<id>", is_enabled=True, rolling_window_in_mins=246036)

    # Handle response
    print(res)

```

### Parameters

| Parameter                | Type                                                                          | Required             | Description                                                         |
| ------------------------ | ----------------------------------------------------------------------------- | -------------------- | ------------------------------------------------------------------- |
| `service_id`             | *str*                                                                         | :heavy\_check\_mark: | N/A                                                                 |
| `is_enabled`             | *bool*                                                                        | :heavy\_check\_mark: | N/A                                                                 |
| `rolling_window_in_mins` | *int*                                                                         | :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.ServicesCreateOrUpdateIAGConfigResponse**](/python-sdk/docs/models/servicescreateorupdateiagconfigresponse.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    | \*/\*            |

## update\_notification\_delay\_config

Delayed Notification Config

### Example Usage

```python
from squadcast import SquadcastSDK


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

    res = squadcast_sdk.services.update_notification_delay_config(service_id="<id>", is_enabled=False)

    # Handle response
    print(res)

```

### Parameters

| Parameter                  | Type                                                                                                                                                                     | Required             | Description                                                         |
| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------- | ------------------------------------------------------------------- |
| `service_id`               | *str*                                                                                                                                                                    | :heavy\_check\_mark: | N/A                                                                 |
| `is_enabled`               | *bool*                                                                                                                                                                   | :heavy\_check\_mark: | N/A                                                                 |
| `timezone`                 | *Optional\[str]*                                                                                                                                                         | :heavy\_minus\_sign: | N/A                                                                 |
| `fixed_timeslot_config`    | [Optional\[models.V3ServicesNotificationDelayConfigRequestFixedTimeslotConfig\]](/python-sdk/docs/models/v3servicesnotificationdelayconfigrequestfixedtimeslotconfig.md) | :heavy\_minus\_sign: | N/A                                                                 |
| `custom_timeslots_enabled` | *Optional\[bool]*                                                                                                                                                        | :heavy\_minus\_sign: | N/A                                                                 |
| `custom_timeslots`         | [Optional\[models.V3ServicesNotificationDelayConfigRequestCustomTimeslots\]](/python-sdk/docs/models/v3servicesnotificationdelayconfigrequestcustomtimeslots.md)         | :heavy\_minus\_sign: | N/A                                                                 |
| `assigned_to`              | [Optional\[models.V3ServicesNotificationDelayConfigRequestAssignedTo\]](/python-sdk/docs/models/v3servicesnotificationdelayconfigrequestassignedto.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.ServicesDelayedNotificationConfigResponse**](/python-sdk/docs/models/servicesdelayednotificationconfigresponse.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    | \*/\*            |


---

# Agent Instructions: 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:

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

The question should be specific, self-contained, and written in natural language.
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.
