REST Resource: projects
Оптимизируйте свои подборки
Сохраняйте и классифицируйте контент в соответствии со своими настройками.
Ресурс: Проект
JSON-представление |
---|
{
"scriptId": string,
"title": string,
"parentId": string,
"createTime": string,
"updateTime": string,
"creator": {
object (User )
},
"lastModifyUser": {
object (User )
}
} |
Поля |
---|
scriptId | string Идентификатор диска проекта скрипта. |
title | string Название проекта. |
parentId | string Идентификатор родительского диска, к которому будет прикреплен скрипт. Обычно это идентификатор документа Google или таблицы Google. Это поле является необязательным, и если оно не установлено, будет создан автономный скрипт. |
createTime | string ( Timestamp format) Когда был создан сценарий. Временная метка в формате RFC3339 UTC «Зулу» с наносекундным разрешением и до девяти дробных цифр. Примеры: "2014-10-02T15:01:23Z" и "2014-10-02T15:01:23.045123456Z" . |
updateTime | string ( Timestamp format) Когда скрипт последний раз обновлялся. Временная метка в формате RFC3339 UTC «Зулу» с наносекундным разрешением и до девяти дробных цифр. Примеры: "2014-10-02T15:01:23Z" и "2014-10-02T15:01:23.045123456Z" . |
creator | object ( User ) Пользователь, изначально создавший скрипт. |
lastModifyUser | object ( User ) Пользователь, последним изменивший скрипт. |
Пользователь
Простой ресурс профиля пользователя.
JSON-представление |
---|
{
"domain": string,
"email": string,
"name": string,
"photoUrl": string
} |
Поля |
---|
domain | string Домен пользователя. |
email | string Идентификационный адрес электронной почты пользователя. |
name | string Отображаемое имя пользователя. |
photoUrl | string Фотография пользователя. |
Методы |
---|
| Создает новый пустой проект сценария без файлов сценария и базового файла манифеста. |
| Получает метаданные проекта скрипта. |
| Получает содержимое проекта сценария, включая источник кода и метаданные для каждого файла сценария. |
| Получите данные метрик для скриптов, такие как количество выполнений и активных пользователей. |
| Обновляет содержимое указанного проекта скрипта. |
Если не указано иное, контент на этой странице предоставляется по лицензии Creative Commons "С указанием авторства 4.0", а примеры кода – по лицензии Apache 2.0. Подробнее об этом написано в правилах сайта. Java – это зарегистрированный товарный знак корпорации Oracle и ее аффилированных лиц.
Последнее обновление: 2025-07-24 UTC.
[null,null,["Последнее обновление: 2025-07-24 UTC."],[[["\u003cp\u003eThis documentation details the Apps Script API for managing script projects, including creating, retrieving, and updating projects and their content.\u003c/p\u003e\n"],["\u003cp\u003eA script project is represented by properties like script ID, title, parent ID, creation and update timestamps, and creator/modifier user details.\u003c/p\u003e\n"],["\u003cp\u003eUser profiles associated with script projects contain domain, email, name, and photo URL information.\u003c/p\u003e\n"],["\u003cp\u003eThe API provides methods to manage script projects: \u003ccode\u003ecreate\u003c/code\u003e, \u003ccode\u003eget\u003c/code\u003e, \u003ccode\u003egetContent\u003c/code\u003e, \u003ccode\u003egetMetrics\u003c/code\u003e, and \u003ccode\u003eupdateContent\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# REST Resource: projects\n\n- [Resource: Project](#Project)\n - [JSON representation](#Project.SCHEMA_REPRESENTATION)\n- [User](#User)\n - [JSON representation](#User.SCHEMA_REPRESENTATION)\n- [Methods](#METHODS_SUMMARY)\n\nResource: Project\n-----------------\n\nThe script project resource.\n\n| JSON representation |\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"scriptId\": string, \"title\": string, \"parentId\": string, \"createTime\": string, \"updateTime\": string, \"creator\": { object (/apps-script/api/reference/rest/v1/projects#User) }, \"lastModifyUser\": { object (/apps-script/api/reference/rest/v1/projects#User) } } ``` |\n\n| Fields ||\n|------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `scriptId` | `string` The script project's Drive ID. |\n| `title` | `string` The title for the project. |\n| `parentId` | `string` The parent's Drive ID that the script will be attached to. This is usually the ID of a Google Document or Google Sheet. This filed is optional, and if not set, a stand-alone script will be created. |\n| `createTime` | `string (`[Timestamp](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Timestamp)` format)` When the script was created. 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| `updateTime` | `string (`[Timestamp](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Timestamp)` format)` When the script was last updated. 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| `creator` | `object (`[User](/apps-script/api/reference/rest/v1/projects#User)`)` User who originally created the script. |\n| `lastModifyUser` | `object (`[User](/apps-script/api/reference/rest/v1/projects#User)`)` User who last modified the script. |\n\nUser\n----\n\nA simple user profile resource.\n\n| JSON representation |\n|-----------------------------------------------------------------------------------|\n| ``` { \"domain\": string, \"email\": string, \"name\": string, \"photoUrl\": string } ``` |\n\n| Fields ||\n|------------|------------------------------------------------|\n| `domain` | `string` The user's domain. |\n| `email` | `string` The user's identifying email address. |\n| `name` | `string` The user's display name. |\n| `photoUrl` | `string` The user's photo. |\n\n| Methods ------- ||\n|--------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------|\n| ### [create](/apps-script/api/reference/rest/v1/projects/create) | Creates a new, empty script project with no script files and a base manifest file. |\n| ### [get](/apps-script/api/reference/rest/v1/projects/get) | Gets a script project's metadata. |\n| ### [getContent](/apps-script/api/reference/rest/v1/projects/getContent) | Gets the content of the script project, including the code source and metadata for each script file. |\n| ### [getMetrics](/apps-script/api/reference/rest/v1/projects/getMetrics) | Get metrics data for scripts, such as number of executions and active users. |\n| ### [updateContent](/apps-script/api/reference/rest/v1/projects/updateContent) | Updates the content of the specified script project. |"]]