File request objects represent a file request associated with a folder.
- Get a File Request's Information
- Copy a File Request's Information
- Update a File Request's Information
- Delete a File Request
Calling FileRequestsManager.GetFileRequestByIdAsync(string fileRequestId)
returns information on a file request.
BoxFileRequestObject fileRequest = await client.FileRequestsManager.GetFileRequestByIdAsync("12345");
Calling FileRequestsManager.CopyFileRequestAsync(string fileRequestId, BoxFileRequestCopyRequest copyRequest)
copies an existing file request that is already present
on one folder, and applies it to another folder.
var destinationFolder = new BoxRequestEntity
{
Id = "123456",
Type = BoxType.folder
};
var copyRequest = new BoxFileRequestCopyRequest
{
Description = "New file request description",
Folder = destinationFolder
};
BoxFileRequestObject fileRequest = await client.FileRequestsManager.CopyFileRequestAsync("12345", copyRequest);
Calling FileRequestsManager.UpdateFileRequestAsync(string fileRequestId, BoxFileRequestUpdateRequest updateRequest)
updates a file request. This can be used to activate
or deactivate a file request.
var updateRequest = new BoxFileRequestUpdateRequest
{
Description = "New file request description",
Status = BoxFileRequestStatus.inactive
};
BoxFileRequestObject fileRequest = await client.FileRequestsManager.UpdateFileRequestAsync("12345", updateRequest);
Calling FileRequestsManager.DeleteFileRequestAsync(string fileRequestId)
deletes a file request permanently.
bool isSuccess = await client.FileRequestsManager.DeleteFileRequestAsync("12345");