Method: projects.preview.write
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
মডেলের উপর ভিত্তি করে ব্যবহারকারীর প্রকল্পের পূর্বরূপ আপডেট করে।
HTTP অনুরোধ
POST https://actions.googleapis.com/v2/{parent=projects/*}/preview:write
URL gRPC ট্রান্সকোডিং সিনট্যাক্স ব্যবহার করে।
পাথ প্যারামিটার
পরামিতি |
---|
parent | string প্রয়োজন। projects/{project} ফরম্যাটে মূল সম্পদের নাম। {project} হল প্রকল্পের সাথে যুক্ত ক্লাউড প্রজেক্ট আইডি। |
শরীরের অনুরোধ
অনুরোধের অংশে নিম্নলিখিত কাঠামো সহ ডেটা রয়েছে:
ক্ষেত্র |
---|
previewSettings | object ( PreviewSettings ) প্রয়োজন। ব্যবহারকারীর পূর্বরূপ আপডেট করার জন্য সেটিংস। |
ইউনিয়ন ক্ষেত্র source । প্রিভিউ তৈরি করতে ব্যবহৃত ডেটা উৎস। source নিম্নলিখিতগুলির মধ্যে একটি হতে পারে: |
files | object ( Files ) একটি সময়ে সার্ভারে পাঠানো ফাইলের তালিকা। এটি কনফিগার ফাইল বা ডেটা ফাইলের একটি তালিকা। 1. প্রথম অনুরোধ একটি ConfigFiles হতে হবে। 2. প্রথম অনুরোধে 'সেটিংস' সহ একটি কনফিগফাইল থাকতে হবে। 3. প্রথম অনুরোধে 'মেনিফেস্ট' সহ একটি কনফিগফাইল থাকতে হবে। 4. ইনলাইন ক্লাউড ফাংশনের সাথে সম্পর্কিত ওয়েবহুক কনফিগফাইলটি তার সোর্স কোডের সাথে সম্পর্কিত ডেটাফাইলের আগে স্ট্রিম করা উচিত। |
draft | object ( ContentFromDraft ) প্রকল্পের খসড়া থেকে প্রাপ্ত বিষয়বস্তু। |
submittedVersion | object ( ContentFromSubmittedVersion ) একটি বহির্গমন সংস্করণ থেকে সামগ্রী উৎস. |
প্রতিক্রিয়া শরীর
সফল হলে, প্রতিক্রিয়া বডিতে নিম্নলিখিত কাঠামোর সাথে ডেটা থাকে:
প্রিভিউ রিসোর্সের সংজ্ঞা।
JSON প্রতিনিধিত্ব |
---|
{
"name": string,
"validationResults": {
object (ValidationResults )
},
"simulatorUrl": string
} |
ক্ষেত্র |
---|
name | string পূর্বরূপের অনন্য শনাক্তকারী। বিন্যাস: projects/{project}/preview |
validationResults | object ( ValidationResults ) ব্যবহারকারীর প্রকল্পের পূর্বরূপ বিষয়বস্তুর সাথে যুক্ত বৈধতা ফলাফল। |
simulatorUrl | string ব্যবহারকারীর পূর্বরূপ পরীক্ষা করার জন্য সিমুলেটর URL। |
খসড়া থেকে সামগ্রী
ইঙ্গিত করে যে প্রিভিউ কন্টেন্ট ড্রাফ্ট থেকে আসবে।
জমাকৃত সংস্করণ থেকে সামগ্রী
পূর্বরূপ বিষয়বস্তু একটি প্রস্থান সংস্করণ থেকে আসছে নির্দেশ করে.
JSON প্রতিনিধিত্ব |
---|
{
"version": string
} |
ক্ষেত্র |
---|
version | string প্রয়োজন। একটি প্রিভিউ তৈরি করতে ব্যবহৃত প্রকল্পের জমা দেওয়া সংস্করণ। বিন্যাস: projects/{project}/versions/{version} |
পূর্বরূপ সেটিংস
প্রিভিউ আপডেট করার জন্য সেটিংস।
JSON প্রতিনিধিত্ব |
---|
{
"sandbox": boolean
} |
ক্ষেত্র |
---|
sandbox | boolean স্যান্ডবক্স মোডে কিছু ক্রিয়াকলাপ যেমন লেনদেন চালানো হবে কিনা তা নির্দেশ করে। ডিফল্টরূপে, পূর্বরূপ অনুরোধগুলি স্যান্ডবক্স মোডে এই অপারেশনগুলি চালায়। অন্য কথায়, sandbox জন্য ডিফল্ট মান true । |
অন্য কিছু উল্লেখ না করা থাকলে, এই পৃষ্ঠার কন্টেন্ট Creative Commons Attribution 4.0 License-এর অধীনে এবং কোডের নমুনাগুলি Apache 2.0 License-এর অধীনে লাইসেন্স প্রাপ্ত। আরও জানতে, Google Developers সাইট নীতি দেখুন। Java হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-07-24 UTC-তে শেষবার আপডেট করা হয়েছে।
[null,null,["2025-07-24 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`. |"]]