התכונה 'פעולות שיחה' הוצאה משימוש ב-13 ביוני 2023.
כאן תוכלו לקרוא מידע נוסף על ההוצאה משימוש של 'פעולות שיחה'.
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. הבקשה הראשונה חייבת לכלול קובץ ConfigFile עם 'settings'. 3. הבקשה הראשונה חייבת לכלול ConfigFile עם 'manifest'. 4. קובץ התצורה של התגובה לפעולה מאתר אחר (webhook) שמתאים לפונקציה של הענן המוטבע חייב להיות משודר לפני קובץ ה-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
כתובת ה-URL של הסימולטור לבדיקת התצוגה המקדימה של המשתמש.
|
ContentFromDraft
מעיד על כך שתוכן התצוגה המקדימה יגיע מהטיוטה.
ContentFromSubmittedVersion
מציין שתוכן התצוגה המקדימה יגיע מגרסה עדכנית.
ייצוג JSON |
{
"version": string
} |
שדות |
version |
string
חובה. גרסה של הפרויקט שנשלחה לצורך יצירת תצוגה מקדימה. פורמט: projects/{project}/versions/{version}
|
PreviewSettings
ההגדרות לעדכון התצוגה המקדימה.
ייצוג JSON |
{
"sandbox": boolean
} |
שדות |
sandbox |
boolean
מציין אם להפעיל פעולות מסוימות, כמו עסקאות, במצב ארגז חול (sandbox). כברירת מחדל, בקשות לתצוגה מקדימה מריצה את הפעולות האלה במצב ארגז חול. במילים אחרות, ערך ברירת המחדל של sandbox הוא true .
|
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 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`. |"]]