Method: projects.create
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
יצירת פרויקט סקריפט חדש וריק, ללא קובצי סקריפט וקובץ מניפסט בסיסי.
בקשת HTTP
POST https://script.googleapis.com/v1/projects
בכתובת ה-URL נעשה שימוש בתחביר המרת קידוד של gRPC.
גוף הבקשה
גוף הבקשה מכיל נתונים במבנה הבא:
ייצוג JSON |
{
"title": string,
"parentId": string
} |
שדות |
title |
string
שם הפרויקט.
|
parentId |
string
מזהה Drive של קובץ הורה שאליו מקושר פרויקט הסקריפט שנוצר. בדרך כלל מדובר במזהה של מסמך ב-Google Docs, בגיליון אלקטרוני ב-Google Sheets, ב-Google Forms או ב-Google Slides. אם המדיניות לא מוגדרת, נוצר פרויקט סקריפט עצמאי.
|
גוף התשובה
אם הפעולה בוצעה ללא שגיאות, גוף התגובה יכלול מופע חדש של Project
.
היקפי הרשאות
נדרש היקף ההרשאות הבא של OAuth:
https://www.googleapis.com/auth/script.projects
למידע נוסף, קראו את המאמר סקירה כללית של OAuth 2.0.
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-26 (שעון UTC).
[null,null,["עדכון אחרון: 2025-07-26 (שעון UTC)."],[[["\u003cp\u003eCreates a new, empty script project with no script files and a base manifest file.\u003c/p\u003e\n"],["\u003cp\u003eThe request body can include a title for the project and the Drive ID of a parent file to bind the project to.\u003c/p\u003e\n"],["\u003cp\u003eA successful response returns a Project object representing the newly created script project.\u003c/p\u003e\n"],["\u003cp\u003eRequires authorization with the \u003ccode\u003ehttps://www.googleapis.com/auth/script.projects\u003c/code\u003e scope.\u003c/p\u003e\n"]]],[],null,["# Method: projects.create\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n- [Authorization Scopes](#body.aspect)\n- [Try it!](#try-it)\n\nCreates a new, empty script project with no script files and a base manifest file.\n\n### HTTP request\n\n`POST https://script.googleapis.com/v1/projects`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Request body\n\nThe request body contains data with the following structure:\n\n| JSON representation |\n|-------------------------------------------------|\n| ``` { \"title\": string, \"parentId\": string } ``` |\n\n| Fields ||\n|------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `title` | `string` The title for the project. |\n| `parentId` | `string` The Drive ID of a parent file that the created script project is bound to. This is usually the ID of a Google Doc, Google Sheet, Google Form, or Google Slides file. If not set, a standalone script project is created. |\n\n### Response body\n\nIf successful, the response body contains a newly created instance of [Project](/apps-script/api/reference/rest/v1/projects#Project).\n\n### Authorization Scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/script.projects`\n\nFor more information, see the [OAuth 2.0 Overview](https://developers.google.com/identity/protocols/OAuth2)."]]