> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flashduty.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Export issues as CSV

> Export the filtered RUM error tracking issues as a CSV file. The response is a `text/csv` stream delivered with `Content-Disposition: attachment` — it is not a JSON envelope; non-console callers can read the `X-Export-Total` and `X-Export-Truncated` response headers.

## Restrictions

| Aspect      | Value                                                                             |
| ----------- | --------------------------------------------------------------------------------- |
| Rate limits | **200 requests/day**; **100 requests/minute**; **10 requests/second** per account |
| Permissions | None — any valid `app_key` can call this operation                                |

## Usage

* The response is a `text/csv` stream delivered with `Content-Disposition: attachment` — it is not wrapped in the standard envelope. The filename is `rum-issues-<timestamp>.csv`, stamped in the requested `time_zone`. Read `X-Export-Total` and `X-Export-Truncated` response headers instead of a body field.
* The export reads the first 100 matching rows (`ExportMaxRows`); `X-Export-Truncated` is `true` when more issues match. `p` and `limit` are ignored.
* The request filters are exactly those of `POST /rum/issue/list` — an export is "what I am looking at, as a file".
* `export_fields` names the CSV columns in the order they appear. Unknown keys are rejected with a parameter error; an empty array uses the default column set.
* `time_zone` must be a valid IANA zone name (e.g. `Asia/Shanghai`, `UTC`); timestamps are rendered in that zone and time columns carry the zone in their header. Invalid names are rejected.
* `console_origin` is used to build the `issue_url` column; the service cannot infer it (SaaS, on-premises and dev releases answer on different origins).
* Every call is recorded in the account's audit log with the caller's member ID, request payload, and resulting error (if any). Do not put secrets in request fields.


## OpenAPI

````yaml /api-reference/rum.openapi.en.json post /rum/issue/export
openapi: 3.1.0
info:
  title: Flashduty Open API
  description: >-
    Public HTTP API for the Flashduty incident management platform — incidents,
    notification templates, channels, schedules, monitors, RUM, and platform
    administration. Every operation is authenticated with an `app_key` query
    parameter issued from the Flashduty console under Account → APP Keys.
    Responses follow a uniform envelope: `{ request_id, data }` on success, `{
    request_id, error }` on failure.
  version: 1.0.0
servers:
  - url: https://api.flashcat.cloud
    description: Flashduty Open API
security:
  - AppKeyAuth: []
tags:
  - name: RUM/Applications
    description: Manage Real User Monitoring (RUM) applications.
  - name: RUM/Data query
    description: Run RUM analytics queries over event data.
  - name: RUM/Issues
    description: Query and manage RUM error tracking issues and preset severity rules.
  - name: RUM/Facets
    description: >-
      Query RUM facet fields and their value distributions for building
      analytics filters.
  - name: RUM/Sourcemaps
    description: >-
      Manage and query RUM sourcemap files for browser, Android, and iOS error
      symbolication.
  - name: RUM/Session replay
    description: Retrieve session replay metadata and recorded segments for RUM sessions.
  - name: RUM/Error ingestion rules
    description: >-
      Configure and inspect the rules that decide which RUM errors get ingested
      and stored for an application, including their edit history.
  - name: RUM/Issue preset severity rules
    description: >-
      Manage per-application rules that assign a severity to matching front-end
      errors, plus their evaluation order and change history.
  - name: RUM/Resources
    description: Query the RUM resource record and current usage for the account.
