- [HTTP request](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.customModels/list#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.customModels/list#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.customModels/list#body.request_body)
- [Response body](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.customModels/list#body.response_body)
  - [JSON representation](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.customModels/list#body.ListCustomModelsResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.customModels/list#body.aspect)
- [IAM Permissions](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.customModels/list#body.aspect_1)
- [CustomTuningModel](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.customModels/list#CustomTuningModel)
  - [JSON representation](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.customModels/list#CustomTuningModel.SCHEMA_REPRESENTATION)
- [ModelState](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.customModels/list#ModelState)

Gets a list of all the custom models.

### HTTP request

Choose an endpoint:
global us   
`GET https://discoveryengine.googleapis.com/v1/{dataStore=projects/*/locations/*/collections/*/dataStores/*}/customModels`

<br />

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

### Path parameters

| Parameters ||
|---|---|
| `dataStore` | `string` Required. The resource name of the parent Data Store, such as `projects/*/locations/global/collections/default_collection/dataStores/default_data_store`. This field is used to identify the data store where to fetch the models from. |

### Request body

The request body must be empty.

### Response body

Response message for `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.customModels/list#google.cloud.discoveryengine.v1.SearchTuningService.ListCustomModels` method.

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

| JSON representation |
|---|
| ``` { "models": [ { object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.customModels/list#CustomTuningModel`) } ] } ``` |

| Fields ||
|---|---|
| `models[]` | ``object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.customModels/list#CustomTuningModel`)`` List of custom tuning models. |

### 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 `dataStore` resource:

- `discoveryengine.dataStores.listCustomModels`

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

## CustomTuningModel

Metadata that describes a custom tuned model.

| JSON representation |
|---|
| ``` { "name": string, "displayName": string, "modelVersion": string, "modelState": enum (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.customModels/list#ModelState`), "createTime": string, "trainingStartTime": string, "metrics": { string: number, ... }, "errorMessage": string } ``` |

| Fields ||
|---|---|
| `name` | `string` Required. The fully qualified resource name of the model. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}/customTuningModels/{custom_tuning_model}`. Model must be an alpha-numerical string with limit of 40 characters. |
| `displayName` | `string` The display name of the model. |
| `modelVersion` | `string (https://developers.google.com/discovery/v1/type-format format)` The version of the model. |
| `modelState` | ``enum (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.dataStores.customModels/list#ModelState`)`` The state that the model is in (e.g.`TRAINING` or `TRAINING_FAILED`). |
| `createTime (deprecated)` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` > [!WARNING] > This item is deprecated! Deprecated: Timestamp the Model was created at. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `trainingStartTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Timestamp the model training was initiated. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `metrics` | `map (key: string, value: number)` The metrics of the trained model. |
| `errorMessage` | `string` Currently this is only populated if the model state is `INPUT_VALIDATION_FAILED`. |

## ModelState

The state of the model.

| Enums ||
|---|---|
| `MODEL_STATE_UNSPECIFIED` | Default value. |
| `TRAINING_PAUSED` | The model is in a paused training state. |
| `TRAINING` | The model is currently training. |
| `TRAINING_COMPLETE` | The model has successfully completed training. |
| `READY_FOR_SERVING` | The model is ready for serving. |
| `TRAINING_FAILED` | The model training failed. |
| `NO_IMPROVEMENT` | The model training finished successfully but metrics did not improve. |
| `INPUT_VALIDATION_FAILED` | Input data validation failed. Model training didn't start. |