Method: projects.draft.write
Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Aktualisiert den Projektentwurf basierend auf dem Modell.
HTTP-Anfrage
POST https://actions.googleapis.com/v2/{parent=projects/*}/draft:write
Die URL verwendet die Syntax der gRPC-Transcodierung.
Pfadparameter
Parameter |
parent |
string
Erforderlich. Der Name der übergeordneten Ressource im Format projects/{project} . {project} ist die mit dem Projekt verknüpfte Cloud-Projekt-ID.
|
Anfragetext
Der Anfragetext enthält Daten mit folgender Struktur:
JSON-Darstellung |
{
"files": {
object (Files )
}
} |
Felder |
files |
object (Files )
Erforderlich. Liste der Dateien, die jeweils an den Server gesendet werden. Dies ist eine Liste von Konfigurationsdateien oder Datendateien. 1. Die erste Anfrage muss eine ConfigFiles sein. 2. Die erste Anfrage muss eine ConfigFile mit „settings“ haben. 3. Die erste Anfrage muss eine ConfigFile mit „manifest“ haben. 4. Die Webhook-ConfigFile, die der Inline-Cloud Functions-Funktion entspricht, muss vor der DataFile gestreamt werden, die ihrem Quellcode entspricht.
|
Antworttext
Bei Erfolg enthält der Antworttext Daten mit der folgenden Struktur:
Definition des Ressourcenentwurfs.
JSON-Darstellung |
{
"name": string,
"validationResults": {
object (ValidationResults )
}
} |
Felder |
name |
string
Die eindeutige ID des Entwurfs im folgenden Format. projects/{project}/draft
|
validationResults |
object (ValidationResults )
Validierungsergebnisse im Zusammenhang mit dem Inhalt des Projektentwurfs. Hinweis: „Draft.write“ aktualisiert den Entwurf trotz der Warnungen, da die Warnungen nicht den Entwurf blockieren.
|
Sofern nicht anders angegeben, sind die Inhalte dieser Seite unter der Creative Commons Attribution 4.0 License und Codebeispiele unter der Apache 2.0 License lizenziert. Weitere Informationen finden Sie in den Websiterichtlinien von Google Developers. Java ist eine eingetragene Marke von Oracle und/oder seinen Partnern.
Zuletzt aktualisiert: 2025-07-26 (UTC).
[null,null,["Zuletzt aktualisiert: 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. |"]]