Method: projects.deployments.create
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
สร้างการติดตั้งใช้งานของโปรเจ็กต์ Apps Script
คำขอ HTTP
POST https://script.googleapis.com/v1/projects/{scriptId}/deployments
URL ใช้ไวยากรณ์การแปลง gRPC
พารามิเตอร์เส้นทาง
พารามิเตอร์ |
scriptId |
string
รหัสไดรฟ์ของโปรเจ็กต์สคริปต์
|
เนื้อหาของคำขอ
เนื้อหาของคำขอมีข้อมูลที่มีโครงสร้างต่อไปนี้
การแสดง JSON |
{
"versionNumber": integer,
"manifestFileName": string,
"description": string
} |
ช่อง |
versionNumber |
integer
หมายเลขเวอร์ชันที่การทำให้ใช้งานได้นี้อ้างอิง
|
manifestFileName |
string
ชื่อไฟล์ Manifest สำหรับการทำให้ใช้งานได้นี้
|
description |
string
คำอธิบายสำหรับการทำให้ใช้งานได้นี้
|
เนื้อหาการตอบกลับ
หากทำสำเร็จ เนื้อหาการตอบกลับจะมีอินสแตนซ์ที่สร้างขึ้นใหม่ Deployment
ขอบเขตการให้สิทธิ์
ต้องใช้ขอบเขต OAuth ต่อไปนี้
https://www.googleapis.com/auth/script.deployments
สำหรับข้อมูลเพิ่มเติม โปรดดูที่ภาพรวมของ OAuth 2.0
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-26 UTC
[null,null,["อัปเดตล่าสุด 2025-07-26 UTC"],[[["\u003cp\u003eCreates a new deployment for a specified Apps Script project using an HTTP POST request.\u003c/p\u003e\n"],["\u003cp\u003eRequires providing the script project's Drive ID, version number, manifest file name, and an optional description in the request.\u003c/p\u003e\n"],["\u003cp\u003eUpon successful execution, it returns a Deployment object representing the newly created deployment.\u003c/p\u003e\n"],["\u003cp\u003eNeeds authorization with the \u003ccode\u003ehttps://www.googleapis.com/auth/script.deployments\u003c/code\u003e scope.\u003c/p\u003e\n"]]],[],null,["# Method: projects.deployments.create\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\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 deployment of an Apps Script project.\n\n### HTTP request\n\n`POST https://script.googleapis.com/v1/projects/{scriptId}/deployments`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|------------|-----------------------------------------|\n| `scriptId` | `string` The script project's Drive ID. |\n\n### Request body\n\nThe request body contains data with the following structure:\n\n| JSON representation |\n|-----------------------------------------------------------------------------------------|\n| ``` { \"versionNumber\": integer, \"manifestFileName\": string, \"description\": string } ``` |\n\n| Fields ||\n|--------------------|-----------------------------------------------------------------|\n| `versionNumber` | `integer` The version number on which this deployment is based. |\n| `manifestFileName` | `string` The manifest file name for this deployment. |\n| `description` | `string` The description for this deployment. |\n\n### Response body\n\nIf successful, the response body contains a newly created instance of [Deployment](/apps-script/api/reference/rest/v1/projects.deployments#Deployment).\n\n### Authorization Scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/script.deployments`\n\nFor more information, see the [OAuth 2.0 Overview](https://developers.google.com/identity/protocols/OAuth2)."]]