- HTTP request
- Query parameters
- Request body
- Response body
- Authorization Scopes
- QuerySource
- QueryOperator
- Type
- Try it!
Returns list of sources that user can use for query.search and query.suggest APIs.
Note: This API requires a standard end user account to execute.
HTTP request
GET https://cloudsearch.googleapis.com/v1/query/sources
The URL uses gRPC Transcoding syntax.
Query parameters
Parameters | |
---|---|
requestOptions |
Request options, such as the search application and user timezone. |
pageToken |
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 ( |
Fields | |
---|---|
sources[] |
|
nextPageToken |
|
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 ( |
Fields | |
---|---|
source |
Name of the source |
shortName |
A short name or alias for the source. This value can be used with the 'source' operator. |
displayName |
Display name of the data source. |
operators[] |
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 ( |
Fields | |
---|---|
operatorName |
The name of the operator. |
lessThanOperatorName |
Indicates the operator name that can be used to isolate the property using the less-than operator. |
greaterThanOperatorName |
Indicates the operator name that can be used to isolate the property using the greater-than operator. |
type |
Type of the operator. |
displayName |
Display name of the operator |
isSortable |
Can this operator be used to sort results. |
isFacetable |
Can this operator be used to get facets. |
isReturnable |
Will the property associated with this facet be returned as part of search results. |
isRepeatable |
Indicates if multiple values can be set for this property. |
isSuggestable |
Can get suggestions for this field. |
enumValues[] |
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 |