Method: query.sources.list

Returns list of sources that user can use for query.search and query.suggest APIs.

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 OAuth 2.0 Overview.

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)

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(Type),
  "displayName": string,
  "isSortable": boolean,
  "isFacetable": boolean,
  "isReturnable": boolean,
  "isRepeatable": boolean,
  "isSuggestable": boolean,
  "enumValues": [
    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(Type)

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.

Type

The type of the property referred by the operator.

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

Try it!

Send feedback about...

Cloud Search
Cloud Search