Method: projects.draft.write
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Aggiorna la bozza del progetto in base al modello.
Richiesta HTTP
POST https://actions.googleapis.com/v2/{parent=projects/*}/draft:write
L'URL utilizza la sintassi di transcodifica gRPC.
Parametri del percorso
Parametri |
parent |
string
Obbligatorio. Il nome della risorsa padre nel formato projects/{project} . {project} è l'ID progetto cloud associato al progetto.
|
Corpo della richiesta
Il corpo della richiesta contiene dati con la seguente struttura:
Rappresentazione JSON |
{
"files": {
object (Files )
}
} |
Campi |
files |
object (Files )
Obbligatorio. Elenco di file inviati al server in una sola volta. Questo è un elenco di file di configurazione o di dati. 1. La prima richiesta deve essere un ConfigFiles. 2. La prima richiesta deve avere un ConfigFile con "settings". 3. La prima richiesta deve avere un ConfigFile con "manifest". 4. Il webhook ConfigFile corrispondente alla funzione Cloud Functions in linea deve essere trasmesso in flusso prima del DataFile corrispondente al relativo codice sorgente.
|
Corpo della risposta
In caso di esito positivo, il corpo della risposta contiene dati con la seguente struttura:
Definizione di bozza di risorsa.
Rappresentazione JSON |
{
"name": string,
"validationResults": {
object (ValidationResults )
}
} |
Campi |
name |
string
L'identificatore univoco della bozza nel seguente formato. projects/{project}/draft
|
validationResults |
object (ValidationResults )
Risultati della convalida associati ai contenuti della bozza del progetto. Tieni presente che bozza.write aggiorna la bozza nonostante gli avvisi, in quanto gli avvisi non costituiscono un blocco di bozze.
|
Salvo quando diversamente specificato, i contenuti di questa pagina sono concessi in base alla licenza Creative Commons Attribution 4.0, mentre gli esempi di codice sono concessi in base alla licenza Apache 2.0. Per ulteriori dettagli, consulta le norme del sito di Google Developers. Java è un marchio registrato di Oracle e/o delle sue consociate.
Ultimo aggiornamento 2025-07-26 UTC.
[null,null,["Ultimo aggiornamento 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. |"]]