Method: query.sources.list
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
उन सोर्स की सूची दिखाता है जिनका इस्तेमाल उपयोगकर्ता, Search और Suggest API के लिए कर सकता है.
ध्यान दें: इस एपीआई को चलाने के लिए, स्टैंडर्ड असली उपयोगकर्ता खाते की ज़रूरत होती है. सेवा खाता, सीधे तौर पर क्वेरी एपीआई के अनुरोधों को पूरा नहीं कर सकता. क्वेरी करने के लिए, सेवा खाते का इस्तेमाल करने के लिए, Google Workspace के डोमेन के लिए, अधिकार देने की सुविधा सेट अप करें.
एचटीटीपी अनुरोध
GET https://cloudsearch.googleapis.com/v1/query/sources
यूआरएल में gRPC ट्रांसकोडिंग सिंटैक्स का इस्तेमाल किया गया है.
क्वेरी पैरामीटर
पैरामीटर |
requestOptions |
object (RequestOptions )
अनुरोध के विकल्प, जैसे कि खोज ऐप्लिकेशन और उपयोगकर्ता का टाइमज़ोन.
|
pageToken |
string
जवाब में दिखाए जाने वाले सोर्स की संख्या.
|
अनुरोध का मुख्य भाग
अनुरोध का मुख्य हिस्सा खाली होना चाहिए.
जवाब का मुख्य भाग
सोर्स की सूची और उसके नतीजे.
अगर एपीआई सही से जुड़ जाता है, ताे जवाब के मुख्य भाग में नीचे दिए गए स्ट्रक्चर शामिल होता है.
JSON के काेड में दिखाना |
{
"sources": [
{
object (QuerySource )
}
],
"nextPageToken": string
} |
फ़ील्ड |
sources[] |
object (QuerySource )
|
nextPageToken |
string
|
अनुमति के दायरे
इसके लिए, OAuth के इनमें से किसी एक स्कोप की ज़रूरत होती है:
https://www.googleapis.com/auth/cloud_search.query
https://www.googleapis.com/auth/cloud_search
ज़्यादा जानकारी के लिए, अनुमति से जुड़ी गाइड देखें.
QuerySource
उन सोर्स की सूची जिन्हें उपयोगकर्ता, क्वेरी एपीआई का इस्तेमाल करके खोज सकता है.
JSON के काेड में दिखाना |
{
"source": {
object (Source )
},
"shortName": string,
"displayName": string,
"operators": [
{
object (QueryOperator )
}
]
} |
फ़ील्ड |
source |
object (Source )
सोर्स का नाम
|
shortName |
string
सोर्स का छोटा नाम या कोई दूसरा नाम. इस वैल्यू का इस्तेमाल, 'सोर्स' ऑपरेटर के साथ किया जा सकता है.
|
displayName |
string
डेटा सोर्स का डिसप्ले नेम.
|
operators[] |
object (QueryOperator )
इस सोर्स के लिए लागू सभी ऑपरेटर की सूची.
|
QueryOperator
किसी ऐसे ऑपरेटर की परिभाषा जिसका इस्तेमाल Search/query.suggest अनुरोध में किया जा सकता है.
JSON के काेड में दिखाना |
{
"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
} |
फ़ील्ड |
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
ऑपरेटर से जुड़े ऑब्जेक्ट का नाम. यह फ़ील्ड सिर्फ़ स्कीमा के हिसाब से ऑपरेटर के लिए भरा जाता है. सामान्य ऑपरेटर के लिए, इसे अनसेट किया जाता है.
|
QueryOperator.Type
ऑपरेटर की ओर से रेफ़र की गई प्रॉपर्टी का टाइप.
Enums |
UNKNOWN |
अमान्य मान. |
INTEGER |
|
DOUBLE |
|
TIMESTAMP |
|
BOOLEAN |
|
ENUM |
|
DATE |
|
TEXT |
|
HTML |
|
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-07-25 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-07-25 (UTC) को अपडेट किया गया."],[],[],null,["# Method: query.sources.list\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n - [JSON representation](#body.ListQuerySourcesResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [QuerySource](#QuerySource)\n - [JSON representation](#QuerySource.SCHEMA_REPRESENTATION)\n- [QueryOperator](#QueryOperator)\n - [JSON representation](#QueryOperator.SCHEMA_REPRESENTATION)\n- [QueryOperator.Type](#QueryOperator.Type)\n- [Try it!](#try-it)\n\nReturns list of sources that user can use for Search and Suggest APIs.\n\n**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/).\n\n### HTTP request\n\n`GET https://cloudsearch.googleapis.com/v1/query/sources`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Query parameters\n\n| Parameters ||\n|------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `requestOptions` | `object (`[RequestOptions](/workspace/cloud-search/docs/reference/rest/v1/RequestOptions)`)` Request options, such as the search application and user timezone. |\n| `pageToken` | `string` Number of sources to return in the response. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nList sources response.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"sources\": [ { object (/workspace/cloud-search/docs/reference/rest/v1/query.sources/list#QuerySource) } ], \"nextPageToken\": string } ``` |\n\n| Fields ||\n|-----------------|-----------------------------------------------------------------------------------------------------------|\n| `sources[]` | `object (`[QuerySource](/workspace/cloud-search/docs/reference/rest/v1/query.sources/list#QuerySource)`)` |\n| `nextPageToken` | `string` |\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/cloud_search.query`\n- `https://www.googleapis.com/auth/cloud_search`\n\nFor more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent).\n\nQuerySource\n-----------\n\nList of sources that the user can search using the query API.\n\n| JSON representation |\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"source\": { object (/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#Source) }, \"shortName\": string, \"displayName\": string, \"operators\": [ { object (/workspace/cloud-search/docs/reference/rest/v1/query.sources/list#QueryOperator) } ] } ``` |\n\n| Fields ||\n|---------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `source` | `object (`[Source](/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#Source)`)` The name of the source |\n| `shortName` | `string` A short name or alias for the source. This value can be used with the 'source' operator. |\n| `displayName` | `string` Display name of the data source. |\n| `operators[]` | `object (`[QueryOperator](/workspace/cloud-search/docs/reference/rest/v1/query.sources/list#QueryOperator)`)` List of all operators applicable for this source. |\n\nQueryOperator\n-------------\n\nThe definition of a operator that can be used in a Search/query.suggest request.\n\n| JSON representation |\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"operatorName\": string, \"lessThanOperatorName\": string, \"greaterThanOperatorName\": string, \"type\": enum (/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 } ``` |\n\n| Fields ||\n|---------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `operatorName` | `string` The name of the operator. |\n| `lessThanOperatorName` | `string` Indicates the operator name that can be used to isolate the property using the less-than operator. |\n| `greaterThanOperatorName` | `string` Indicates the operator name that can be used to isolate the property using the greater-than operator. |\n| `type` | `enum (`[QueryOperator.Type](/workspace/cloud-search/docs/reference/rest/v1/query.sources/list#QueryOperator.Type)`)` The type of the operator. |\n| `displayName` | `string` Display name of the operator |\n| `isSortable` | `boolean` Can this operator be used to sort results. |\n| `isFacetable` | `boolean` Can this operator be used to get facets. |\n| `isReturnable` | `boolean` Will the property associated with this facet be returned as part of search results. |\n| `isRepeatable` | `boolean` Indicates if multiple values can be set for this property. |\n| `isSuggestable` | `boolean` Can get suggestions for this field. |\n| `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. |\n| `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. |\n\nQueryOperator.Type\n------------------\n\nThe type of the property referred by the operator.\n\n| Enums ||\n|-------------|----------------|\n| `UNKNOWN` | Invalid value. |\n| `INTEGER` | |\n| `DOUBLE` | |\n| `TIMESTAMP` | |\n| `BOOLEAN` | |\n| `ENUM` | |\n| `DATE` | |\n| `TEXT` | |\n| `HTML` | |"]]