Method: projects.getContent
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
각 스크립트 파일의 코드 소스 및 메타데이터를 비롯한 스크립트 프로젝트의 콘텐츠를 가져옵니다.
HTTP 요청
GET https://script.googleapis.com/v1/projects/{scriptId}/content
URL은 gRPC 트랜스코딩 문법을 사용합니다.
경로 매개변수
매개변수 |
scriptId |
string
스크립트 프로젝트의 Drive ID
|
쿼리 매개변수
매개변수 |
versionNumber |
integer
검색할 프로젝트의 버전 번호입니다. 제공하지 않으면 프로젝트의 HEAD 버전이 반환됩니다.
|
응답 본문
성공할 경우 응답 본문에 다음 구조의 데이터가 포함됩니다.
JSON 표현 |
{
"scriptId": string,
"files": [
{
object (File )
}
]
} |
필드 |
scriptId |
string
스크립트 프로젝트의 Drive ID
|
files[] |
object (File )
스크립트 프로젝트 파일의 목록입니다. 파일 중 하나는 스크립트 매니페스트이며 이름은 'appsscript'여야 하고, JSON 유형을 포함해야 하며, 프로젝트의 매니페스트 구성을 포함해야 합니다.
|
승인 범위
다음 OAuth 범위 중 하나가 필요합니다.
https://www.googleapis.com/auth/script.projects
https://www.googleapis.com/auth/script.projects.readonly
자세한 내용은 OAuth 2.0 개요를 참고하세요.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-07-26(UTC)
[null,null,["최종 업데이트: 2025-07-26(UTC)"],[[["\u003cp\u003eRetrieves the content of a script project, including source code and metadata for each file.\u003c/p\u003e\n"],["\u003cp\u003eRequires providing the script project's Drive ID as a path parameter.\u003c/p\u003e\n"],["\u003cp\u003eOptionally, a version number can be specified to retrieve a specific project version; otherwise, the latest version is returned.\u003c/p\u003e\n"],["\u003cp\u003eThe response includes the script project's Drive ID and a list of files, with one being a JSON manifest named "appsscript".\u003c/p\u003e\n"],["\u003cp\u003eRequires authorization with specific scopes related to script projects.\u003c/p\u003e\n"]]],[],null,["# Method: projects.getContent\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.Content.SCHEMA_REPRESENTATION)\n- [Authorization Scopes](#body.aspect)\n- [Try it!](#try-it)\n\nGets the content of the script project, including the code source and metadata for each script file.\n\n### HTTP request\n\n`GET 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### Query parameters\n\n| Parameters ||\n|-----------------|-------------------------------------------------------------------------------------------------------------------|\n| `versionNumber` | `integer` The version number of the project to retrieve. If not provided, the project's HEAD version is returned. |\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:\nThe Content resource.\n\n| JSON representation |\n|---------------------------------------------------------------------------------------------------|\n| ``` { \"scriptId\": string, \"files\": [ { object (/apps-script/api/reference/rest/v1/File) } ] } ``` |\n\n| Fields ||\n|------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `scriptId` | `string` The script project's Drive ID. |\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### 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)."]]