# REST Resource: processes

- [Resource: Process](https://developers.google.com/apps-script/api/reference/rest/v1/processes#Process)
  - [JSON representation](https://developers.google.com/apps-script/api/reference/rest/v1/processes#Process.SCHEMA_REPRESENTATION)
- [ProcessType](https://developers.google.com/apps-script/api/reference/rest/v1/processes#ProcessType)
- [ProcessStatus](https://developers.google.com/apps-script/api/reference/rest/v1/processes#ProcessStatus)
- [UserAccessLevel](https://developers.google.com/apps-script/api/reference/rest/v1/processes#UserAccessLevel)
- [Methods](https://developers.google.com/apps-script/api/reference/rest/v1/processes#METHODS_SUMMARY)

## 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 `https://developers.google.com/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 (`https://developers.google.com/apps-script/api/reference/rest/v1/processes#ProcessType`), "processStatus": enum (`https://developers.google.com/apps-script/api/reference/rest/v1/processes#ProcessStatus`), "userAccessLevel": enum (`https://developers.google.com/apps-script/api/reference/rest/v1/processes#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 (`https://developers.google.com/apps-script/api/reference/rest/v1/processes#ProcessType`)`` The executions type. |
| `processStatus` | ``enum (`https://developers.google.com/apps-script/api/reference/rest/v1/processes#ProcessStatus`)`` The executions status. |
| `userAccessLevel` | ``enum (`https://developers.google.com/apps-script/api/reference/rest/v1/processes#UserAccessLevel`)`` The executing users access level to the script. |
| `startTime` | ``string (`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"`. |
| `duration` | ``string (`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"`. |

## 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 ||
|---|---|
| ### `https://developers.google.com/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. |
| ### `https://developers.google.com/apps-script/api/reference/rest/v1/processes/listScriptProcesses` | List information about a script's executed processes, such as process type and current status. |