REST Resource: processes
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Risorsa: processo
Rappresentazione di un singolo processo di esecuzione di script avviata dall'editor di script, da un trigger, da un'applicazione o utilizzando l'API Apps Script. È diversa dalla risorsa Operation
, che rappresenta solo le esecuzioni avviate tramite l'API Apps Script.
Rappresentazione JSON |
{
"projectName": string,
"functionName": string,
"processType": enum (ProcessType ),
"processStatus": enum (ProcessStatus ),
"userAccessLevel": enum (UserAccessLevel ),
"startTime": string,
"duration": string
} |
Campi |
projectName |
string
Nome dello script in esecuzione.
|
functionName |
string
Nome della funzione di cui ha avviato l'esecuzione.
|
processType |
enum (ProcessType )
Il tipo di esecuzioni.
|
processStatus |
enum (ProcessStatus )
Lo stato delle esecuzioni.
|
userAccessLevel |
enum (UserAccessLevel )
Il livello di accesso allo script degli utenti che eseguono l'esecuzione.
|
startTime |
string (Timestamp format)
Ora di inizio dell'esecuzione. Un timestamp nel formato RFC3339 UTC "Zulu" con risoluzione in nanosecondi e fino a nove cifre frazionarie. Esempi: "2014-10-02T15:01:23Z" e "2014-10-02T15:01:23.045123456Z" .
|
duration |
string (Duration format)
Durata dell'esecuzione. Durata in secondi con un massimo di nove cifre frazionarie e termina con "s ". Esempio: "3.5s" .
|
ProcessType
Il tipo di processo, che definisce il modo in cui è stato avviato.
Enum |
PROCESS_TYPE_UNSPECIFIED |
Tipo non specificato. |
ADD_ON |
Il processo è stato avviato da un punto di ingresso di un componente aggiuntivo. |
EXECUTION_API |
Il processo è stato avviato utilizzando l'API Apps Script. |
TIME_DRIVEN |
Il processo è stato avviato da un trigger basato sul tempo. |
TRIGGER |
Il processo è stato avviato da un trigger basato su eventi. |
WEBAPP |
Il processo è stato avviato da un punto di ingresso di un'app web. |
EDITOR |
Il processo è stato avviato utilizzando l'IDE di Apps Script. |
SIMPLE_TRIGGER |
Il processo è stato avviato da un semplice trigger di G Suite. |
BATCH_TASK |
Il processo è stato avviato come attività in un job batch. |
ProcessStatus
Enum |
PROCESS_STATUS_UNSPECIFIED |
Stato non specificato. |
RUNNING |
Il processo è attualmente in esecuzione. |
PAUSED |
Il processo è stato messo in pausa. |
COMPLETED |
Il processo è stato completato. |
CANCELED |
Il processo è stato annullato. |
FAILED |
Procedura non riuscita. |
TIMED_OUT |
Il processo è scaduto. |
UNKNOWN |
Stato del processo sconosciuto. |
DELAYED |
Il processo è in ritardo, in attesa della quota. |
UserAccessLevel
I vari livelli di accesso degli utenti.
Enum |
USER_ACCESS_LEVEL_UNSPECIFIED |
Livello di accesso utente non specificato |
NONE |
L'utente non ha accesso. |
READ |
L'utente dispone dell'accesso di sola lettura. |
WRITE |
L'utente dispone dell'accesso in scrittura. |
OWNER |
L'utente è un proprietario. |
Metodi |
|
Elenca le informazioni sui processi eseguiti da o per conto di un utente, ad esempio il tipo di processo e lo stato attuale. |
|
Elenca le informazioni sui processi eseguiti di uno script, come il tipo di processo e lo stato attuale. |
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\u003eThe \u003ccode\u003eProcess\u003c/code\u003e resource represents a single script execution initiated from various sources like the script editor, triggers, applications, or the Apps Script API.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eProcess\u003c/code\u003e details include project and function names, execution type, status, user access level, start time, and duration.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eProcessType\u003c/code\u003e identifies how the process was started (e.g., add-on, API, trigger, web app).\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eProcessStatus\u003c/code\u003e indicates the current state of the execution (e.g., running, paused, completed, failed).\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can programmatically list processes using methods like \u003ccode\u003elist\u003c/code\u003e and \u003ccode\u003elistScriptProcesses\u003c/code\u003e to gain insights into executions.\u003c/p\u003e\n"]]],[],null,["# REST Resource: processes\n\n- [Resource: Process](#Process)\n - [JSON representation](#Process.SCHEMA_REPRESENTATION)\n- [ProcessType](#ProcessType)\n- [ProcessStatus](#ProcessStatus)\n- [UserAccessLevel](#UserAccessLevel)\n- [Methods](#METHODS_SUMMARY)\n\nResource: Process\n-----------------\n\nRepresentation of a single script process execution that was started from the script editor, a trigger, an application, or using the Apps Script API. This is distinct from the [`Operation`](/apps-script/api/reference/rest/v1/scripts/run#body.Operation) resource, which only represents executions started via the Apps Script API.\n\n| JSON representation |\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"projectName\": string, \"functionName\": string, \"processType\": enum (/apps-script/api/reference/rest/v1/processes#ProcessType), \"processStatus\": enum (/apps-script/api/reference/rest/v1/processes#ProcessStatus), \"userAccessLevel\": enum (/apps-script/api/reference/rest/v1/processes#UserAccessLevel), \"startTime\": string, \"duration\": string } ``` |\n\n| Fields ||\n|-------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `projectName` | `string` Name of the script being executed. |\n| `functionName` | `string` Name of the function the started the execution. |\n| `processType` | `enum (`[ProcessType](/apps-script/api/reference/rest/v1/processes#ProcessType)`)` The executions type. |\n| `processStatus` | `enum (`[ProcessStatus](/apps-script/api/reference/rest/v1/processes#ProcessStatus)`)` The executions status. |\n| `userAccessLevel` | `enum (`[UserAccessLevel](/apps-script/api/reference/rest/v1/processes#UserAccessLevel)`)` The executing users access level to the script. |\n| `startTime` | `string (`[Timestamp](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Timestamp)` format)` Time the execution started. A timestamp in RFC3339 UTC \"Zulu\" format, with nanosecond resolution and up to nine fractional digits. Examples: `\"2014-10-02T15:01:23Z\"` and `\"2014-10-02T15:01:23.045123456Z\"`. |\n| `duration` | `string (`[Duration](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Duration)` format)` Duration the execution spent executing. A duration in seconds with up to nine fractional digits, ending with '`s`'. Example: `\"3.5s\"`. |\n\nProcessType\n-----------\n\nThe type of process, which defines how the process was started.\n\n| Enums ||\n|----------------------------|--------------------------------------------------------|\n| `PROCESS_TYPE_UNSPECIFIED` | Unspecified type. |\n| `ADD_ON` | The process was started from an add-on entry point. |\n| `EXECUTION_API` | The process was started using the Apps Script API. |\n| `TIME_DRIVEN` | The process was started from a time-based trigger. |\n| `TRIGGER` | The process was started from an event-based trigger. |\n| `WEBAPP` | The process was started from a web app entry point. |\n| `EDITOR` | The process was started using the Apps Script IDE. |\n| `SIMPLE_TRIGGER` | The process was started from a G Suite simple trigger. |\n| `MENU` | The process was started from a G Suite menu item. |\n| `BATCH_TASK` | The process was started as a task in a batch job. |\n\nProcessStatus\n-------------\n\nThe process status.\n\n| Enums ||\n|------------------------------|--------------------------------------------|\n| `PROCESS_STATUS_UNSPECIFIED` | Unspecified status. |\n| `RUNNING` | The process is currently running. |\n| `PAUSED` | The process has paused. |\n| `COMPLETED` | The process has completed. |\n| `CANCELED` | The process was cancelled. |\n| `FAILED` | The process failed. |\n| `TIMED_OUT` | The process timed out. |\n| `UNKNOWN` | Process status unknown. |\n| `DELAYED` | The process is delayed, waiting for quota. |\n\nUserAccessLevel\n---------------\n\nThe various user access levels.\n\n| Enums ||\n|---------------------------------|--------------------------------|\n| `USER_ACCESS_LEVEL_UNSPECIFIED` | User access level unspecified |\n| `NONE` | The user has no access. |\n| `READ` | The user has read-only access. |\n| `WRITE` | The user has write access. |\n| `OWNER` | The user is an owner. |\n\n| Methods ------- ||\n|---------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------|\n| ### [list](/apps-script/api/reference/rest/v1/processes/list) | List information about processes made by or on behalf of a user, such as process type and current status. |\n| ### [listScriptProcesses](/apps-script/api/reference/rest/v1/processes/listScriptProcesses) | List information about a script's executed processes, such as process type and current status. |"]]