Method: projects.create

建立新的空白指令碼專案,該專案不含任何指令碼檔案和基本資訊清單檔案。

HTTP 要求

POST https://script.googleapis.com/v1/projects

這個網址使用 gRPC 轉碼語法。

要求主體

要求主體的資料會採用以下結構:

JSON 表示法
{
  "title": string,
  "parentId": string
}
欄位
title

string

專案標題。

parentId

string

已建立的指令碼專案所繫結的父項檔案雲端硬碟 ID。通常是 Google 文件、Google 試算表、Google 表單或 Google 簡報檔案的 ID。如未設定,系統會建立獨立的指令碼專案。

回應主體

如果成功,回應主體會包含新建立的 Project 例項。

授權範圍

需要下列 OAuth 範圍:

  • https://www.googleapis.com/auth/script.projects

詳情請參閱 OAuth 2.0 總覽