会話型アクションのサポートは 2023 年 6 月 13 日に終了しました。詳細については、
会話型アクションの廃止をご覧ください。
Method: projects.draft.write
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
モデルに基づいてプロジェクトのドラフトを更新します。
HTTP リクエスト
POST https://actions.googleapis.com/v2/{parent=projects/*}/draft:write
この URL は gRPC Transcoding 構文を使用します。
パスパラメータ
パラメータ |
parent |
string
必須。projects/{project} 形式の親リソース名。{project} は、プロジェクトに関連付けられた Cloud プロジェクト ID です。
|
リクエスト本文
リクエストの本文には、次の構造のデータが含まれます。
JSON 表現 |
{
"files": {
object (Files )
}
} |
フィールド |
files |
object (Files )
必須。一度にサーバーに送信されるファイルのリスト。これは構成ファイルまたはデータファイルのリストです。1. 最初のリクエストは ConfigFiles である必要があります。2. 最初のリクエストには、「settings」を含む ConfigFile が必要です。3. 最初のリクエストには、「manifest」が指定された ConfigFile が必要です。4. インラインの Cloud Functions の関数に対応する Webhook 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. |"]]