Method: files.generateIds
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
생성 또는 복사 요청에 제공할 수 있는 파일 ID 집합을 생성합니다. 자세한 내용은 파일 만들기 및 관리를 참고하세요.
HTTP 요청
GET https://www.googleapis.com/drive/v3/files/generateIds
URL은 gRPC 트랜스코딩 구문을 사용합니다.
쿼리 매개변수
매개변수 |
count |
integer
반환할 ID의 수입니다.
|
space |
string
ID를 사용하여 파일을 만들 수 있는 스페이스입니다. 지원되는 값은 drive 및 appDataFolder 입니다. (기본값: drive ) 자세한 내용은 파일 구성을 참고하세요.
|
type |
string
ID를 사용할 수 있는 항목의 유형입니다. 지원되는 값은 files 및 shortcuts 입니다. shortcuts 는 drive space 에서만 지원됩니다. (기본값: files ) 자세한 내용은 파일 구성을 참고하세요.
|
응답 본문
생성된 파일 ID 목록으로, 생성 요청에 제공할 수 있습니다.
성공한 경우 응답 본문은 다음과 같은 구조의 데이터를 포함합니다.
JSON 표현 |
{
"ids": [
string
],
"space": string,
"kind": string
} |
필드 |
ids[] |
string
지정된 스페이스에서 요청하는 사용자를 위해 생성된 ID입니다.
|
space |
string
이 ID로 만들 수 있는 파일의 유형입니다.
|
kind |
string
리소스 종류를 식별합니다. 값: 고정 문자열 "drive#generatedIds" .
|
승인 범위
다음 OAuth 범위 중 하나가 필요합니다.
https://www.googleapis.com/auth/drive
https://www.googleapis.com/auth/drive.appdata
https://www.googleapis.com/auth/drive.file
일부 범위는 제한되어 있으며 앱에서 이를 사용하려면 보안 평가가 필요합니다. 자세한 내용은 승인 가이드를 참고하세요.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-08-27(UTC)
[null,null,["최종 업데이트: 2025-08-27(UTC)"],[],[],null,["# Method: files.generateIds\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n - [JSON representation](#body.GeneratedIds.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nGenerates a set of file IDs which can be provided in create or copy requests.\n\n### HTTP request\n\n`GET https://www.googleapis.com/drive/v3/files/generateIds`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Query parameters\n\n| Parameters ||\n|---------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `count` | `integer` The number of IDs to return. |\n| `space` | `string` The space in which the IDs can be used to create new files. Supported values are 'drive' and 'appDataFolder'. (Default: 'drive') |\n| `type` | `string` The type of items which the IDs can be used for. Supported values are 'files' and 'shortcuts'. Note that 'shortcuts' are only supported in the `drive` 'space'. (Default: 'files') |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nA list of generated file IDs which can be provided in create requests.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|----------------------------------------------------------------|\n| ``` { \"ids\": [ string ], \"space\": string, \"kind\": string } ``` |\n\n| Fields ||\n|---------|----------------------------------------------------------------------------------------------------|\n| `ids[]` | `string` The IDs generated for the requesting user in the specified space. |\n| `space` | `string` The type of file that can be created with these IDs. |\n| `kind` | `string` Identifies what kind of resource this is. Value: the fixed string `\"drive#generatedIds\"`. |\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/drive`\n- `\n https://www.googleapis.com/auth/drive.appdata`\n- `\n https://www.googleapis.com/auth/drive.file`\n\nSome scopes are restricted and require a security assessment for your app to use them. For more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent)."]]