paths:
  /rum/issue/export:
    post:
      tags:
        - RUM/Issues
      summary: Export issues as CSV
      description: >-
        Export the filtered RUM error tracking issues as a CSV file. The
        response is a `text/csv` stream delivered with `Content-Disposition:
        attachment` — it is not a JSON envelope; non-console callers can read
        the `X-Export-Total` and `X-Export-Truncated` response headers.
      operationId: rum-issue-read-export
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RumIssueExportRequest'
            example:
              start_time: 1772611200000
              end_time: 1775961914595
              application_ids:
                - eWbr4xk3ZRnLabRa6unqwD
              statuses:
                - for_review
              orderby: updated_at
              export_fields:
                - issue_id
                - error_type
                - error_message
                - status
                - error_count
                - session_count
                - last_seen_at
              console_origin: https://console.flashcat.cloud
              time_zone: Asia/Shanghai
      responses:
        '200':
          description: Success. CSV attachment, not a JSON envelope.
          headers:
            X-Export-Total:
              description: Total number of issues matching the filters, before the row cap.
              schema:
                type: integer
                format: int64
            X-Export-Truncated:
              description: >-
                `true` when more issues matched than the 100-row cap and the
                file was truncated.
              schema:
                type: boolean
          content:
            text/csv:
              schema:
                type: string
                description: >-
                  CSV file content. The header row matches the exported columns
                  in order; values are sanitized against spreadsheet formula
                  injection.
              example: >-
                Issue ID,Error type,Error message,Status,Error count,Affected
                sessions,Last seen (Asia/Shanghai)

                NHEacQHi2DhXqobr9qPQz9,Error,Script
                error.,for_review,752,381,2026-04-12 10:43:59

                H8kZSmxiE7EgdyD4fCyyNa,Error,"API ERROR: We encountered an
                internal error | POST
                /api/access/logout",for_review,3,1,2026-04-03 12:41:24
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
components:
  schemas:
    RumIssueExportRequest:
      type: object
      required:
        - start_time
        - end_time
      description: Filters for exporting RUM error tracking issues to CSV.
      properties:
        start_time:
          type: integer
          format: int64
          description: Start of the time range, Unix epoch milliseconds.
        end_time:
          type: integer
          format: int64
          description: 'End of time range, millisecond timestamp. Maximum range: 183 days.'
        application_ids:
          type: array
          items:
            type: string
          description: Filter by application IDs. Get IDs via `POST /rum/application/list`.
        dql:
          type: string
          description: DQL query for advanced filtering. Cannot be used with `sql`.
        sql:
          type: string
          description: SQL-style query for advanced filtering. Cannot be used with `dql`.
        statuses:
          type: array
          items:
            type: string
            enum:
              - for_review
              - reviewed
              - ignored
              - resolved
          description: >-
            Filter by status; only the enum values are accepted — any other
            value is rejected with a parameter error.
        suspected_causes:
          type: array
          items:
            type: string
            enum:
              - api.failed_request
              - network.error
              - code.exception
              - code.invalid_object_access
              - code.invalid_argument
              - unknown
          description: Filter by suspected cause; see the enum for valid values.
        team_ids:
          type: array
          items:
            type: integer
            format: int64
          description: Filter by team IDs. Get team IDs via `POST /team/list`.
        p:
          type: integer
          description: >-
            Page number (1-based). Ignored by the export — the first 100
            matching rows are always read.
        limit:
          type: integer
          description: >-
            Page size (1–100). Ignored by the export — the row cap is fixed at
            100.
        orderby:
          type: string
          enum:
            - created_at
            - updated_at
            - session_count
            - error_count
            - severity
          description: Sort field; defaults to `updated_at` when omitted.
        asc:
          type: boolean
          description: Sort ascending when `true`; descending by default.
        error_required:
          type: boolean
          description: >-
            If `true`, only export issues with at least one associated error
            event.
        by_intersection:
          type: boolean
          description: >-
            When `true`, match by time-range overlap: export issues still active
            within the window (`last_seen_timestamp` >= `start_time`) even if
            created before it. Default `false` exports only issues created
            inside the window.
        export_fields:
          type: array
          items:
            type: string
            enum:
              - issue_id
              - issue_url
              - application_name
              - service
              - error_type
              - error_message
              - status
              - severity
              - is_crash
              - error_count
              - session_count
              - first_seen_at
              - first_seen_version
              - last_seen_at
              - last_seen_version
              - versions
              - suspected_cause
              - resolved_at
          description: >-
            CSV columns to export, in the order they appear. Unknown keys are
            rejected with a parameter error; an empty array uses the default
            column set.
        console_origin:
          type: string
          description: >-
            Console origin used to build the `issue_url` column, e.g.
            `https://console.flashcat.cloud`. The service cannot infer it (SaaS,
            on-premises and dev releases answer on different origins).
        time_zone:
          type: string
          description: >-
            IANA time zone used to render timestamps in the CSV, e.g.
            `Asia/Shanghai` or `UTC`. Default: `Asia/Shanghai`.
    ErrorResponse:
      type: object
      description: Response envelope for errors. `error` is required; `data` is absent.
      properties:
        request_id:
          type: string
          example: 01HK8XQE3Z7JM2NTFQ5YJ8P9R4
          description: >-
            Unique trace ID of this request; include it when reporting issues so
            logs can be located.
        error:
          $ref: '#/components/schemas/DutyError'
      required:
        - request_id
        - error
    DutyError:
      type: object
      description: >-
        Error payload inside the response envelope. Present only on non-2xx
        responses.
      properties:
        code:
          $ref: '#/components/schemas/ErrorCode'
        message:
          type: string
          description: >-
            Human-readable error message, localized by the caller's
            Accept-Language. May contain field names, IDs, or other context from
            the failing request.
          example: The specified parameter template_id is not valid.
      required:
        - code
        - message
    ErrorCode:
      type: string
      description: >-
        Flashduty error code enum. Every failed API response sets `error.code`
        to one of these stable wire strings. HTTP status is informational — the
        authoritative signal is the enum value.


        | Code | HTTP | Meaning |

        |---|---|---|

        | `OK` | 200 | Reserved — not returned on real errors. |

        | `InvalidParameter` | 400 | A required parameter is missing or failed
        validation. |

        | `BadRequest` | 400 | Generic 400 used when no more specific code fits.
        |

        | `InvalidContentType` | 400 | The `Content-Type` header is not
        `application/json`. |

        | `ResourceNotFound` | 400 | The referenced resource does not exist.
        Note: returned as HTTP 400, not 404 (historical choice). |

        | `NoLicense` | 400 | The feature is license-gated and no active license
        was found. |

        | `ReferenceExist` | 400 | Deletion blocked — other entities still
        reference this resource. |

        | `Unauthorized` | 401 | `app_key` is missing, invalid, or expired. |

        | `BalanceNotEnough` | 402 | Billing-gated operation with insufficient
        account balance. |

        | `AccessDenied` | 403 | Authenticated but lacking the permission
        required for this operation. |

        | `RouteNotFound` | 404 | The request URL path is not a known route. |

        | `MethodNotAllowed` | 405 | The HTTP method is not allowed on this
        otherwise-known path. |

        | `UndonedOrderExist` | 409 | An outstanding billing order blocks this
        new one. Wait and retry. |

        | `RequestLocked` | 423 | Operation temporarily locked due to repeated
        failures. |

        | `EntityTooLarge` | 413 | Request body exceeds the configured max size.
        |

        | `RequestTooFrequently` | 429 | Rate limit hit — API-global,
        per-account, or per-integration. |

        | `RequestVerifyRequired` | 428 | Second-factor verification required
        but not supplied. |

        | `DangerousOperation` | 428 | High-risk operation requires MFA
        verification. |

        | `InternalError` | 500 | Unhandled server-side error. Include
        `request_id` in the bug report. |

        | `ServiceUnavailable` | 503 | A backend dependency is unavailable. Try
        again later. |
      enum:
        - OK
        - InvalidParameter
        - BadRequest
        - InvalidContentType
        - ResourceNotFound
        - NoLicense
        - ReferenceExist
        - Unauthorized
        - BalanceNotEnough
        - AccessDenied
        - RouteNotFound
        - MethodNotAllowed
        - UndonedOrderExist
        - RequestLocked
        - EntityTooLarge
        - RequestTooFrequently
        - RequestVerifyRequired
        - DangerousOperation
        - InternalError
        - ServiceUnavailable
      x-enumDescriptions:
        OK: Reserved — not returned on real errors.
        InvalidParameter: A required parameter is missing or failed validation.
        BadRequest: Generic 400 used when no more specific code fits.
        InvalidContentType: The `Content-Type` header is not `application/json`.
        ResourceNotFound: >-
          The referenced resource does not exist. Note: returned as HTTP 400,
          not 404 (historical choice).
        NoLicense: The feature is license-gated and no active license was found.
        ReferenceExist: Deletion blocked — other entities still reference this resource.
        Unauthorized: '`app_key` is missing, invalid, or expired.'
        BalanceNotEnough: Billing-gated operation with insufficient account balance.
        AccessDenied: Authenticated but lacking the permission required for this operation.
        RouteNotFound: The request URL path is not a known route.
        MethodNotAllowed: The HTTP method is not allowed on this otherwise-known path.
        UndonedOrderExist: An outstanding billing order blocks this new one. Wait and retry.
        RequestLocked: Operation temporarily locked due to repeated failures.
        EntityTooLarge: Request body exceeds the configured max size.
        RequestTooFrequently: Rate limit hit — API-global, per-account, or per-integration.
        RequestVerifyRequired: Second-factor verification required but not supplied.
        DangerousOperation: High-risk operation requires MFA verification.
        InternalError: Unhandled server-side error. Include `request_id` in the bug report.
        ServiceUnavailable: A backend dependency is unavailable. Try again later.
      example: InvalidParameter
  responses:
    BadRequest:
      description: Invalid request — usually a missing or malformed parameter.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            missingParameter:
              value:
                request_id: 01HK8XQE3Z7JM2NTFQ5YJ8P9R4
                error:
                  code: InvalidParameter
                  message: The specified parameter is not valid.
    Unauthorized:
      description: Missing or invalid app_key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            missingAppKey:
              value:
                request_id: 01HK8XQE3Z7JM2NTFQ5YJ8P9R4
                error:
                  code: Unauthorized
                  message: You are unauthorized.
    TooManyRequests:
      description: >-
        Rate limit hit. Either the global API limit, a per-account limit, or a
        per-integration limit.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            rateLimited:
              value:
                request_id: 01HK8XQE3Z7JM2NTFQ5YJ8P9R4
                error:
                  code: RequestTooFrequently
                  message: Request too frequently.
    ServerError:
      description: Unexpected server-side error. Include the request_id when reporting.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            internal:
              value:
                request_id: 01HK8XQE3Z7JM2NTFQ5YJ8P9R4
                error:
                  code: InternalError
                  message: >-
                    We encountered an internal error, and it has been reported.
                    Please try again later.
  securitySchemes:
    AppKeyAuth:
      type: apiKey
      in: query
      name: app_key
      description: >-
        App key issued from the Flashduty console under Account → APP Keys.
        Required on every public API call. Keep it secret — it grants the same
        access as the owning account.

````