--- title: "Files" slug: "files-3" updated: 2025-01-30T19:29:56Z published: 2025-01-30T19:29:56Z canonical: "docs.visualvault.com/files-3" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.visualvault.com/llms.txt > Use this file to discover all available pages before exploring further. # Files #### **GET **/files**** --- > **Download a file using a document search query.** ##### ****Query Parameters**** | Parameter | Type | Description | | --- | --- | --- | | sort | String | The name of a data column to sort by. | | sortDir | String | Sort direction. - asc: Ascending order - desc: Descending order | | q | String | A VisualVault REST API Data Query. | ##### ****Response Codes**** | Code | Description | | --- | --- | | 400 | Bad Request | #### **GET **/files/{id}**** --- > **Download a file by document ID.** ##### ****Route Parameters**** | Parameter | Type | Description | | --- | --- | --- | | id* | Guid | The document id. | #### **POST **/files**** --- > **Upload a file revision from form data.** ##### ****Body Parameters**** | Parameter | Type | Description | | --- | --- | --- | | checkIn | Bool | Check in status of the document. | | checkInDocumentState* | String | Document status. - Unreleased (0) - Released (1) - Pending (2) | | revision* | String | Document revision number. | | fileName | String | The name of the file. | | changeReason* | String | Reason for the change. | | indexFields | String | Index field names and values as a JSON array or object string. | | parameters | {FileParameter} | Optional parameters. | | fileId* | Guid | The ID of the file. | | documentId* | Guid | The ID of the document. | ##### ****Response Codes**** | Code | Description | | --- | --- | | 400 | Bad Request | #### **POST **/files/file**** --- > **Upload a file.** ##### ****Body Parameters**** | Parameter | Type | Description | | --- | --- | --- | | allowNoFile | Bool | Allows a document to be created with no attached file (or a file containing 0 bytes). | | checkIn | String | Check in status. - CheckedIn (0) - CheckedOut (1) | | checkInDocumentState | String | Document status. - Unreleased (0) - Released (1) - Pending (2) | | fileLength | String | Size of the file (in bytes). | | fileName | String | The name of the file. | | revision | String | Document revision number. | | changeReason | String | Reason for the change. | | fileId | Guid | The ID of the file. | | documentId* | Guid | The ID of the document. | | indexFields | {IndexField} | Index field names and values as a JSON array or object string. | ##### ****Response Codes**** | Code | Description | | --- | --- | | 400 | Bad Request |