Method: projects.versions.list
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
نسخه های یک پروژه اسکریپت را فهرست کنید.
درخواست HTTP
GET https://script.googleapis.com/v1/projects/{scriptId}/versions
URL از دستور GRPC Transcoding استفاده می کند.
پارامترهای مسیر
پارامترها |
---|
scriptId | string شناسه Drive پروژه اسکریپت. |
پارامترهای پرس و جو
پارامترها |
---|
pageToken | string نشانه برای ادامه درخواست لیست قبلی در صفحه بعد. این باید روی مقدار nextPageToken از پاسخ قبلی تنظیم شود. |
pageSize | integer حداکثر تعداد نسخه در هر صفحه برگشتی. پیش فرض 50 است. |
درخواست بدن
بدنه درخواست باید خالی باشد.
بدن پاسخگو
در صورت موفقیت آمیز بودن، بدنه پاسخ حاوی داده هایی با ساختار زیر است:
با لیست نسخه های پروژه اسکریپت مشخص شده پاسخ دهید.
نمایندگی JSON |
---|
{
"versions": [
{
object (Version )
}
],
"nextPageToken": string
} |
فیلدها |
---|
versions[] | object ( Version ) لیست نسخه ها. |
nextPageToken | string از نشانه برای واکشی صفحه بعدی رکوردها استفاده می شود. اگر در پاسخ وجود نداشته باشد، به این معنی است که نسخه دیگری برای لیست وجود ندارد. |
محدوده مجوز
به یکی از حوزه های OAuth زیر نیاز دارد:
-
https://www.googleapis.com/auth/script.projects
-
https://www.googleapis.com/auth/script.projects.readonly
برای اطلاعات بیشتر، به نمای کلی OAuth 2.0 مراجعه کنید.
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-07-29 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-07-29 بهوقت ساعت هماهنگ جهانی."],[[["\u003cp\u003eList the versions of a specific Google Apps Script project using the provided HTTP request.\u003c/p\u003e\n"],["\u003cp\u003eFilter results using optional query parameters like \u003ccode\u003epageToken\u003c/code\u003e for pagination and \u003ccode\u003epageSize\u003c/code\u003e to limit results per page.\u003c/p\u003e\n"],["\u003cp\u003eUpon successful execution, the response provides a list of script versions and a token for retrieving further pages, if available.\u003c/p\u003e\n"],["\u003cp\u003eAuthorization requires specific OAuth scopes for accessing and managing script projects.\u003c/p\u003e\n"]]],[],null,["# Method: projects.versions.list\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n - [JSON representation](#body.ListVersionsResponse.SCHEMA_REPRESENTATION)\n- [Authorization Scopes](#body.aspect)\n- [Try it!](#try-it)\n\nList the versions of a script project.\n\n### HTTP request\n\n`GET https://script.googleapis.com/v1/projects/{scriptId}/versions`\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### Query parameters\n\n| Parameters ||\n|-------------|----------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `pageToken` | `string` The token for continuing a previous list request on the next page. This should be set to the value of `nextPageToken` from a previous response. |\n| `pageSize` | `integer` The maximum number of versions on each returned page. Defaults to 50. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nIf successful, the response body contains data with the following structure:\nResponse with the list of the versions for the specified script project.\n\n| JSON representation |\n|--------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"versions\": [ { object (/apps-script/api/reference/rest/v1/projects.versions#Version) } ], \"nextPageToken\": string } ``` |\n\n| Fields ||\n|-----------------|------------------------------------------------------------------------------------------------------------------------------|\n| `versions[]` | `object (`[Version](/apps-script/api/reference/rest/v1/projects.versions#Version)`)` The list of versions. |\n| `nextPageToken` | `string` The token use to fetch the next page of records. if not exist in the response, that means no more versions to list. |\n\n### Authorization Scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/script.projects`\n- `https://www.googleapis.com/auth/script.projects.readonly`\n\nFor more information, see the [OAuth 2.0 Overview](https://developers.google.com/identity/protocols/OAuth2)."]]