Get File
Download a file in each format asked for: docx (the default), pdf, md or json (its listing) or html, and a comparison's redline also pdf_changed_pages_only (the pages that changed); a workbook or presentation as it is, and a presentation comparison's redline also as pdf. Use it for a version of a document (by its file_id from GET /v1/documents/{document_id}) when the user wants that version's file: to save, send or replace their copy. An edit's or a merge's own result comes from GET /v1/edit/{edit_id} or GET /v1/merge/{merge_id}, and a version's redline from GET /v1/compare/{comparison_id} with its comparison_id. A format still being made is reported in pending_formats: call again to keep waiting. Each downloads[] entry's url serves the file directly and expires after one hour.
To send a document outside the firm without its hidden data, ask for it with clean_metadata. Each downloads[] entry then carries metadata_report: tell the user what was removed (its items) and pass on its warnings. To clean a document the user has as a file, upload it with POST /v1/files first, and a redline by the file.file_id GET /v1/compare/{comparison_id} returned.
To read a long document's md listing before editing it, search for the words and phrases the request names (search, several at once), and read it in parts (max_chars, then next_offset) only when a result was cut off.
Request
- Base URLhttps://api.versionstory.com (the document declares no server; this is the origin it was published from)
- URLhttps://api.versionstory.com/v1/files/{file_id}
- AuthHTTP bearer
Path parameters
Query parameters
docx (default), pdf, md, json, html; repeatable or comma-separated. pdf is the document to show a person, docx the Word file. md and json are the file's content listing, which every edit copies its locators from (GET /v1/reference/listing explains it; components.schemas.StructuredDocument is json's shape): md, the listing to write every edit from, and json, the same listing as structured data. html is the document to embed in a page where the view must be interactive: frame its url in <iframe sandbox="allow-scripts">, with the embed origin and display options in its fragment. A comparison's redline is also served as pdf_changed_pages_only, the pages that changed. A workbook or presentation is served as it is (xlsx, pptx), and a presentation comparison's redline also as pdf.
standard or strict: download each format with its metadata removed. standard removes what nobody sees (properties, revision ids, hidden text, custom XML and the rest); strict also removes comments and speaker notes, accepts tracked changes and anonymizes authors. Each download then carries metadata_report.
With clean_metadata: keep, accept or reject tracked changes; overrides the preset.
With clean_metadata: keep or remove comments; overrides the preset.
With clean_metadata: keep or anonymize authors; overrides the preset.
Words or phrases to find, ignoring case, matched as an edit's text is: returns only the paragraphs holding one, with their indexes, and how many hold each. md only, and not with offset or max_chars.
Where a part starts: 0 (default) or a next_offset. md only.
The most characters a part holds, ending at a paragraph; next_offset is where the next part starts. md only.
Headers
Id of one of your customers (created in the developer dashboard) to attribute this request's credit usage to. Billing and limits stay organization-wide.
Response
Successful Response
Changes
No recorded changes to this operation across all 1 revision of this API.