- [HTTP request](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.userStores.userLicenses/export#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.userStores.userLicenses/export#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.userStores.userLicenses/export#body.request_body)
- [Response body](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.userStores.userLicenses/export#body.response_body)
  - [JSON representation](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.userStores.userLicenses/export#body.ExportUserLicensesResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.userStores.userLicenses/export#body.aspect)
- [IAM Permissions](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.userStores.userLicenses/export#body.aspect_1)

Exports all the `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/UserLicense`s under the parent `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.userStores#UserStore` as a single CSV document. This is the backend for the admin console "Download as CSV" action: it reuses the `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.userStores.userLicenses/list#google.cloud.discoveryengine.v1alpha.UserLicenseService.ListUserLicenses` read path so admins can sort/filter offline in Excel or Sheets.

The response carries the full CSV (header row followed by data rows) inline in `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.userStores.userLicenses/export#body.ExportUserLicensesResponse.FIELDS.csv_data`.

### HTTP request

Choose an endpoint:
global us   
`POST https://discoveryengine.googleapis.com/v1alpha/{parent=projects/*/locations/*/userStores/*}/userLicenses:export`

<br />

The URLs use [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `parent` | `string` Required. The parent `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.userStores#UserStore` resource name, format: `projects/{project}/locations/{location}/userStores/{userStoreId}`. All `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/UserLicense`s under this `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.userStores#UserStore` are exported. |

### Request body

The request body must be empty.

### Response body

Response message for `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/projects.locations.userStores.userLicenses/export#google.cloud.discoveryengine.v1alpha.UserLicenseService.ExportUserLicenses`.

If successful, the response body contains data with the following structure:

| JSON representation |
|---|
| ``` { // The following is a list of mutually exclusive fields. At most one of the // fields will be set in a response: "csvData": string // End of mutually exclusive fields. } ``` |

| Fields ||
|---|---|
| The exported result. M1 returns the CSV inline in `csv_data`; the oneof leaves room for a future large-export variant (e.g. a GCS URI) without breaking the contract. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `csvData` | `string (https://developers.google.com/discovery/v1/type-format format)` The full CSV document as raw bytes: the header row followed by one row per `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1alpha/UserLicense`. Contains user license data (e.g. user emails). An export with no matching licenses contains only the header row. A base64-encoded string. |
| End of mutually exclusive fields. ||

### Authorization scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/cloud-platform`
- `https://www.googleapis.com/auth/discoveryengine.readwrite`
- `https://www.googleapis.com/auth/discoveryengine.serving.readwrite`

For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication#authorization-gcp).

### IAM Permissions

Requires the following [IAM](https://cloud.google.com/iam/docs) permission on the `parent` resource:

- `discoveryengine.userStores.listUserLicenses`

For more information, see the [IAM documentation](https://cloud.google.com/iam/docs).