Retrieves the information about a file request.
This operation is performed by calling function get_file_request_by_id
.
See the endpoint docs at API Reference.
client.file_requests.get_file_request_by_id(file_request_id)
- file_request_id
str
- The unique identifier that represent a file request. The ID for any file request can be determined by visiting a file request builder in the web application and copying the ID from the URL. For example, for the URL
https://*.app.box.com/filerequest/123
thefile_request_id
is123
. Example: "123"
- The unique identifier that represent a file request. The ID for any file request can be determined by visiting a file request builder in the web application and copying the ID from the URL. For example, for the URL
- extra_headers
Optional[Dict[str, Optional[str]]]
- Extra headers that will be included in the HTTP request.
This function returns a value of type FileRequest
.
Returns a file request object.
Updates a file request. This can be used to activate or deactivate a file request.
This operation is performed by calling function update_file_request_by_id
.
See the endpoint docs at API Reference.
client.file_requests.update_file_request_by_id(
copied_file_request.id, title="updated title", description="updated description"
)
- file_request_id
str
- The unique identifier that represent a file request. The ID for any file request can be determined by visiting a file request builder in the web application and copying the ID from the URL. For example, for the URL
https://*.app.box.com/filerequest/123
thefile_request_id
is123
. Example: "123"
- The unique identifier that represent a file request. The ID for any file request can be determined by visiting a file request builder in the web application and copying the ID from the URL. For example, for the URL
- title
Optional[str]
- An optional new title for the file request. This can be used to change the title of the file request. This will default to the value on the existing file request.
- description
Optional[str]
- An optional new description for the file request. This can be used to change the description of the file request. This will default to the value on the existing file request.
- status
Optional[UpdateFileRequestByIdStatus]
- An optional new status of the file request. When the status is set to
inactive
, the file request will no longer accept new submissions, and any visitor to the file request URL will receive aHTTP 404
status code. This will default to the value on the existing file request.
- An optional new status of the file request. When the status is set to
- is_email_required
Optional[bool]
- Whether a file request submitter is required to provide their email address. When this setting is set to true, the Box UI will show an email field on the file request form. This will default to the value on the existing file request.
- is_description_required
Optional[bool]
- Whether a file request submitter is required to provide a description of the files they are submitting. When this setting is set to true, the Box UI will show a description field on the file request form. This will default to the value on the existing file request.
- expires_at
Optional[DateTime]
- The date after which a file request will no longer accept new submissions. After this date, the
status
will automatically be set toinactive
. This will default to the value on the existing file request.
- The date after which a file request will no longer accept new submissions. After this date, the
- if_match
Optional[str]
- Ensures this item hasn't recently changed before making changes. Pass in the item's last observed
etag
value into this header and the endpoint will fail with a412 Precondition Failed
if it has changed since.
- Ensures this item hasn't recently changed before making changes. Pass in the item's last observed
- extra_headers
Optional[Dict[str, Optional[str]]]
- Extra headers that will be included in the HTTP request.
This function returns a value of type FileRequest
.
Returns the updated file request object.
Deletes a file request permanently.
This operation is performed by calling function delete_file_request_by_id
.
See the endpoint docs at API Reference.
client.file_requests.delete_file_request_by_id(updated_file_request.id)
- file_request_id
str
- The unique identifier that represent a file request. The ID for any file request can be determined by visiting a file request builder in the web application and copying the ID from the URL. For example, for the URL
https://*.app.box.com/filerequest/123
thefile_request_id
is123
. Example: "123"
- The unique identifier that represent a file request. The ID for any file request can be determined by visiting a file request builder in the web application and copying the ID from the URL. For example, for the URL
- extra_headers
Optional[Dict[str, Optional[str]]]
- Extra headers that will be included in the HTTP request.
This function returns a value of type None
.
Returns an empty response when the file request has been successfully deleted.
Copies an existing file request that is already present on one folder, and applies it to another folder.
This operation is performed by calling function create_file_request_copy
.
See the endpoint docs at API Reference.
client.file_requests.create_file_request_copy(
file_request_id,
CreateFileRequestCopyFolder(
id=file_request.folder.id, type=CreateFileRequestCopyFolderTypeField.FOLDER
),
)
- file_request_id
str
- The unique identifier that represent a file request. The ID for any file request can be determined by visiting a file request builder in the web application and copying the ID from the URL. For example, for the URL
https://*.app.box.com/filerequest/123
thefile_request_id
is123
. Example: "123"
- The unique identifier that represent a file request. The ID for any file request can be determined by visiting a file request builder in the web application and copying the ID from the URL. For example, for the URL
- folder
CreateFileRequestCopyFolder
- The folder to associate the new file request to.
- title
Optional[str]
- An optional new title for the file request. This can be used to change the title of the file request. This will default to the value on the existing file request.
- description
Optional[str]
- An optional new description for the file request. This can be used to change the description of the file request. This will default to the value on the existing file request.
- status
Optional[CreateFileRequestCopyStatus]
- An optional new status of the file request. When the status is set to
inactive
, the file request will no longer accept new submissions, and any visitor to the file request URL will receive aHTTP 404
status code. This will default to the value on the existing file request.
- An optional new status of the file request. When the status is set to
- is_email_required
Optional[bool]
- Whether a file request submitter is required to provide their email address. When this setting is set to true, the Box UI will show an email field on the file request form. This will default to the value on the existing file request.
- is_description_required
Optional[bool]
- Whether a file request submitter is required to provide a description of the files they are submitting. When this setting is set to true, the Box UI will show a description field on the file request form. This will default to the value on the existing file request.
- expires_at
Optional[DateTime]
- The date after which a file request will no longer accept new submissions. After this date, the
status
will automatically be set toinactive
. This will default to the value on the existing file request.
- The date after which a file request will no longer accept new submissions. After this date, the
- extra_headers
Optional[Dict[str, Optional[str]]]
- Extra headers that will be included in the HTTP request.
This function returns a value of type FileRequest
.
Returns updated file request object.