# Method: query.sources.list

- [HTTP request](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/query.sources/list#body.HTTP_TEMPLATE)
- [Query parameters](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/query.sources/list#body.QUERY_PARAMETERS)
- [Request body](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/query.sources/list#body.request_body)
- [Response body](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/query.sources/list#body.response_body)
  - [JSON representation](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/query.sources/list#body.ListQuerySourcesResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/query.sources/list#body.aspect)
- [QuerySource](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/query.sources/list#QuerySource)
  - [JSON representation](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/query.sources/list#QuerySource.SCHEMA_REPRESENTATION)
- [QueryOperator](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/query.sources/list#QueryOperator)
  - [JSON representation](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/query.sources/list#QueryOperator.SCHEMA_REPRESENTATION)
- [QueryOperator.Type](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/query.sources/list#QueryOperator.Type)
- [Try it!](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/query.sources/list#try-it)

Returns list of sources that user can use for Search and Suggest APIs.

**Note:** This API requires a standard end user account to execute. A service account can't perform query API requests directly; to use a service account to perform queries, set up [Google Workspace domain-wide delegation of authority](https://developers.google.com/workspace/cloud-search/docs/guides/delegation/).

### HTTP request

`GET https://cloudsearch.googleapis.com/v1/query/sources`

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

### Query parameters

| Parameters ||
|---|---|
| `requestOptions` | ``object (`https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/RequestOptions`)`` Request options, such as the search application and user timezone. |
| `pageToken` | `string` Number of sources to return in the response. |

### Request body

The request body must be empty.

### Response body

List sources response.

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

| JSON representation |
|---|
| ``` { "sources": [ { object (`https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/query.sources/list#QuerySource`) } ], "nextPageToken": string } ``` |

| Fields ||
|---|---|
| `sources[]` | ``object (`https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/query.sources/list#QuerySource`)`` |
| `nextPageToken` | `string` |

### Authorization scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/cloud_search.query`
- `https://www.googleapis.com/auth/cloud_search`

For more information, see the [Authorization guide](https://developers.google.com/workspace/guides/configure-oauth-consent).

## QuerySource

List of sources that the user can search using the query API.

| JSON representation |
|---|
| ``` { "source": { object (`https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#Source`) }, "shortName": string, "displayName": string, "operators": [ { object (`https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/query.sources/list#QueryOperator`) } ] } ``` |

| Fields ||
|---|---|
| `source` | ``object (`https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#Source`)`` The name of the source |
| `shortName` | `string` A short name or alias for the source. This value can be used with the 'source' operator. |
| `displayName` | `string` Display name of the data source. |
| `operators[]` | ``object (`https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/query.sources/list#QueryOperator`)`` List of all operators applicable for this source. |

## QueryOperator

The definition of a operator that can be used in a Search/query.suggest request.

| JSON representation |
|---|
| ``` { "operatorName": string, "lessThanOperatorName": string, "greaterThanOperatorName": string, "type": enum (`https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/query.sources/list#QueryOperator.Type`), "displayName": string, "isSortable": boolean, "isFacetable": boolean, "isReturnable": boolean, "isRepeatable": boolean, "isSuggestable": boolean, "enumValues": [ string ], "objectType": string } ``` |

| Fields ||
|---|---|
| `operatorName` | `string` The name of the operator. |
| `lessThanOperatorName` | `string` Indicates the operator name that can be used to isolate the property using the less-than operator. |
| `greaterThanOperatorName` | `string` Indicates the operator name that can be used to isolate the property using the greater-than operator. |
| `type` | ``enum (`https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/query.sources/list#QueryOperator.Type`)`` The type of the operator. |
| `displayName` | `string` Display name of the operator |
| `isSortable` | `boolean` Can this operator be used to sort results. |
| `isFacetable` | `boolean` Can this operator be used to get facets. |
| `isReturnable` | `boolean` Will the property associated with this facet be returned as part of search results. |
| `isRepeatable` | `boolean` Indicates if multiple values can be set for this property. |
| `isSuggestable` | `boolean` Can get suggestions for this field. |
| `enumValues[]` | `string` Potential list of values for the opeatror field. This field is only filled when we can safely enumerate all the possible values of this operator. |
| `objectType` | `string` The name of the object corresponding to the operator. This field is only filled for schema-specific operators, and is unset for common operators. |

## QueryOperator.Type

The type of the property referred by the operator.

| Enums ||
|---|---|
| `UNKNOWN` | Invalid value. |
| `INTEGER` |   |
| `DOUBLE` |   |
| `TIMESTAMP` |   |
| `BOOLEAN` |   |
| `ENUM` |   |
| `DATE` |   |
| `TEXT` |   |
| `HTML` |   |