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

# incidents

## Incidents

### Overview

#### Available Operations

* [bulk\_acknowledge](#bulk_acknowledge) - Bulk Acknowledge Incidents
* [export\_incidents](#export_incidents) - Incident Export
* [merge](#merge) - Merge Incidents
* [bulk\_update\_priority](#bulk_update_priority) - Bulk Incidents Priority Update
* [bulk\_resolve](#bulk_resolve) - Bulk Resolve Incidents
* [get\_by\_id](#get_by_id) - Get Incident by ID
* [acknowledge](#acknowledge) - Acknowledge Incident
* [mark\_slo\_false\_positive](#mark_slo_false_positive) - Mark Incident SLO False Positive
* [update\_priority](#update_priority) - Incident Priority Update
* [reassign](#reassign) - Reassign Incident
* [resolve](#resolve) - Resolve Incident
* [unmerge](#unmerge) - Unmerge Incident
* [get\_status\_by\_request\_ids](#get_status_by_request_ids) - Get Incidents Status By RequestIDs

### bulk\_acknowledge

* This endpoint is used to bulk acknowledge the incident by IDs. The API can handle a maximum of 100 incident IDs in a single request with 10 such calls per minute."
* Requires `access_token` as a `Bearer {{token}}` in the `Authorization` header.

#### Example Usage

```python
from squadcast import SquadcastSDK


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

    res = squadcast_sdk.incidents.bulk_acknowledge(incident_ids=[
        "<value 1>",
        "<value 2>",
    ])

    # Handle response
    print(res)

```

#### Parameters

| Parameter      | Type                                                                                                                           | Required             | Description                                                         |
| -------------- | ------------------------------------------------------------------------------------------------------------------------------ | -------------------- | ------------------------------------------------------------------- |
| `incident_ids` | List\[*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.IncidentsBulkAcknowledgeIncidentsResponse**](https://developers.incidents.cloud.solarwinds.com/python-sdk/docs/models/incidentsbulkacknowledgeincidentsresponse.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    | \*/\*            |

### export\_incidents

* This endpoint is used to export the incident details into a `csv` or `json` file.
* Requires `access_token` as a `Bearer {{token}}` in the `Authorization` header.
* Header field/value: `Content-Type`: `text/csv`

Query Params:

```
type: csv or json
start_time: filter by date range
end_time: filter by date range
services: filter by services
sources: filter by alert sources
assigned_to: filter by assignee
status: filter by incident status
slo_affecting: filetr by slo affected
slos: filter by slos
tags: filter by tags key=value

```

#### Example Usage

```python
from squadcast import SquadcastSDK
from squadcast.utils import parse_datetime


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

    squadcast_sdk.incidents.export_incidents(start_time=parse_datetime("2023-02-02T07:53:59.590Z"), end_time=parse_datetime("2023-02-03T13:28:22.839Z"), type_="csv", owner_id="<id>")

    # Use the SDK ...

```

#### Parameters

| Parameter                                | Type                                                                                                                                                                                            | Required             | Description                                                         |
| ---------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------- | ------------------------------------------------------------------- |
| `start_time`                             | [date](https://docs.python.org/3/library/datetime.html#date-objects)                                                                                                                            | :heavy\_check\_mark: | N/A                                                                 |
| `end_time`                               | [date](https://docs.python.org/3/library/datetime.html#date-objects)                                                                                                                            | :heavy\_check\_mark: | N/A                                                                 |
| `type`                                   | [models.V3IncidentsExportFormat](https://developers.incidents.cloud.solarwinds.com/python-sdk/docs/models/v3incidentsexportformat.md)                                                           | :heavy\_check\_mark: | Defines the format of the export.                                   |
| `owner_id`                               | *str*                                                                                                                                                                                           | :heavy\_check\_mark: | N/A                                                                 |
| `status`                                 | List\[*str*]                                                                                                                                                                                    | :heavy\_minus\_sign: | N/A                                                                 |
| `services`                               | List\[*str*]                                                                                                                                                                                    | :heavy\_minus\_sign: | N/A                                                                 |
| `sources`                                | List\[*str*]                                                                                                                                                                                    | :heavy\_minus\_sign: | N/A                                                                 |
| `assigned_to`                            | List\[*str*]                                                                                                                                                                                    | :heavy\_minus\_sign: | N/A                                                                 |
| `assigned_to_user_i_ds_and_their_squads` | List\[*str*]                                                                                                                                                                                    | :heavy\_minus\_sign: | N/A                                                                 |
| `service_owner`                          | *Optional\[str]*                                                                                                                                                                                | :heavy\_minus\_sign: | N/A                                                                 |
| `priority`                               | List\[[models.V3IncidentsIncidentPriority](https://developers.incidents.cloud.solarwinds.com/python-sdk/docs/models/v3incidentsincidentpriority.md)]                                            | :heavy\_minus\_sign: | N/A                                                                 |
| `tags`                                   | List\[*str*]                                                                                                                                                                                    | :heavy\_minus\_sign: | N/A                                                                 |
| `slo_affecting`                          | [Optional\[models.V3IncidentsIncidentExportRequestSloAffecting\]](https://developers.incidents.cloud.solarwinds.com/python-sdk/docs/models/v3incidentsincidentexportrequestsloaffecting.md)     | :heavy\_minus\_sign: | N/A                                                                 |
| `slos`                                   | List\[*int*]                                                                                                                                                                                    | :heavy\_minus\_sign: | N/A                                                                 |
| `is_starred`                             | [Optional\[models.V3IncidentsIncidentExportRequestIsStarred\]](https://developers.incidents.cloud.solarwinds.com/python-sdk/docs/models/v3incidentsincidentexportrequestisstarred.md)           | :heavy\_minus\_sign: | N/A                                                                 |
| `text_filter`                            | *Optional\[str]*                                                                                                                                                                                | :heavy\_minus\_sign: | N/A                                                                 |
| `notes`                                  | [Optional\[models.V3IncidentsIncidentExportRequestNotes\]](https://developers.incidents.cloud.solarwinds.com/python-sdk/docs/models/v3incidentsincidentexportrequestnotes.md)                   | :heavy\_minus\_sign: | N/A                                                                 |
| `retrospectives`                         | [Optional\[models.V3IncidentsIncidentExportRequestRetrospectives\]](https://developers.incidents.cloud.solarwinds.com/python-sdk/docs/models/v3incidentsincidentexportrequestretrospectives.md) | :heavy\_minus\_sign: | N/A                                                                 |
| `sort_by`                                | [Optional\[models.V3IncidentsIncidentExportRequestSortBy\]](https://developers.incidents.cloud.solarwinds.com/python-sdk/docs/models/v3incidentsincidentexportrequestsortby.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. |

#### Errors

| Error Type                      | Status Code | Content Type     |
| ------------------------------- | ----------- | ---------------- |
| 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    | \*/\*            |

### merge

* This endpoint merges incidents under an existing parent incident or a newly created parent incident. A parent can have at most 100 child incidents in total.
* All selected child incidents must belong to the team specified by `owner_id` and must not be suppressed, already merged as a child, or a parent with child incidents.
* An existing parent incident must belong to the same team and must not be suppressed or already merged as a child.
* When using an existing parent, the parent and child incidents must all be resolved or all be open (`triggered` or `acknowledged`).
* When creating a new parent, provide at least two open child incidents and the `new_incident` details instead of `parent_incident_id`.
* Requires `access_token` as a `Bearer {{token}}` in the `Authorization` header.

#### Example Usage

```python
from squadcast import SquadcastSDK


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

    res = squadcast_sdk.incidents.merge(request={
        "owner_id": "<id>",
        "children": [
            "<value 1>",
            "<value 2>",
        ],
        "new_incident": {
            "message": "<value>",
            "assignee": {
                "id": "<id>",
                "type": "escalationpolicy",
            },
            "service_id": "<id>",
        },
    })

    # Handle response
    print(res)

```

#### Parameters

| Parameter | Type                                                                                                                                                | Required             | Description                                                         |
| --------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------- | ------------------------------------------------------------------- |
| `request` | [models.IncidentsMergeIncidentsRequest](https://developers.incidents.cloud.solarwinds.com/python-sdk/docs/models/incidentsmergeincidentsrequest.md) | :heavy\_check\_mark: | The request object to use for the request.                          |
| `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.IncidentsMergeIncidentsResponse**](https://developers.incidents.cloud.solarwinds.com/python-sdk/docs/models/incidentsmergeincidentsresponse.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    | \*/\*            |

### bulk\_update\_priority

* This endpoint is used to bulk update incident priority.
* Requires `access_token` as a `Bearer {{token}}` in the `Authorization` header.

#### Example Usage

```python
from squadcast import SquadcastSDK


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

    res = squadcast_sdk.incidents.bulk_update_priority(incident_ids=[], priority="<value>")

    # Handle response
    print(res)

```

#### Parameters

| Parameter      | Type                                                                                                                           | Required             | Description                                                         |
| -------------- | ------------------------------------------------------------------------------------------------------------------------------ | -------------------- | ------------------------------------------------------------------- |
| `incident_ids` | List\[*str*]                                                                                                                   | :heavy\_check\_mark: | N/A                                                                 |
| `priority`     | *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.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    | \*/\*            |

### bulk\_resolve

* This endpoint is used to bulk resolve the incident by IDs. The API can handle a maximum of 100 incident IDs in a single request with 10 such calls per minute."
* Requires `access_token` as a `Bearer {{token}}` in the `Authorization` header.

#### Example Usage

```python
from squadcast import SquadcastSDK


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

    res = squadcast_sdk.incidents.bulk_resolve(incident_ids=[
        "<value 1>",
    ])

    # Handle response
    print(res)

```

#### Parameters

| Parameter      | Type                                                                                                                           | Required             | Description                                                         |
| -------------- | ------------------------------------------------------------------------------------------------------------------------------ | -------------------- | ------------------------------------------------------------------- |
| `incident_ids` | List\[*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.IncidentsBulkResolveIncidentsResponse**](https://developers.incidents.cloud.solarwinds.com/python-sdk/docs/models/incidentsbulkresolveincidentsresponse.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

* This endpoint is used to get the incident details by ID.
* Requires `access_token` as a `Bearer {{token}}` in the `Authorization` header.

#### Example Usage

```python
from squadcast import SquadcastSDK


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

    res = squadcast_sdk.incidents.get_by_id(incident_id="<id>")

    # Handle response
    print(res)

```

#### Parameters

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

### acknowledge

* This endpoint is used to acknowledge the incident by ID.
* Requires `access_token` as a `Bearer {{token}}` in the `Authorization` header.

#### Example Usage

```python
from squadcast import SquadcastSDK


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

    res = squadcast_sdk.incidents.acknowledge(incident_id="<id>")

    # Handle response
    print(res)

```

#### Parameters

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

### mark\_slo\_false\_positive

* This endpoint is used to mark incident slo false positive.
* Requires `access_token` as a `Bearer {{token}}` in the `Authorization` header.

#### Example Usage

```python
from squadcast import SquadcastSDK


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

    res = squadcast_sdk.incidents.mark_slo_false_positive(incident_id="<id>", value="<value>")

    # Handle response
    print(res)

```

#### Parameters

| Parameter     | Type                                                                                                                           | Required             | Description                                                         |
| ------------- | ------------------------------------------------------------------------------------------------------------------------------ | -------------------- | ------------------------------------------------------------------- |
| `incident_id` | *str*                                                                                                                          | :heavy\_check\_mark: | N/A                                                                 |
| `value`       | *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.IncidentsMarkIncidentSloFalsePositiveResponse**](https://developers.incidents.cloud.solarwinds.com/python-sdk/docs/models/incidentsmarkincidentslofalsepositiveresponse.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\_priority

* This endpoint is used to update incident priority by ID.
* Requires `access_token` as a `Bearer {{token}}` in the `Authorization` header.

#### Example Usage

```python
from squadcast import SquadcastSDK


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

    res = squadcast_sdk.incidents.update_priority(incident_id="<id>")

    # Handle response
    print(res)

```

#### Parameters

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

### reassign

* This endpoint is used to reassign the unresolved incident to any user or escalation policy or squads by ID.
* Requires `access_token` as a `Bearer {{token}}` in the `Authorization` header.
* `type` can be either `user` or `escalationpolicy` or `squad`

#### Example Usage

```python
from squadcast import SquadcastSDK


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

    res = squadcast_sdk.incidents.reassign(incident_id="<id>", reassign_to={
        "id": "<id>",
        "type": "escalationpolicy",
    })

    # Handle response
    print(res)

```

#### Parameters

| Parameter     | Type                                                                                                                           | Required             | Description                                                         |
| ------------- | ------------------------------------------------------------------------------------------------------------------------------ | -------------------- | ------------------------------------------------------------------- |
| `incident_id` | *str*                                                                                                                          | :heavy\_check\_mark: | N/A                                                                 |
| `reassign_to` | [models.V3IncidentsAssignee](https://developers.incidents.cloud.solarwinds.com/python-sdk/docs/models/v3incidentsassignee.md)  | :heavy\_check\_mark: | Assignment target for an incident.                                  |
| `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.IncidentsReassignIncidentResponse**](https://developers.incidents.cloud.solarwinds.com/python-sdk/docs/models/incidentsreassignincidentresponse.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    | \*/\*            |

### resolve

* This endpoint is used to resolve the incident by ID.
* Requires `access_token` as a `Bearer {{token}}` in the `Authorization` header.
* Resolution Reason is mandatory / optional based on the organization feature settings (Only for Premium and Enterprise Orgs) [Read more](https://support.squadcast.com/incidents-page/incidents-details#understanding-resolution-reason)

#### Example Usage

```python
from squadcast import SquadcastSDK


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

    res = squadcast_sdk.incidents.resolve(incident_id="<id>", resolution_reason={
        "message": "<value>",
    })

    # Handle response
    print(res)

```

#### Parameters

| Parameter           | Type                                                                                                                           | Required             | Description                                                         |
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------ | -------------------- | ------------------------------------------------------------------- |
| `incident_id`       | *str*                                                                                                                          | :heavy\_check\_mark: | N/A                                                                 |
| `resolution_reason` | [models.ResolutionReason](https://developers.incidents.cloud.solarwinds.com/python-sdk/docs/models/resolutionreason.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.IncidentsResolveIncidentResponse**](https://developers.incidents.cloud.solarwinds.com/python-sdk/docs/models/incidentsresolveincidentresponse.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    | \*/\*            |

### unmerge

* This endpoint unmerges a child incident from its parent incident.
* The incident must currently be a child of a parent incident, and the parent incident must not be resolved or suppressed.
* `send_notification`: if `true`, sends notifications for the unmerged incident.
* `assign_me`: if `true`, assigns the unmerged incident to the requesting user. If `false`, the incident keeps its last assignee, provided that assignee still exists; otherwise the request fails and `assign_me` must be set to `true`.
* Requires `access_token` as a `Bearer {{token}}` in the `Authorization` header.

#### Example Usage

```python
from squadcast import SquadcastSDK


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

    res = squadcast_sdk.incidents.unmerge(incident_id="<id>", send_notification=False, assign_me=True)

    # Handle response
    print(res)

```

#### Parameters

| Parameter           | Type                                                                                                                           | Required             | Description                                                         |
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------ | -------------------- | ------------------------------------------------------------------- |
| `incident_id`       | *str*                                                                                                                          | :heavy\_check\_mark: | N/A                                                                 |
| `send_notification` | *bool*                                                                                                                         | :heavy\_check\_mark: | N/A                                                                 |
| `assign_me`         | *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.IncidentsUnmergeIncidentResponse**](https://developers.incidents.cloud.solarwinds.com/python-sdk/docs/models/incidentsunmergeincidentresponse.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\_status\_by\_request\_ids

* This endpoint is used to get the status of incidents given list of request\_ids
* Requires `access_token` as a `Bearer {{token}}` in the `Authorization` header.

## Response

* The response contains the mapping from `request_ids` to incident status.
* `status` field can be one of - `suppressed`, `discarded`, `deduplicated`, `created`, `error`.
* status is `error` if the `request_id` is invalid. Both `incident_id` and `event_id` field won't be present if `status` is `error`
* status is `suppressed` if the incident was suppressed due to suppression rules.
* status is `deduplicated` if the incident was deduplicated due to deduplication rules.
* status is `discarded` if the incident was discarded due to some deduplication rule. `incident_id` field won't be present if `status` is `discarded`.
* otherwise, the status is `created`

#### Example Usage

```python
from squadcast import SquadcastSDK


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

    res = squadcast_sdk.incidents.get_status_by_request_ids(request_ids=[
        "<value 1>",
        "<value 2>",
        "<value 3>",
    ])

    # Handle response
    print(res)

```

#### Parameters

| Parameter     | Type                                                                                                                           | Required             | Description                                                         |
| ------------- | ------------------------------------------------------------------------------------------------------------------------------ | -------------------- | ------------------------------------------------------------------- |
| `request_ids` | List\[*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.IncidentsGetIncidentsStatusByRequestidsResponse**](https://developers.incidents.cloud.solarwinds.com/python-sdk/docs/models/incidentsgetincidentsstatusbyrequestidsresponse.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    | \*/\*            |
