public class FileVersionsManager extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
FileVersionsManager.Builder |
| Modifier and Type | Field and Description |
|---|---|
Authentication |
auth |
NetworkSession |
networkSession |
| Modifier | Constructor and Description |
|---|---|
|
FileVersionsManager() |
protected |
FileVersionsManager(FileVersionsManager.Builder builder) |
| Modifier and Type | Method and Description |
|---|---|
void |
deleteFileVersionById(String fileId,
String fileVersionId)
Move a file version to the trash.
|
void |
deleteFileVersionById(String fileId,
String fileVersionId,
DeleteFileVersionByIdHeaders headers)
Move a file version to the trash.
|
Authentication |
getAuth() |
FileVersionFull |
getFileVersionById(String fileId,
String fileVersionId)
Retrieve a specific version of a file.
|
FileVersionFull |
getFileVersionById(String fileId,
String fileVersionId,
GetFileVersionByIdHeaders headers)
Retrieve a specific version of a file.
|
FileVersionFull |
getFileVersionById(String fileId,
String fileVersionId,
GetFileVersionByIdQueryParams queryParams)
Retrieve a specific version of a file.
|
FileVersionFull |
getFileVersionById(String fileId,
String fileVersionId,
GetFileVersionByIdQueryParams queryParams,
GetFileVersionByIdHeaders headers)
Retrieve a specific version of a file.
|
FileVersions |
getFileVersions(String fileId)
Retrieve a list of the past versions for a file.
|
FileVersions |
getFileVersions(String fileId,
GetFileVersionsHeaders headers)
Retrieve a list of the past versions for a file.
|
FileVersions |
getFileVersions(String fileId,
GetFileVersionsQueryParams queryParams)
Retrieve a list of the past versions for a file.
|
FileVersions |
getFileVersions(String fileId,
GetFileVersionsQueryParams queryParams,
GetFileVersionsHeaders headers)
Retrieve a list of the past versions for a file.
|
NetworkSession |
getNetworkSession() |
FileVersionFull |
promoteFileVersion(String fileId)
Promote a specific version of a file.
|
FileVersionFull |
promoteFileVersion(String fileId,
PromoteFileVersionHeaders headers)
Promote a specific version of a file.
|
FileVersionFull |
promoteFileVersion(String fileId,
PromoteFileVersionQueryParams queryParams)
Promote a specific version of a file.
|
FileVersionFull |
promoteFileVersion(String fileId,
PromoteFileVersionQueryParams queryParams,
PromoteFileVersionHeaders headers)
Promote a specific version of a file.
|
FileVersionFull |
promoteFileVersion(String fileId,
PromoteFileVersionRequestBody requestBody)
Promote a specific version of a file.
|
FileVersionFull |
promoteFileVersion(String fileId,
PromoteFileVersionRequestBody requestBody,
PromoteFileVersionHeaders headers)
Promote a specific version of a file.
|
FileVersionFull |
promoteFileVersion(String fileId,
PromoteFileVersionRequestBody requestBody,
PromoteFileVersionQueryParams queryParams)
Promote a specific version of a file.
|
FileVersionFull |
promoteFileVersion(String fileId,
PromoteFileVersionRequestBody requestBody,
PromoteFileVersionQueryParams queryParams,
PromoteFileVersionHeaders headers)
Promote a specific version of a file.
|
FileVersionFull |
updateFileVersionById(String fileId,
String fileVersionId)
Restores a specific version of a file after it was deleted.
|
FileVersionFull |
updateFileVersionById(String fileId,
String fileVersionId,
UpdateFileVersionByIdHeaders headers)
Restores a specific version of a file after it was deleted.
|
FileVersionFull |
updateFileVersionById(String fileId,
String fileVersionId,
UpdateFileVersionByIdRequestBody requestBody)
Restores a specific version of a file after it was deleted.
|
FileVersionFull |
updateFileVersionById(String fileId,
String fileVersionId,
UpdateFileVersionByIdRequestBody requestBody,
UpdateFileVersionByIdHeaders headers)
Restores a specific version of a file after it was deleted.
|
public Authentication auth
public NetworkSession networkSession
public FileVersionsManager()
protected FileVersionsManager(FileVersionsManager.Builder builder)
public FileVersions getFileVersions(String fileId)
Versions are only tracked by Box users with premium accounts. To fetch the ID of the current version of a file, use the `GET /file/:id` API.
fileId - The unique identifier that represents a file.
The ID for any file can be determined by visiting a file in the web application and copying the ID from the URL. For example, for the URL `https://*.app.box.com/files/123` the `file_id` is `123`. Example: "12345"
public FileVersions getFileVersions(String fileId, GetFileVersionsQueryParams queryParams)
Versions are only tracked by Box users with premium accounts. To fetch the ID of the current version of a file, use the `GET /file/:id` API.
fileId - The unique identifier that represents a file.
The ID for any file can be determined by visiting a file in the web application and copying the ID from the URL. For example, for the URL `https://*.app.box.com/files/123` the `file_id` is `123`. Example: "12345"
queryParams - Query parameters of getFileVersions methodpublic FileVersions getFileVersions(String fileId, GetFileVersionsHeaders headers)
Versions are only tracked by Box users with premium accounts. To fetch the ID of the current version of a file, use the `GET /file/:id` API.
fileId - The unique identifier that represents a file.
The ID for any file can be determined by visiting a file in the web application and copying the ID from the URL. For example, for the URL `https://*.app.box.com/files/123` the `file_id` is `123`. Example: "12345"
headers - Headers of getFileVersions methodpublic FileVersions getFileVersions(String fileId, GetFileVersionsQueryParams queryParams, GetFileVersionsHeaders headers)
Versions are only tracked by Box users with premium accounts. To fetch the ID of the current version of a file, use the `GET /file/:id` API.
fileId - The unique identifier that represents a file.
The ID for any file can be determined by visiting a file in the web application and copying the ID from the URL. For example, for the URL `https://*.app.box.com/files/123` the `file_id` is `123`. Example: "12345"
queryParams - Query parameters of getFileVersions methodheaders - Headers of getFileVersions methodpublic FileVersionFull getFileVersionById(String fileId, String fileVersionId)
Versions are only tracked for Box users with premium accounts.
fileId - The unique identifier that represents a file.
The ID for any file can be determined by visiting a file in the web application and copying the ID from the URL. For example, for the URL `https://*.app.box.com/files/123` the `file_id` is `123`. Example: "12345"
fileVersionId - The ID of the file version. Example: "1234"public FileVersionFull getFileVersionById(String fileId, String fileVersionId, GetFileVersionByIdQueryParams queryParams)
Versions are only tracked for Box users with premium accounts.
fileId - The unique identifier that represents a file.
The ID for any file can be determined by visiting a file in the web application and copying the ID from the URL. For example, for the URL `https://*.app.box.com/files/123` the `file_id` is `123`. Example: "12345"
fileVersionId - The ID of the file version. Example: "1234"queryParams - Query parameters of getFileVersionById methodpublic FileVersionFull getFileVersionById(String fileId, String fileVersionId, GetFileVersionByIdHeaders headers)
Versions are only tracked for Box users with premium accounts.
fileId - The unique identifier that represents a file.
The ID for any file can be determined by visiting a file in the web application and copying the ID from the URL. For example, for the URL `https://*.app.box.com/files/123` the `file_id` is `123`. Example: "12345"
fileVersionId - The ID of the file version. Example: "1234"headers - Headers of getFileVersionById methodpublic FileVersionFull getFileVersionById(String fileId, String fileVersionId, GetFileVersionByIdQueryParams queryParams, GetFileVersionByIdHeaders headers)
Versions are only tracked for Box users with premium accounts.
fileId - The unique identifier that represents a file.
The ID for any file can be determined by visiting a file in the web application and copying the ID from the URL. For example, for the URL `https://*.app.box.com/files/123` the `file_id` is `123`. Example: "12345"
fileVersionId - The ID of the file version. Example: "1234"queryParams - Query parameters of getFileVersionById methodheaders - Headers of getFileVersionById methodpublic void deleteFileVersionById(String fileId, String fileVersionId)
Versions are only tracked for Box users with premium accounts.
fileId - The unique identifier that represents a file.
The ID for any file can be determined by visiting a file in the web application and copying the ID from the URL. For example, for the URL `https://*.app.box.com/files/123` the `file_id` is `123`. Example: "12345"
fileVersionId - The ID of the file version. Example: "1234"public void deleteFileVersionById(String fileId, String fileVersionId, DeleteFileVersionByIdHeaders headers)
Versions are only tracked for Box users with premium accounts.
fileId - The unique identifier that represents a file.
The ID for any file can be determined by visiting a file in the web application and copying the ID from the URL. For example, for the URL `https://*.app.box.com/files/123` the `file_id` is `123`. Example: "12345"
fileVersionId - The ID of the file version. Example: "1234"headers - Headers of deleteFileVersionById methodpublic FileVersionFull updateFileVersionById(String fileId, String fileVersionId)
fileId - The unique identifier that represents a file.
The ID for any file can be determined by visiting a file in the web application and copying the ID from the URL. For example, for the URL `https://*.app.box.com/files/123` the `file_id` is `123`. Example: "12345"
fileVersionId - The ID of the file version. Example: "1234"public FileVersionFull updateFileVersionById(String fileId, String fileVersionId, UpdateFileVersionByIdRequestBody requestBody)
fileId - The unique identifier that represents a file.
The ID for any file can be determined by visiting a file in the web application and copying the ID from the URL. For example, for the URL `https://*.app.box.com/files/123` the `file_id` is `123`. Example: "12345"
fileVersionId - The ID of the file version. Example: "1234"requestBody - Request body of updateFileVersionById methodpublic FileVersionFull updateFileVersionById(String fileId, String fileVersionId, UpdateFileVersionByIdHeaders headers)
fileId - The unique identifier that represents a file.
The ID for any file can be determined by visiting a file in the web application and copying the ID from the URL. For example, for the URL `https://*.app.box.com/files/123` the `file_id` is `123`. Example: "12345"
fileVersionId - The ID of the file version. Example: "1234"headers - Headers of updateFileVersionById methodpublic FileVersionFull updateFileVersionById(String fileId, String fileVersionId, UpdateFileVersionByIdRequestBody requestBody, UpdateFileVersionByIdHeaders headers)
fileId - The unique identifier that represents a file.
The ID for any file can be determined by visiting a file in the web application and copying the ID from the URL. For example, for the URL `https://*.app.box.com/files/123` the `file_id` is `123`. Example: "12345"
fileVersionId - The ID of the file version. Example: "1234"requestBody - Request body of updateFileVersionById methodheaders - Headers of updateFileVersionById methodpublic FileVersionFull promoteFileVersion(String fileId)
If previous versions exist, this method can be used to promote one of the older versions to the top of the version history.
This creates a new copy of the old version and puts it at the top of the versions history. The file will have the exact same contents as the older version, with the same hash digest, `etag`, and name as the original.
Other properties such as comments do not get updated to their former values.
Don't use this endpoint to restore Box Notes, as it works with file formats such as PDF, DOC, PPTX or similar.
fileId - The unique identifier that represents a file.
The ID for any file can be determined by visiting a file in the web application and copying the ID from the URL. For example, for the URL `https://*.app.box.com/files/123` the `file_id` is `123`. Example: "12345"
public FileVersionFull promoteFileVersion(String fileId, PromoteFileVersionRequestBody requestBody)
If previous versions exist, this method can be used to promote one of the older versions to the top of the version history.
This creates a new copy of the old version and puts it at the top of the versions history. The file will have the exact same contents as the older version, with the same hash digest, `etag`, and name as the original.
Other properties such as comments do not get updated to their former values.
Don't use this endpoint to restore Box Notes, as it works with file formats such as PDF, DOC, PPTX or similar.
fileId - The unique identifier that represents a file.
The ID for any file can be determined by visiting a file in the web application and copying the ID from the URL. For example, for the URL `https://*.app.box.com/files/123` the `file_id` is `123`. Example: "12345"
requestBody - Request body of promoteFileVersion methodpublic FileVersionFull promoteFileVersion(String fileId, PromoteFileVersionQueryParams queryParams)
If previous versions exist, this method can be used to promote one of the older versions to the top of the version history.
This creates a new copy of the old version and puts it at the top of the versions history. The file will have the exact same contents as the older version, with the same hash digest, `etag`, and name as the original.
Other properties such as comments do not get updated to their former values.
Don't use this endpoint to restore Box Notes, as it works with file formats such as PDF, DOC, PPTX or similar.
fileId - The unique identifier that represents a file.
The ID for any file can be determined by visiting a file in the web application and copying the ID from the URL. For example, for the URL `https://*.app.box.com/files/123` the `file_id` is `123`. Example: "12345"
queryParams - Query parameters of promoteFileVersion methodpublic FileVersionFull promoteFileVersion(String fileId, PromoteFileVersionRequestBody requestBody, PromoteFileVersionQueryParams queryParams)
If previous versions exist, this method can be used to promote one of the older versions to the top of the version history.
This creates a new copy of the old version and puts it at the top of the versions history. The file will have the exact same contents as the older version, with the same hash digest, `etag`, and name as the original.
Other properties such as comments do not get updated to their former values.
Don't use this endpoint to restore Box Notes, as it works with file formats such as PDF, DOC, PPTX or similar.
fileId - The unique identifier that represents a file.
The ID for any file can be determined by visiting a file in the web application and copying the ID from the URL. For example, for the URL `https://*.app.box.com/files/123` the `file_id` is `123`. Example: "12345"
requestBody - Request body of promoteFileVersion methodqueryParams - Query parameters of promoteFileVersion methodpublic FileVersionFull promoteFileVersion(String fileId, PromoteFileVersionHeaders headers)
If previous versions exist, this method can be used to promote one of the older versions to the top of the version history.
This creates a new copy of the old version and puts it at the top of the versions history. The file will have the exact same contents as the older version, with the same hash digest, `etag`, and name as the original.
Other properties such as comments do not get updated to their former values.
Don't use this endpoint to restore Box Notes, as it works with file formats such as PDF, DOC, PPTX or similar.
fileId - The unique identifier that represents a file.
The ID for any file can be determined by visiting a file in the web application and copying the ID from the URL. For example, for the URL `https://*.app.box.com/files/123` the `file_id` is `123`. Example: "12345"
headers - Headers of promoteFileVersion methodpublic FileVersionFull promoteFileVersion(String fileId, PromoteFileVersionRequestBody requestBody, PromoteFileVersionHeaders headers)
If previous versions exist, this method can be used to promote one of the older versions to the top of the version history.
This creates a new copy of the old version and puts it at the top of the versions history. The file will have the exact same contents as the older version, with the same hash digest, `etag`, and name as the original.
Other properties such as comments do not get updated to their former values.
Don't use this endpoint to restore Box Notes, as it works with file formats such as PDF, DOC, PPTX or similar.
fileId - The unique identifier that represents a file.
The ID for any file can be determined by visiting a file in the web application and copying the ID from the URL. For example, for the URL `https://*.app.box.com/files/123` the `file_id` is `123`. Example: "12345"
requestBody - Request body of promoteFileVersion methodheaders - Headers of promoteFileVersion methodpublic FileVersionFull promoteFileVersion(String fileId, PromoteFileVersionQueryParams queryParams, PromoteFileVersionHeaders headers)
If previous versions exist, this method can be used to promote one of the older versions to the top of the version history.
This creates a new copy of the old version and puts it at the top of the versions history. The file will have the exact same contents as the older version, with the same hash digest, `etag`, and name as the original.
Other properties such as comments do not get updated to their former values.
Don't use this endpoint to restore Box Notes, as it works with file formats such as PDF, DOC, PPTX or similar.
fileId - The unique identifier that represents a file.
The ID for any file can be determined by visiting a file in the web application and copying the ID from the URL. For example, for the URL `https://*.app.box.com/files/123` the `file_id` is `123`. Example: "12345"
queryParams - Query parameters of promoteFileVersion methodheaders - Headers of promoteFileVersion methodpublic FileVersionFull promoteFileVersion(String fileId, PromoteFileVersionRequestBody requestBody, PromoteFileVersionQueryParams queryParams, PromoteFileVersionHeaders headers)
If previous versions exist, this method can be used to promote one of the older versions to the top of the version history.
This creates a new copy of the old version and puts it at the top of the versions history. The file will have the exact same contents as the older version, with the same hash digest, `etag`, and name as the original.
Other properties such as comments do not get updated to their former values.
Don't use this endpoint to restore Box Notes, as it works with file formats such as PDF, DOC, PPTX or similar.
fileId - The unique identifier that represents a file.
The ID for any file can be determined by visiting a file in the web application and copying the ID from the URL. For example, for the URL `https://*.app.box.com/files/123` the `file_id` is `123`. Example: "12345"
requestBody - Request body of promoteFileVersion methodqueryParams - Query parameters of promoteFileVersion methodheaders - Headers of promoteFileVersion methodpublic Authentication getAuth()
public NetworkSession getNetworkSession()