Method: projects.updateContent
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
নির্দিষ্ট স্ক্রিপ্ট প্রকল্পের বিষয়বস্তু আপডেট করে। এই বিষয়বস্তু HEAD সংস্করণ হিসাবে সংরক্ষণ করা হয়, এবং যখন স্ক্রিপ্টটি একটি ট্রিগার হিসাবে, স্ক্রিপ্ট সম্পাদকে, অ্যাড-অন প্রিভিউ মোডে, বা একটি ওয়েব অ্যাপ বা অ্যাপস স্ক্রিপ্ট API হিসাবে ডেভেলপমেন্ট মোডে কার্যকর করা হয় তখন ব্যবহার করা হয়৷ এটি প্রকল্পের সমস্ত বিদ্যমান ফাইল সাফ করে।
HTTP অনুরোধ
PUT https://script.googleapis.com/v1/projects/{scriptId}/content
URL gRPC ট্রান্সকোডিং সিনট্যাক্স ব্যবহার করে।
পাথ প্যারামিটার
পরামিতি |
---|
scriptId | string স্ক্রিপ্ট প্রকল্পের ড্রাইভ আইডি। |
শরীরের অনুরোধ
অনুরোধের অংশে নিম্নলিখিত কাঠামো সহ ডেটা রয়েছে:
JSON প্রতিনিধিত্ব |
---|
{
"files": [
{
object (File )
}
]
} |
ক্ষেত্র |
---|
files[] | object ( File ) স্ক্রিপ্ট প্রকল্প ফাইলের তালিকা. ফাইলগুলির মধ্যে একটি হল একটি স্ক্রিপ্ট ম্যানিফেস্ট; এটিকে অবশ্যই "অ্যাপস্ক্রিপ্ট" নাম দিতে হবে, অবশ্যই JSON-এর ধরন থাকতে হবে এবং প্রকল্পের জন্য ম্যানিফেস্ট কনফিগারেশন অন্তর্ভুক্ত করতে হবে। |
প্রতিক্রিয়া শরীর
সফল হলে, প্রতিক্রিয়া বডিতে Content
একটি উদাহরণ থাকে।
অনুমোদনের সুযোগ
নিম্নলিখিত OAuth সুযোগ প্রয়োজন:
-
https://www.googleapis.com/auth/script.projects
আরও তথ্যের জন্য, OAuth 2.0 ওভারভিউ দেখুন।
অন্য কিছু উল্লেখ না করা থাকলে, এই পৃষ্ঠার কন্টেন্ট Creative Commons Attribution 4.0 License-এর অধীনে এবং কোডের নমুনাগুলি Apache 2.0 License-এর অধীনে লাইসেন্স প্রাপ্ত। আরও জানতে, Google Developers সাইট নীতি দেখুন। Java হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-07-24 UTC-তে শেষবার আপডেট করা হয়েছে।
[null,null,["2025-07-24 UTC-তে শেষবার আপডেট করা হয়েছে।"],[[["\u003cp\u003eUpdates the content of a specified Apps Script project, replacing all existing files.\u003c/p\u003e\n"],["\u003cp\u003eRequires a \u003ccode\u003ePUT\u003c/code\u003e request to the specified endpoint with the script project's Drive ID.\u003c/p\u003e\n"],["\u003cp\u003eThe request body must contain a list of files, including a JSON manifest named "appsscript".\u003c/p\u003e\n"],["\u003cp\u003eA successful response returns the updated project content.\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.updateContent\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\nUpdates the content of the specified script project. This content is stored as the HEAD version, and is used when the script is executed as a trigger, in the script editor, in add-on preview mode, or as a web app or Apps Script API in development mode. This clears all the existing files in the project.\n\n### HTTP request\n\n`PUT https://script.googleapis.com/v1/projects/{scriptId}/content`\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| ``` { \"files\": [ { object (/apps-script/api/reference/rest/v1/File) } ] } ``` |\n\n| Fields ||\n|-----------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `files[]` | `object (`[File](/apps-script/api/reference/rest/v1/File)`)` The list of script project files. One of the files is a script manifest; it must be named \"appsscript\", must have type of JSON, and include the manifest configurations for the project. |\n\n### Response body\n\nIf successful, the response body contains an instance of [Content](/apps-script/api/reference/rest/v1/projects/getContent#body.Content).\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)."]]