---
title: "POST /v1/{+name}:export"
method: POST
path: "/v1/{+name}:export"
tags: ["projects"]
---

# POST /v1/{+name}:export

`POST /v1/{+name}:export`

Exports data from the cluster. Imperative only.

## Path parameters

- `name` string, required

## Request body

- ExportClusterRequest — Export cluster request.
  - `sqlExportOptions` SqlExportOptions — Options for exporting data in SQL format.
    - `cleanTargetObjects` boolean — Optional. If true, output commands to DROP all the dumped database objects prior to outputting the commands for creating them.
    - `tables` string[] — Optional. Tables to export from.
    - `ifExistTargetObjects` boolean — Optional. If true, use DROP ... IF EXISTS commands to check for the object's existence before dropping it in clean_target_objects mode.
    - `schemaOnly` boolean — Optional. If true, only export the schema.
  - `database` string — Required. Name of the database where the export command will be executed. Note - Value provided should be the same as expected from `SELECT current_database();` and NOT as a resource reference.
  - `gcsDestination` GcsDestination — Destination for Export. Export will be done to cloud storage.
    - `uri` string — Required. The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form `gs://bucketName/fileName`.
  - `csvExportOptions` CsvExportOptions — Options for exporting data in CSV format.
    - `selectQuery` string — Required. The SELECT query used to extract the data.
    - `quoteCharacter` string — Optional. Specifies the quoting character to be used when a data value is quoted. The default is double-quote. The value of this argument has to be a character in Hex ASCII Code.
    - `fieldDelimiter` string — Optional. Specifies the character that separates columns within each row (line) of the file. The default is comma. The value of this argument has to be a character in Hex ASCII Code.
    - `escapeCharacter` string — Optional. Specifies the character that should appear before a data character that needs to be escaped. The default is the same as quote character. The value of this argument has to be a character in Hex ASCII Code.

## Response `200`

Successful response

---

[API](https://skmtc.net/google/apis/alloydb.md) · [All operations](https://skmtc.net/google/apis/alloydb/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/google/alloydb/versions/cdbec2e3108c/schema)
