REST Resource: projects
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Tài nguyên: Dự án
Tài nguyên của dự án tập lệnh.
Biểu diễn dưới dạng JSON |
{
"scriptId": string,
"title": string,
"parentId": string,
"createTime": string,
"updateTime": string,
"creator": {
object (User )
},
"lastModifyUser": {
object (User )
}
} |
Trường |
scriptId |
string
Mã Drive của dự án tập lệnh.
|
title |
string
Tiêu đề của dự án.
|
parentId |
string
Mã Drive của nhà xuất bản mẹ mà tập lệnh sẽ được đính kèm. Đây thường là mã nhận dạng của Google Tài liệu hoặc Google Trang tính. Tệp này là không bắt buộc và nếu bạn không đặt chính sách này, hệ thống sẽ tạo một tập lệnh độc lập.
|
createTime |
string (Timestamp format)
Thời điểm tạo tập lệnh. Dấu thời gian theo múi giờ "Zulu" RFC3339 (giờ UTC) với độ phân giải nano giây và lên đến 9 chữ số phân số. Ví dụ: "2014-10-02T15:01:23Z" và "2014-10-02T15:01:23.045123456Z" .
|
updateTime |
string (Timestamp format)
Thời điểm cập nhật tập lệnh lần gần đây nhất. Dấu thời gian theo múi giờ "Zulu" RFC3339 (giờ UTC) với độ phân giải nano giây và lên đến 9 chữ số phân số. Ví dụ: "2014-10-02T15:01:23Z" và "2014-10-02T15:01:23.045123456Z" .
|
creator |
object (User )
Người dùng ban đầu đã tạo tập lệnh.
|
lastModifyUser |
object (User )
Người dùng sửa đổi tập lệnh lần gần đây nhất.
|
Người dùng
Tài nguyên hồ sơ người dùng đơn giản.
Biểu diễn dưới dạng JSON |
{
"domain": string,
"email": string,
"name": string,
"photoUrl": string
} |
Trường |
domain |
string
Miền của người dùng.
|
email |
string
Địa chỉ email nhận dạng của người dùng.
|
name |
string
Tên hiển thị của người dùng.
|
photoUrl |
string
Ảnh của người dùng.
|
Phương thức |
|
Tạo một dự án tập lệnh mới, trống không có tệp tập lệnh và một tệp kê khai cơ sở. |
|
Lấy siêu dữ liệu của dự án tập lệnh. |
|
Lấy nội dung của dự án tập lệnh, bao gồm cả nguồn mã và siêu dữ liệu của từng tệp tập lệnh. |
|
Nhận dữ liệu chỉ số cho tập lệnh, chẳng hạn như số lần thực thi và số người dùng đang hoạt động. |
|
Cập nhật nội dung của dự án tập lệnh được chỉ định. |
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-07-26 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-26 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. |"]]