Webhook
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
अलग-अलग तरह के वेबहुक का मेटाडेटा. अगर आपने inlineCloudFunction
का इस्तेमाल किया है, तो आपका सोर्स कोड उसी नाम की डायरेक्ट्री में होना चाहिए जिसका नाम executeFunction
कुंजी की वैल्यू है. उदाहरण के लिए, executeFunction
कुंजी के लिए my_webhook
वैल्यू का कोड स्ट्रक्चर इस तरह का होगा: - /webhooks/my_webhook.yaml
- /webhooks/my_webhook/index.js
- /webhooks/my_webhook/package.json
YAML प्रतिनिधि |
handlers:
- object (Handler )
# Union field webhook_type can be only one of the following:
httpsEndpoint:
object (HttpsEndpoint )
inlineCloudFunction:
object (InlineCloudFunction )
# End of list of possible types for union field webhook_type . |
फ़ील्ड |
handlers[] |
object (Handler )
इस वेबहुक के लिए हैंडलर की सूची.
|
यूनियन फ़ील्ड webhook_type . सिर्फ़ एक वेबहुक टाइप का इस्तेमाल किया जा सकता है. webhook_type इनमें से सिर्फ़ एक हो सकता है: |
httpsEndpoint |
object (HttpsEndpoint )
कस्टम वेबहुक एचटीटीपीएस एंडपॉइंट.
|
inlineCloudFunction |
object (InlineCloudFunction )
वेबहुक फ़ोल्डर में मौजूद कोड से डिप्लॉय किए गए क्लाउड फ़ंक्शन का मेटाडेटा.
|
हैंडलर
वेबहुक हैंडलर का नाम बताता है. वेबहुक में एक से ज़्यादा हैंडलर रजिस्टर हो सकते हैं. आपके Actions प्रोजेक्ट में इन हैंडलर को कई जगहों से कॉल किया जा सकता है.
YAML प्रतिनिधि |
name: string |
फ़ील्ड |
name |
string
ज़रूरी है. हैंडलर का नाम. यह Actions प्रोजेक्ट के सभी हैंडलर के लिए अलग होना चाहिए. अपने फ़ुलफ़िलमेंट सोर्स कोड में सही फ़ंक्शन शुरू करने के लिए, इस हैंडलर का नाम देखें.
|
HttpsEndpoint
अगर इनलाइन एडिटर का इस्तेमाल नहीं किया जा रहा है, तो सूचना देने के लिए REST एंडपॉइंट.
YAML प्रतिनिधि |
baseUrl: string
httpHeaders:
string: string
endpointApiVersion: integer |
फ़ील्ड |
baseUrl |
string
आपके फ़ुलफ़िलमेंट एंडपॉइंट के लिए एचटीटीपीएस बेस यूआरएल (एचटीटीपी काम नहीं करता). हैंडलर के नाम, कोलन के बाद बेस यूआरएल पाथ में जोड़े जाते हैं. इसके लिए, https://cloud.google.com/apis/design/custom_methods) में दी गई स्टाइल गाइड का पालन करें. उदाहरण के लिए, 'https://gaction.service.com/api' का बेस यूआरएल यूआरएल 'https://gaction.service.com/api:{method}' वाले अनुरोध मिलेंगे.
|
endpointApiVersion |
integer
एंडपॉइंट के लिए इस्तेमाल किए जाने वाले प्रोटोकॉल का वर्शन. यह प्रोटोकॉल, वाहन बेचने के सभी तरह के तरीकों के लिए इस्तेमाल किया जा सकता है. यह खास तौर पर, Google पूरा करने के तरीके के लिए नहीं है.
|
InlineCloudFunction
वेबहुक फ़ोल्डर से डिप्लॉय किए गए इनलाइन क्लाउड फ़ंक्शन के मेटाडेटा को होल्ड करता है.
YAML प्रतिनिधि |
executeFunction: string |
फ़ील्ड |
executeFunction |
string
Cloud Function के एंट्री पॉइंट का नाम. इस फ़ील्ड की वैल्यू, सोर्स कोड से एक्सपोर्ट किए गए तरीके के नाम से मेल खानी चाहिए.
|
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-07-26 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-07-26 (UTC) को अपडेट किया गया."],[[["\u003cp\u003eWebhooks use YAML to define metadata for different handler types like HTTPS endpoints and inline Cloud Functions.\u003c/p\u003e\n"],["\u003cp\u003eInline Cloud Functions require source code in a directory matching the \u003ccode\u003eexecuteFunction\u003c/code\u003e value.\u003c/p\u003e\n"],["\u003cp\u003eHandlers specify the webhook's name and can be invoked from various points in your Actions project.\u003c/p\u003e\n"],["\u003cp\u003eHTTPS endpoints define the base URL and optional HTTP headers for external fulfillment.\u003c/p\u003e\n"],["\u003cp\u003eInline Cloud Functions use the \u003ccode\u003eexecuteFunction\u003c/code\u003e field to identify the entry point in your source code.\u003c/p\u003e\n"]]],[],null,["# Webhook\n\n- [YAML representation](#SCHEMA_REPRESENTATION)\n- [Handler](#Handler)\n - [YAML representation](#Handler.SCHEMA_REPRESENTATION)\n- [HttpsEndpoint](#HttpsEndpoint)\n - [YAML representation](#HttpsEndpoint.SCHEMA_REPRESENTATION)\n- [InlineCloudFunction](#InlineCloudFunction)\n - [YAML representation](#InlineCloudFunction.SCHEMA_REPRESENTATION)\n\nMetadata for different types of webhooks. If you're using `inlineCloudFunction`, your source code must be in a directory with the same name as the value for the `executeFunction` key. For example, a value of `my_webhook` for the`executeFunction` key would have a code structure like this: - `/webhooks/my_webhook.yaml` - `/webhooks/my_webhook/index.js` - `/webhooks/my_webhook/package.json`\n\n| YAML representation ||\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| ``` handlers: - object (/assistant/actionssdk/reference/rest/Shared.Types/Webhook#Handler) # Union field `webhook_type` can be only one of the following: httpsEndpoint: object (/assistant/actionssdk/reference/rest/Shared.Types/Webhook#HttpsEndpoint) inlineCloudFunction: object (/assistant/actionssdk/reference/rest/Shared.Types/Webhook#InlineCloudFunction) # End of list of possible types for union field `webhook_type`. ``` |\n\n| Fields ||\n|-----------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| `handlers[]` | `object (`[Handler](/assistant/actionssdk/reference/rest/Shared.Types/Webhook#Handler)`)` List of handlers for this webhook. |\n| Union field `webhook_type`. Only one webhook type is supported. `webhook_type` can be only one of the following: |||\n| `httpsEndpoint` | `object (`[HttpsEndpoint](/assistant/actionssdk/reference/rest/Shared.Types/Webhook#HttpsEndpoint)`)` Custom webhook HTTPS endpoint. |\n| `inlineCloudFunction` | `object (`[InlineCloudFunction](/assistant/actionssdk/reference/rest/Shared.Types/Webhook#InlineCloudFunction)`)` Metadata for cloud function deployed from code in the webhooks folder. |\n\nHandler\n-------\n\nDeclares the name of the webhoook handler. A webhook can have multiple handlers registered. These handlers can be called from multiple places in your Actions project.\n\n| YAML representation ||\n|----------------------|---|\n| ``` name: string ``` |\n\n| Fields ||\n|--------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `name` | `string` Required. Name of the handler. Must be unique across all handlers the Actions project. You can check the name of this handler to invoke the correct function in your fulfillment source code. |\n\nHttpsEndpoint\n-------------\n\nREST endpoint to notify if you're not using the inline editor.\n\n| YAML representation ||\n|---------------------------------------------------------------------------------|---|\n| ``` baseUrl: string httpHeaders: string: string endpointApiVersion: integer ``` |\n\n| Fields ||\n|----------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `baseUrl` | `string` The HTTPS base URL for your fulfillment endpoint (HTTP is not supported). Handler names are appended to the base URL path after a colon (following the style guide in \u003chttps://cloud.google.com/apis/design/custom_methods)\u003e. For example a base URL of 'https://gactions.service.com/api' would receive requests with URL 'https://gactions.service.com/api:{method}'. |\n| `httpHeaders` | `map (key: string, value: string)` Map of HTTP parameters to be included in the POST request. An object containing a list of `\"key\": value` pairs. Example: `{ \"name\": \"wrench\", \"mass\": \"1.3kg\", \"count\": \"3\" }`. |\n| `endpointApiVersion` | `integer` Version of the protocol used by the endpoint. This is the protocol shared by all fulfillment types and not specific to Google fulfillment type. |\n\nInlineCloudFunction\n-------------------\n\nHolds the metadata of an inline Cloud Function deployed from the webhooks folder.\n\n| YAML representation ||\n|---------------------------------|---|\n| ``` executeFunction: string ``` |\n\n| Fields ||\n|-------------------|-------------------------------------------------------------------------------------------------------------------------------------------------|\n| `executeFunction` | `string` The name of the Cloud Function entry point. The value of this field should match the name of the method exported from the source code. |"]]