Skip to content
gist.link ↗

restoreVersion

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

The restoreVersion mutation on the Drive API.

drive:mutation:restoreVersion

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 {
restoreVersion(nodeId: Int!, versionId: Int!): Node!
}
Argument Type Required Description
nodeId Int! Yes —
versionId Int! Yes —

Node! — 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 RestoreVersion($nodeId: Int!, $versionId: Int!) { restoreVersion(nodeId: $nodeId, versionId: $versionId) { id type name status } }",
"variables": {
"nodeId": 10,
"versionId": 10
}
}
JSON