REST Resource: processes  |  Apps Script  |  Google for Developers (original) (raw)

REST Resource: processes

Stay organized with collections Save and categorize content based on your preferences.

Resource: Process

Representation 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.

JSON representation
{ "projectName": string, "functionName": string, "processType": enum (ProcessType), "processStatus": enum (ProcessStatus), "userAccessLevel": enum (UserAccessLevel), "startTime": string, "duration": string }
Fields
projectName string Name of the script being executed.
functionName string Name of the function the started the execution.
processType enum (ProcessType) The executions type.
processStatus enum (ProcessStatus) The executions status.
userAccessLevel enum (UserAccessLevel) The executing users access level to the script.
startTime string (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".
duration string (Duration format) Duration the execution spent executing.A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".

ProcessType

The type of process, which defines how the process was started.

Enums
PROCESS_TYPE_UNSPECIFIED Unspecified type.
ADD_ON The process was started from an add-on entry point.
EXECUTION_API The process was started using the Apps Script API.
TIME_DRIVEN The process was started from a time-based trigger.
TRIGGER The process was started from an event-based trigger.
WEBAPP The process was started from a web app entry point.
EDITOR The process was started using the Apps Script IDE.
SIMPLE_TRIGGER The process was started from a G Suite simple trigger.
MENU The process was started from a G Suite menu item.
BATCH_TASK The process was started as a task in a batch job.

ProcessStatus

The process status.

Enums
PROCESS_STATUS_UNSPECIFIED Unspecified status.
RUNNING The process is currently running.
PAUSED The process has paused.
COMPLETED The process has completed.
CANCELED The process was cancelled.
FAILED The process failed.
TIMED_OUT The process timed out.
UNKNOWN Process status unknown.
DELAYED The process is delayed, waiting for quota.

UserAccessLevel

The various user access levels.

Enums
USER_ACCESS_LEVEL_UNSPECIFIED User access level unspecified
NONE The user has no access.
READ The user has read-only access.
WRITE The user has write access.
OWNER The user is an owner.
Methods
list List information about processes made by or on behalf of a user, such as process type and current status.
listScriptProcesses List information about a script's executed processes, such as process type and current status.