Generates a set of file IDs which can be provided in insert or copy requests.
HTTP request
GET https://www.googleapis.com/drive/v2/files/generateIds
The URL uses gRPC Transcoding syntax.
Query parameters
| Parameters | |
|---|---|
maxResults
|
Maximum number of IDs to return. |
space
|
The space in which the IDs can be used to create new files. Supported values are |
type
|
The type of items which the IDs can be used for. Supported values are |
Request body
The request body must be empty.
Response body
A list of generated IDs which can be provided in insert requests
If successful, the response body contains data with the following structure:
| JSON representation |
|---|
{ "ids" : [ string ] , "space" : string , "kind" : string } |
| Fields | |
|---|---|
ids[]
|
The IDs generated for the requesting user in the specified space. |
space
|
The type of file that can be created with these IDs. |
kind
|
This is always |
Authorization scopes
Requires one of the following OAuth scopes:
-
https://www.googleapis.com/auth/docs -
https://www.googleapis.com/auth/drive -
https://www.googleapis.com/auth/drive.appdata -
https://www.googleapis.com/auth/drive.file
Some scopes are restricted and require a security assessment for your app to use them. For more information, see the Authorization guide .

