FileVersions
Query the available file versions in the box.
Table Specific Information
File Versions contains information about older versions of a file. This table supports only the SELECT operation.
Select
When selecting from the File Versions view, you must specify FileId, or FileId and Id in the WHERE clause.
SELECT * FROM FileVersions WHERE FileId = '1926408231807';
If you're authenticated as an administrator with user impersonation permissions, you can query file versions from multiple user accounts. For example:
SELECT * FROM FileVersions WHERE AsUserId IN (SELECT Id FROM Users);
Note: User impersonation has the following limitations:
- The authenticated user cannot be impersonated unless that user is a service account.
- If the authenticated user is a standard user account, they can only query file versions associated with their account.
- File versions shared with multiple users are only returned for one of the users.
Columns
| Name | Type | References | Description |
| Id [KEY] | String | The ID of the file version. | |
| FileId | String |
Files.Id | The ID of the file. |
| CreatedAt | Datetime | The date the content of the file was created at. | |
| ModifiedAt | Datetime | The date the content of the file was modified at. | |
| ModifiedById | Integer | The Id of the user that last modified the file. | |
| ModifiedByName | String | The Name of the user that last modified the file. | |
| ModifiedByLogin | String | The Login of the user that last modified the file. | |
| ModifiedByType | String | The Type of the user that last modified the file. | |
| Name | String | The name of the file. | |
| PurgedAt | Datetime | The date the content of the file was purged at. | |
| RestoredAt | Datetime | The date the content of the file was modified at. | |
| RestoredById | Integer | The Id of the user that last modified the file. | |
| RestoredByLogin | String | The Name of the user that last modified the file. | |
| RestoredByName | String | The Login of the user that last modified the file. | |
| RestoredByType | String | The Type of the user that last modified the file. | |
| Sha1 | String | The SHA-1 encryption of the file version. | |
| Size | Integer | The size of the file version. | |
| TrashedAt | Datetime | The date the file version was trashed at. | |
| TrashedById | Integer | The Id of the user that trashed the file. | |
| TrashedByLogin | String | The Name of the user that trashed the file. | |
| TrashedByName | String | The Login of the user that trashed the file. | |
| TrashedByType | String | The Type of the user that trashed the file. | |
| Type | String | Type of file versions. | |
| AsUserId | String | The Id of the user you want to impersonate. Only works with Admin, Co-Admin and Service Accounts. |