Get a file in an alternate format
Make a File Request
to retrieve a file in an alternate format. The server will respond with the appropriate content.
URL: /api/file/
Method: POST
Content-Type: application/json
File Request
Attribute | Description |
---|---|
docID number |
The document ID of the document in the index. Default 1 |
hits array |
Array of word offsets used for hit highlighting. Hits are retrieved in a SearchResponse Default empty array. |
index string |
The name of the index the file belongs to. |
retrieveAs number |
Enumeration value of Retrieve Option. The RetrieveAs value controls the content-type of the response. Default 8 |
beforeHit string |
Text to insert before hits in the document. Default <span class='dts-hit' data-this='%%ThisHit%%' data-next='%%NextHit%%' data-previous='%%PrevHit%%'> |
afterHit string |
Text to insert after hits in the document. Default </span> |
docTypeTag string |
For html documents, the DocType to insert at the top of the document. Default <!DOCTYPE html> |
htmlHead string |
Text to insert in HTML Head. Default No text |
RetrieveAs
Value | Description |
---|---|
1 | Convert to UTF-8 Plaintext. |
2 | Convert to HTML with no text formatting. |
3 | Convert to HTML with no text formatting and all JavaScript removed. |
7 | Convert to HTML with formatting such as paragraphs etc. |
8 | Convert to HTML with formatting such as paragraphs, and Javascript Removed. |
Last update: June 21, 2020