Method: projects.draft.write
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
อัปเดตแบบร่างของโปรเจ็กต์ตามโมเดล
คำขอ HTTP
POST https://actions.googleapis.com/v2/{parent=projects/*}/draft:write
URL ใช้ไวยากรณ์การแปลง gRPC
พารามิเตอร์เส้นทาง
พารามิเตอร์ |
parent |
string
ต้องระบุ ชื่อทรัพยากรระดับบนสุดในรูปแบบ projects/{project} โดย {project} คือรหัสโปรเจ็กต์ที่อยู่ในระบบคลาวด์ที่เชื่อมโยงกับโปรเจ็กต์ดังกล่าว
|
เนื้อหาของคำขอ
เนื้อหาของคำขอมีข้อมูลที่มีโครงสร้างต่อไปนี้
การแสดง JSON |
{
"files": {
object (Files )
}
} |
ช่อง |
files |
object (Files )
ต้องระบุ รายการไฟล์ที่ส่งไปยังเซิร์ฟเวอร์ต่อครั้ง นี่คือรายการไฟล์การกำหนดค่าหรือไฟล์ข้อมูล 1. คำขอแรกต้องเป็น ConfigFiles 2. คำขอแรกต้องมี ConfigFile ที่มี "settings" 3. คำขอแรกต้องมี ConfigFile ที่มี "ไฟล์ Manifest" 4. ต้องสตรีม ConfigFile ของเว็บฮุคที่สอดคล้องกับฟังก์ชันระบบคลาวด์ในบรรทัดก่อน DataFile ที่สอดคล้องกับซอร์สโค้ด
|
เนื้อหาการตอบกลับ
หากทำสำเร็จ เนื้อหาการตอบกลับจะมีข้อมูลซึ่งมีโครงสร้างดังต่อไปนี้
คำจำกัดความของทรัพยากรฉบับร่าง
ช่อง |
name |
string
ตัวระบุที่ไม่ซ้ำกันของฉบับร่างในรูปแบบต่อไปนี้ projects/{project}/draft
|
validationResults |
object (ValidationResults )
ผลการตรวจสอบที่เชื่อมโยงกับเนื้อหาฉบับร่างของโปรเจ็กต์ โปรดทราบว่าDraft.write อัปเดตฉบับร่างแม้จะมีคำเตือนเนื่องจากคำเตือนไม่ใช่การบล็อกฉบับร่าง
|
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-26 UTC
[null,null,["อัปเดตล่าสุด 2025-07-26 UTC"],[[["\u003cp\u003eUpdates a project draft using a POST request to a specific endpoint with gRPC Transcoding syntax.\u003c/p\u003e\n"],["\u003cp\u003eRequires path and request body parameters, including project ID and files for the draft.\u003c/p\u003e\n"],["\u003cp\u003eThe request body must contain configuration files (settings and manifest) before any data files.\u003c/p\u003e\n"],["\u003cp\u003eThe response includes the draft's unique identifier and any validation results, including warnings that do not block draft updates.\u003c/p\u003e\n"]]],[],null,["# Method: projects.draft.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.Draft.SCHEMA_REPRESENTATION)\n\nUpdates the project draft based on the model.\n\n### HTTP request\n\n`POST https://actions.googleapis.com/v2/{parent=projects/*}/draft: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| ``` { \"files\": { object (/assistant/actions/api/reference/rest/v2/Files) } } ``` |\n\n| Fields ||\n|---------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `files` | `object (`[Files](/assistant/actions/api/reference/rest/v2/Files)`)` Required. 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\n### Response body\n\nIf successful, the response body contains data with the following structure:\nDefinition of draft resource.\n\n| JSON representation ||\n|--------------------------------------------------------------------------------------------------------------------------|---|\n| ``` { \"name\": string, \"validationResults\": { object (/assistant/actions/api/reference/rest/v2/ValidationResults) } } ``` |\n\n| Fields ||\n|---------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `name` | `string` The unique identifier of the draft in the following format. `projects/{project}/draft` |\n| `validationResults` | `object (`[ValidationResults](/assistant/actions/api/reference/rest/v2/ValidationResults)`)` Validation results associated with the project draft content. Note that draft.write updates the draft despite the warnings as warnings are not draft blocking. |"]]