---
title: "Export as CSV"
url: "https://nov18-dev.movespot.fyi/apis/konnect-analytics-reports-dev-2/versions/370301af-a74b-40da-a34b-13e279afe451/operations/export-csv"
---

> Full API specification: https://nov18-dev.movespot.fyi/apis/konnect-analytics-reports-dev-2/versions/370301af-a74b-40da-a34b-13e279afe451.md

# Export as CSV

`POST` `/reports/{reportId}/export`

Operation ID: `export-csv`

Exports report data in CSV format.

## Path parameters

- `reportId` (string, uuid, required) - The ID of the report to export

## Query parameters

- `tz` (string, optional) - The timezone to use for the report. This impacts several things: - The timestamps returned, if time is a dimension. - Day boundaries for reports, meaning that if the report implicitly has a granularity of DAILY or higher, the same query may return different data depending on the timezone selected.
- `utc_format` (boolean, optional) - If true, export timestamps in "programmer friendly" format (ISO-8601, UTC timezone). If false, export in "spreadsheet friendly" format (local time without timezone specifier). Note: this does NOT impact the timezone of the report, merely the format of the time column if one is present.

## Responses

- `200` - Report exported successfully
- `400` - Bad Request
- `403` - Permission denied
- `404` - Not Found
- `429` - Too many requests

## OpenAPI definition

```yaml
openapi: 3.0.2
info:
  title: Konnect Analytics Reports
  version: 2.0.0
servers:
  - url: https://us.api.konghq.com/v2
    description: United-States Production region
  - url: https://eu.api.konghq.com/v2
    description: Europe Production region
  - url: https://au.api.konghq.com/v2
    description: Australia Production region
  - url: https://me.api.konghq.com/v2
    description: Middle-East Production region
  - url: https://in.api.konghq.com/v2
    description: India Production region
  - url: https://sg.api.konghq.com/v2
    description: Singapore Production region
paths:
  /reports/{reportId}/export:
    parameters:
      - name: reportId
        in: path
        description: The ID of the report to export
        required: true
        schema:
          type: string
          format: uuid
          example: d32d905a-ed33-46a3-a093-d8f536af9a8a
      - name: tz
        in: query
        description: >
          The timezone to use for the report.  This impacts several things:


          - The timestamps returned, if time is a dimension.

          - Day boundaries for reports, meaning that if the report implicitly
          has a granularity of DAILY or higher, the same query may return
          different data depending on the timezone selected.
        schema:
          type: string
          example: Etc/UTC
      - name: utc_format
        in: query
        description: >
          If true, export timestamps in "programmer friendly" format (ISO-8601,
          UTC timezone).

          If false, export in "spreadsheet friendly" format (local time without
          timezone specifier).


          Note: this does NOT impact the timezone of the report, merely the
          format of the time column if one is present.
        schema:
          type: boolean
    post:
      operationId: export-csv
      summary: Export as CSV
      description: Exports report data in CSV format.
      responses:
        "200":
          description: Report exported successfully
          content:
            text/csv:
              schema:
                type: string
              examples:
                timeseries:
                  value: |
                    TIMESTAMP,UTC_OFFSET,API_PRODUCT,TOTAL_REQUESTS
                    2023-01-01 00:00:00,-04:00,ProductA,2497079
                    2023-01-01 00:00:00,-04:00,ProductB,2029907
                non-timeseries:
                  value: |
                    API_PRODUCT,TOTAL_REQUESTS
                    ProductA,21007
                    ProductB,16233
        "400":
          $ref: "#/components/responses/BadRequest"
        "403":
          $ref: "#/components/responses/PermissionDenied"
        "404":
          $ref: "#/components/responses/NotFound"
        "429":
          $ref: "#/components/responses/TooManyRequests"
      tags:
        - Custom Reports
components:
  responses:
    BadRequest:
      description: Bad Request
      content:
        application/problem+json:
          schema:
            description: The error object
            type: object
            properties:
              type:
                description: Documentation for this error.
                type: string
              status:
                description: The HTTP response code
                type: integer
                example: 400
              title:
                description: The Error response
                type: string
                example: Bad Request
              instance:
                description: The Konnect traceback ID.
                type: string
                example: konnect:trace:3674017986744198214
              invalid_parameters:
                description: An array of objects that contains information related to the error
                  response.
                type: array
                items:
                  type: object
                  properties:
                    field:
                      type: string
                    reason:
                      type: string
                    rule:
                      type: string
    PermissionDenied:
      description: Permission denied
      content:
        application/problem+json:
          schema:
            description: The error object.
            type: object
            properties:
              type:
                description: Documentation for this error.
                type: string
              status:
                description: HTTP status code.
                type: integer
                example: 403
              title:
                description: HTTP status code
                type: string
                example: Bad Request
              instance:
                description: Konnect traceback error code.
                type: string
                example: konnect:trace:3674017986744198214
              detail:
                description: Information about the error response.
                type: string
                example: Only org admins or analytics admins can create reports.
            example:
              status: 403
              type: https://kongapi.info/konnect/permission-denied
              title: Permission denied
              instance: konnect:trace:2822394689570210664
              detail: You do not have sufficient permissions to perform this action.
    NotFound:
      description: Not Found
      content:
        application/problem+json:
          schema:
            description: The error response object.
            type: object
            properties:
              type:
                description: Documentation for this error.
                type: string
              status:
                description: The HTTP status code.
                type: integer
                example: 404
              title:
                description: The error response code.
                type: string
                example: Not Found
              instance:
                description: The Konnect traceback code
                type: string
                example: konnect:trace:2287285207635123011
              detail:
                description: Details about the error.
                type: string
                example: The requested report was not found
            example:
              Example 1:
                status: 404
                title: Not Found
                instance: konnect:trace:2287285207635123011
                detail: The requested report was not found
    TooManyRequests:
      description: Too many requests
      content:
        application/problem+json:
          schema:
            description: The error response object.
            type: object
            properties:
              type:
                description: Documentation for this error.
                type: string
              status:
                description: The HTTP status code.
                type: integer
                example: 429
              title:
                description: The error response code.
                type: string
                example: Too Many Requests
              instance:
                description: The Konnect traceback code
                type: string
                example: konnect:trace:2287285207635123011
              detail:
                description: Details about the error.
                type: string
                example: You have exceeded your rate limit for this time period.  Please wait
                  and try again.
            example:
              status: 429
              type: https://kongapi.info/konnect/too-many-requests
              title: Too Many Requests
              instance: konnect:trace:2287285207635123011
              detail: You have exceeded your rate limit for this time period.  Please wait and
                try again.
```
