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

# Incidents.Export

## Overview

### Available Operations

* [export\_async](#export_async) - Incident Export Async

## export\_async

* This is an async API, once the request is made the export will start in our workers. You will get a download link to your registered Email ID once the export is completed

### Payload

| Key         | Value              | Example                    |
| ----------- | ------------------ | -------------------------- |
| type        | csv / json         | “csv”                      |
| start\_time | Date in ISO Format | “2020-01-01T00:00:00.000Z” |
| end\_time   | Date in ISO Format | “2020-04-01T00:00:00.000Z” |
| owner\_id   | Team ID            | “611262a9d5b4ea846b534a3f” |

### Incident Filters

| Key          | Value                                                     | Example                            |
| ------------ | --------------------------------------------------------- | ---------------------------------- |
| statuses     | Array of triggered / resolved / acknowledged / suppressed | \[“triggered”, “acknowleged”]      |
| tags         | Array of tags in format “KEY=VALUE”                       | \[“severity=high”, “severity=low”] |
| sources      | Array of Alert Source IDs                                 | \[“6077f7225fdc7075e371685f”]      |
| services     | Array of Service IDs                                      | \["62385fb309bc474014180828"]      |
| assigned\_to | Array of Assigned to user IDs                             | \["625e40c9a9bd76370bf9f7fb"]      |

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

    res = squadcast_sdk.incidents.export.export_async(owner_id="<id>", type_="csv", start_time=parse_datetime("2024-12-29T12:56:54.559Z"), end_time=parse_datetime("2025-08-25T17:31:33.747Z"), incident_filters={
        "services": [],
        "sources": [],
        "service_owner": {
            "user_i_ds": [
                "<value 1>",
            ],
            "squad_i_ds": [
                "<value 1>",
                "<value 2>",
                "<value 3>",
            ],
        },
        "assigned_to": [
            "<value 1>",
            "<value 2>",
            "<value 3>",
        ],
        "assigned_to_user_i_ds_and_their_squads": [
            "<value 1>",
            "<value 2>",
        ],
        "statuses": [
            "<value 1>",
            "<value 2>",
            "<value 3>",
        ],
        "priority": [
            "P5",
        ],
        "tags": [],
        "notes": "<value>",
    })

    # Handle response
    print(res)

```

### Parameters

| Parameter          | Type                                                                                                                                                    | Required             | Description                                                         |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------- | ------------------------------------------------------------------- |
| `owner_id`         | *str*                                                                                                                                                   | :heavy\_check\_mark: | N/A                                                                 |
| `type`             | [models.V3IncidentsExportFormat](https://developers.incidents.cloud.solarwinds.com/python-sdk/docs/models/v3incidentsexportformat.md)                   | :heavy\_check\_mark: | Type of export, can be csv or json                                  |
| `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                                                                 |
| `incident_filters` | [models.V3IncidentsExportIncidentsFilter](https://developers.incidents.cloud.solarwinds.com/python-sdk/docs/models/v3incidentsexportincidentsfilter.md) | :heavy\_check\_mark: | Filter criteria for incidents in an export.                         |
| `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    | \*/\*            |
