Skip to content
gist.link ↗

createUpload

Mutation Drive API — POST https://drive.api.gist.link/graphql

Direct-to-bucket upload: returns a presigned PUT the browser uploads to.

drive:mutation:createUpload

The calling IAM key must hold this permission (or a wildcard that covers it: drive:mutation:* or drive:*) and the access token must have been minted with audience=drive. See Permissions.

type Mutation {
createUpload(input: CreateUploadInput!): UploadTicket!
}
Argument Type Required Description
input CreateUploadInput! Yes —

UploadTicket! — see the Drive types reference.

Terminal window
curl https://drive.api.gist.link/graphql \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H 'Content-Type: application/json' \
-d @- <<'JSON'
{
"query": "mutation CreateUpload($input: CreateUploadInput!) { createUpload(input: $input) { uploadUrl headers node { id type name status } } }",
"variables": {
"input": {
"name": "Example"
}
}
}
JSON