Method: projects.preview.write
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
मॉडल के आधार पर, उपयोगकर्ता के प्रोजेक्ट की झलक अपडेट करता है.
एचटीटीपी अनुरोध
POST https://actions.googleapis.com/v2/{parent=projects/*}/preview:write
यह यूआरएल gRPC ट्रांसकोडिंग सिंटैक्स का इस्तेमाल करता है.
पाथ पैरामीटर
पैरामीटर |
parent |
string
ज़रूरी है. projects/{project} फ़ॉर्मैट में पैरंट संसाधन का नाम. {project} , प्रोजेक्ट से जुड़ा क्लाउड प्रोजेक्ट आईडी है.
|
अनुरोध का मुख्य भाग
अनुरोध के मुख्य हिस्से में, यहां दिए गए स्ट्रक्चर का डेटा शामिल होता है:
JSON के काेड में दिखाना |
{
"previewSettings": {
object (PreviewSettings )
},
// Union field source can be only one of the following:
"files": {
object (Files )
},
"draft": {
object (ContentFromDraft )
},
"submittedVersion": {
object (ContentFromSubmittedVersion )
}
// End of list of possible types for union field source .
} |
फ़ील्ड |
previewSettings |
object (PreviewSettings )
ज़रूरी है. उपयोगकर्ता की झलक को अपडेट करने की सेटिंग.
|
यूनियन फ़ील्ड source . प्रीव्यू बनाने के लिए इस्तेमाल किया जाने वाला डेटा सोर्स. source इनमें से सिर्फ़ एक हो सकता है: |
files |
object (Files )
सर्वर को एक बार में भेजी गई फ़ाइलों की सूची. यह कॉन्फ़िगरेशन फ़ाइलों या डेटा फ़ाइलों की सूची है. 1. पहला अनुरोध ConfigFiles होना चाहिए. 2. पहले अनुरोध में, 'सेटिंग' वाली ConfigFile शामिल होनी चाहिए. 3. पहले अनुरोध में, 'मेनिफ़ेस्ट' वाली ConfigFile शामिल होनी चाहिए. 4. इनलाइन क्लाउड फ़ंक्शन से जुड़े वेबहुक ConfigFile को उसके सोर्स कोड से जुड़े DataFile से पहले स्ट्रीम किया जाना चाहिए.
|
draft |
object (ContentFromDraft )
कॉन्टेंट, प्रोजेक्ट के ड्राफ़्ट से लिया गया है.
|
submittedVersion |
object (ContentFromSubmittedVersion )
कॉन्टेंट, किसी मौजूदा वर्शन से लिया गया है.
|
जवाब का मुख्य भाग
अगर एपीआई सही से जुड़ जाता है, ताे जवाब के मुख्य भाग में नीचे दिए गए स्ट्रक्चर शामिल होता है.
झलक दिखाने वाले संसाधन की परिभाषा.
JSON के काेड में दिखाना |
{
"name": string,
"validationResults": {
object (ValidationResults )
},
"simulatorUrl": string
} |
फ़ील्ड |
name |
string
झलक का यूनीक आइडेंटिफ़ायर. फ़ॉर्मैट: projects/{project}/preview
|
validationResults |
object (ValidationResults )
उपयोगकर्ता के प्रोजेक्ट की झलक वाले कॉन्टेंट से जुड़े पुष्टि करने के नतीजे.
|
simulatorUrl |
string
उपयोगकर्ता झलक की जांच करने के लिए सिम्युलेटर यूआरएल.
|
ContentFromDraft
इससे पता चलता है कि झलक वाला कॉन्टेंट, ड्राफ़्ट से लिया जाएगा.
ContentFromSubmittedVersion
इससे पता चलता है कि झलक वाला कॉन्टेंट पुराने वर्शन से आएगा.
JSON के काेड में दिखाना |
{
"version": string
} |
फ़ील्ड |
version |
string
ज़रूरी है. प्रोजेक्ट का सबमिट किया गया वर्शन, जिसका इस्तेमाल झलक बनाने के लिए किया जाता है. फ़ॉर्मैट: projects/{project}/versions/{version}
|
PreviewSettings
झलक अपडेट करने के लिए सेटिंग.
JSON के काेड में दिखाना |
{
"sandbox": boolean
} |
फ़ील्ड |
sandbox |
boolean
यह बताता है कि सैंडबॉक्स मोड में लेन-देन जैसी कुछ खास कार्रवाइयां करनी हैं या नहीं. डिफ़ॉल्ट रूप से, झलक देखने के अनुरोध इन कार्रवाइयों को सैंडबॉक्स मोड में चलाते हैं. दूसरे शब्दों में, sandbox की डिफ़ॉल्ट वैल्यू true है.
|
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को 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\u003eUpdates a user's project preview using either draft content, an existing version, or uploaded files.\u003c/p\u003e\n"],["\u003cp\u003eRequires specifying the project ID and the preview settings, which include an optional sandbox mode.\u003c/p\u003e\n"],["\u003cp\u003eThe request body must indicate the source of the preview content (draft, version, or files).\u003c/p\u003e\n"],["\u003cp\u003eA successful response provides the preview's name, validation results, and a simulator URL for testing.\u003c/p\u003e\n"],["\u003cp\u003eThe API uses gRPC Transcoding and expects the content to follow specific JSON structures for requests and responses.\u003c/p\u003e\n"]]],[],null,["# Method: projects.preview.write\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n - [JSON representation](#body.Preview.SCHEMA_REPRESENTATION)\n- [ContentFromDraft](#ContentFromDraft)\n- [ContentFromSubmittedVersion](#ContentFromSubmittedVersion)\n - [JSON representation](#ContentFromSubmittedVersion.SCHEMA_REPRESENTATION)\n- [PreviewSettings](#PreviewSettings)\n - [JSON representation](#PreviewSettings.SCHEMA_REPRESENTATION)\n\nUpdates the user's project preview based on the model.\n\n### HTTP request\n\n`POST https://actions.googleapis.com/v2/{parent=projects/*}/preview:write`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|----------|------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `parent` | `string` Required. The parent resource name in the format `projects/{project}`. The `{project}` is the cloud project ID associated with the project. |\n\n### Request body\n\nThe request body contains data with the following structure:\n\n| JSON representation ||\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| ``` { \"previewSettings\": { object (/assistant/actions/api/reference/rest/v2/projects.preview/write#PreviewSettings) }, // Union field `source` can be only one of the following: \"files\": { object (/assistant/actions/api/reference/rest/v2/Files) }, \"draft\": { object (/assistant/actions/api/reference/rest/v2/projects.preview/write#ContentFromDraft) }, \"submittedVersion\": { object (/assistant/actions/api/reference/rest/v2/projects.preview/write#ContentFromSubmittedVersion) } // End of list of possible types for union field `source`. } ``` |\n\n| Fields ||\n|--------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| `previewSettings` | `object (`[PreviewSettings](/assistant/actions/api/reference/rest/v2/projects.preview/write#PreviewSettings)`)` Required. The settings for updating the user's preview. |\n| Union field `source`. Data source used to created the preview. `source` can be only one of the following: |||\n| `files` | `object (`[Files](/assistant/actions/api/reference/rest/v2/Files)`)` List of files sent to the server at a time. This is a list of config files or data files. 1. The first request must be a ConfigFiles. 2. The first request must have a ConfigFile with 'settings'. 3. The first request must have a ConfigFile with 'manifest'. 4. The webhook ConfigFile corresponding to inline cloud function must be streamed before the DataFile corresponding to its source code. |\n| `draft` | `object (`[ContentFromDraft](/assistant/actions/api/reference/rest/v2/projects.preview/write#ContentFromDraft)`)` Content sourced from the project draft. |\n| `submittedVersion` | `object (`[ContentFromSubmittedVersion](/assistant/actions/api/reference/rest/v2/projects.preview/write#ContentFromSubmittedVersion)`)` Content sourced from the an exiting version. |\n\n### Response body\n\nIf successful, the response body contains data with the following structure:\nDefinition of preview resource.\n\n| JSON representation ||\n|--------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| ``` { \"name\": string, \"validationResults\": { object (/assistant/actions/api/reference/rest/v2/ValidationResults) }, \"simulatorUrl\": string } ``` |\n\n| Fields ||\n|---------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `name` | `string` The unique identifier of the preview. Format: `projects/{project}/preview` |\n| `validationResults` | `object (`[ValidationResults](/assistant/actions/api/reference/rest/v2/ValidationResults)`)` Validation results associated with the user project preview content. |\n| `simulatorUrl` | `string` The simulator URL to test the user preview. |\n\nContentFromDraft\n----------------\n\nIndicates the preview content will be coming from the Draft.\n\nContentFromSubmittedVersion\n---------------------------\n\nIndicates the preview content will be coming from an exiting version.\n\n| JSON representation ||\n|-------------------------------|---|\n| ``` { \"version\": string } ``` |\n\n| Fields ||\n|-----------|-------------------------------------------------------------------------------------------------------------------------------------|\n| `version` | `string` Required. Submitted version of the project to be used to create a preview. Format: `projects/{project}/versions/{version}` |\n\nPreviewSettings\n---------------\n\nSettings for updating the preview.\n\n| JSON representation ||\n|--------------------------------|---|\n| ``` { \"sandbox\": boolean } ``` |\n\n| Fields ||\n|-----------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `sandbox` | `boolean` Indicates whether or not to run certain operations, such as transactions, in sandbox mode. By default, preview requests run these operations in sandbox mode. In other words, the default value for `sandbox` is `true`. |"]]