Method: query.sources.list

Returns list of sources that user can use for query.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.

HTTP request

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

The URL uses gRPC Transcoding syntax.

Query parameters

Parameters
requestOptions

object (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

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

List sources response.

JSON representation
{
  "sources": [
    {
      object (QuerySource)
    }
  ],
  "nextPageToken": string
}
Fields
sources[]

object (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.

QuerySource

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

JSON representation
{
  "source": {
    object (Source)
  },
  "shortName": string,
  "displayName": string,
  "operators": [
    {
      object (QueryOperator)
    }
  ]
}
Fields
source

object (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 (QueryOperator)

List of all operators applicable for this source.

QueryOperator

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

JSON representation
{
  "operatorName": string,
  "lessThanOperatorName": string,
  "greaterThanOperatorName": string,
  "type": enum (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 (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