Restore upload

restoreUpload(input: RestoreUploadInput!): RestoreUploadPayload!

Requires project.uploads.write.

Arguments

ArgumentTypeRequired
inputRestoreUploadInput!Yes

Input fields

input

RestoreUploadInput

FieldTypeRequiredDescription
projectReferenceStringNoProject UUID, slug or configured domain. Omission does not select the context project.
uploadReferenceStringNoUpload UUID selects that exact row; raw project-relative path selects an active row first, otherwise latest deletion then descending UUID. Active rows are rejected. No deletion-age cutoff is enforced; stored content availability is not checked. Requires upload write and path edit access.
uploadIdStringNoAnother spelling of uploadReference. Send one of the two.

Response

Returns RestoreUploadPayload!. Open the type for its fields and nested types.

FieldTypeDescription
successBoolean!Whether restoration was successful
fileUploadedFileRestored file info
errorStringError message if restoration failed
idIDUpload UUID; null when the mutation failed.
pathStringProject-relative upload path.
fileNameStringFile name from the upload record.
contentTypeStringStored MIME type, or null when unspecified.
sizeBytesFloatFile size in bytes.

All fields of RestoreUploadPayload.

Types marked with ! cannot be null. Lists use [Type] notation. The type index lists all published input and response types.

Example

graphql
mutation RestoreUpload($input: RestoreUploadInput!) {
  restoreUpload(input: $input) {
    id
    status
    createdAt
    updatedAt
    contentType
  }
}
json
{
  "input": {
    "projectReference": "00000000-0000-4000-8000-000000000001"
  }
}