Skip to main content
Request the PDF preview of a shared document's file

Path Parameters

hash
string
required

Hash of the office file to preview. It has to be one of the files this share gives access to.

Minimum string length: 1
Pattern: ^[a-z0-9]+$
Example:

"s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj"

Query Parameters

otp
string

Authorization password for the share token. Required if the share is protected.

Example:

"553827"

shareToken
string
required

Share token used to access the shared resource.

Minimum string length: 1
Pattern: ^[A-Za-z0-9._-]+$
Example:

"cir_82c5fa30d26bc.WBv2Jc8lXo3pQ9rT5uYhZaEwSdFgHjKmNbVcXzLqRt0"

tenant
string

Tenant the share belongs to. It only has to be given when neither the share token nor the address the request arrives on says which one it is.

Pattern: ^[a-z0-9]+$
Example:

"default"

Response

Returns where the preview of the file stands.

content
string | null

Identifier of the PDF preview in the binary storage, set once the preview is ready. The preview is a separate stored file and is downloaded like any other file.

Example:

"p7kd2m4s9xq1v8b3n6c0z5w2e7r4t1y9u3i6o8a2s5d7f0g4h1j3k6l9z2x5c8v0b4"

failureReason
enum<string> | null

Why the last attempt to generate the preview failed; empty unless it failed.

  • conversion_error: The converter could not read the file, for example because it is damaged or its content does not match its type.
  • file_too_large: The file is larger than the biggest file a PDF preview is generated for.
  • service_error: The conversion service failed or could not be reached.
  • timeout: The conversion did not finish in time.
Available options:
conversion_error,
file_too_large,
service_error,
timeout,
null
hash
string

Identifier of the file the preview belongs to.

Example:

"as0ia4jdqecwq0u5s1omd9krs4u244ic2n2545kyhyat9imkwyg1bgec16r94tth"

status
enum<string> | null

Where generating the preview stands.

  • failed_irrecoverable: The file cannot be turned into a PDF preview - its content was rejected or it is too large - and it is not tried again.
  • failed_recoverable: The last attempt failed for a reason that may pass, such as a timeout or an unavailable conversion service. The next request for the preview tries again once the retry cooldown has passed.
  • finished: The PDF preview is ready and content identifies it.
  • in_progress: The PDF preview is being generated.
Available options:
failed_irrecoverable,
failed_recoverable,
finished,
in_progress,
null
statusDate
string<date-time> | null

When the preview last changed its status - when generating it started, finished or failed.