TanqoryDocs

tanqoryExtFileVersionRestore

  • Mutation
  • Content and shop

Gives the file a kept version's content again, with the same checks as fileUpdate originalSource (the content is scanned and counted against the plan's storage limit). The content it replaces is kept as a version in turn.

Arguments

ArgumentTypeRequiredDefault
fileIdID!Required
versionIdID!Required

Returns

TanqoryExtFileVersionRestorePayload

FieldTypeDescription
fileFile

The file with the version's content.

userErrors[TanqoryExtMediaLibraryUserError!]!

Example request

A starting point: required arguments as variables and a few fields of the result. Replace the placeholders.

Set STORE_ID and TANQORY_ACCESS_TOKEN in your environment first (Make your first API call).

curl
curl -X POST "https://api.tanqory.com/admin/2026-10/stores/$STORE_ID/graphql" \
  -H "Authorization: Bearer $TANQORY_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  --data '{"query":"mutation TanqoryExtFileVersionRestore($fileId: ID!, $versionId: ID!) {\n  tanqoryExtFileVersionRestore(fileId: $fileId, versionId: $versionId) {\n    userErrors {\n      code\n      field\n      message\n    }\n  }\n}","variables":{"fileId":"gid://tanqory/Type/id","versionId":"gid://tanqory/Type/id"}}'

Built from commit 0cac88ece6de · API version 2026-10