> 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](/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](/python-sdk/docs/models/v3incidentsexportincidentsfilter.md) | :heavy\_check\_mark: | Filter criteria for incidents in an export.                         |
| `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    | \*/\*            |


---

# 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/incidentsexport.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.
