Requests

A Request is a file that should be uploaded by a specific user or group.

Requests can either be manually created and managed, or managed automatically by an Automation.

List Requests

SDK Method

files_sdk.request.list()

Return Object

ListObj[Request]

Authorization Requirement

Available to all authenticated keys or sessions.

Method Arguments

ArgumentDescription
mine
boolean
Only show requests of the current user? (Defaults to true if current user is not a site admin.)
path
string
Path to show requests for. If omitted, shows all paths. Send / to represent the root directory.

Additional Arguments

Example Request

import files_sdk

try:
  requests = files_sdk.request.list({
    "mine": False
  })
  for request in requests.auto_paging_iter():
    # Operate on request
except files_sdk.error.NotAuthenticatedError as err:
  print(f"Authentication Error Occurred ({type(err).__name__}):", err)
except files_sdk.error.Error as err:
  print(f"Unknown Error Occurred ({type(err).__name__}):", err)

List Requests

SDK Method

files_sdk.request.get_folder()

Return Object

ListObj[Request]

Authorization Requirement

Available to all authenticated keys or sessions.

Method Arguments

ArgumentDescription
mine
boolean
Only show requests of the current user? (Defaults to true if current user is not a site admin.)
path
string
Required
Path to show requests for. If omitted, shows all paths. Send / to represent the root directory.

Additional Arguments

Example Request

import files_sdk

try:
  requests = files_sdk.request.get_folder(path, {
    "mine": False
  })
  for request in requests.auto_paging_iter():
    # Operate on request
except files_sdk.error.NotAuthenticatedError as err:
  print(f"Authentication Error Occurred ({type(err).__name__}):", err)
except files_sdk.error.Error as err:
  print(f"Unknown Error Occurred ({type(err).__name__}):", err)

Create Request

SDK Method

files_sdk.request.create()

Return Object

Request

Authorization Requirement

Available to all authenticated keys or sessions.

Method Arguments

ArgumentDescription
path
string
Required
Folder path on which to request the file.
destination
string
Required
Destination filename (without extension) to request.
user_ids
string
A list of user IDs to request the file from. If sent as a string, it should be comma-delimited.
group_ids
string
A list of group IDs to request the file from. If sent as a string, it should be comma-delimited.

Example Request

import files_sdk

try:
  request = files_sdk.request.create({
    "path": "path",
    "destination": "destination"
  })
  # Operate on request
except files_sdk.error.NotAuthenticatedError as err:
  print(f"Authentication Error Occurred ({type(err).__name__}):", err)
except files_sdk.error.Error as err:
  print(f"Unknown Error Occurred ({type(err).__name__}):", err)

Delete Request

SDK Method

request.delete()

Return Object

No return value.

Authorization Requirement

Available to all authenticated keys or sessions.

Example Request

import files_sdk

try:
  request = files_sdk.request.list.first
  request.delete()
except files_sdk.error.NotAuthenticatedError as err:
  print(f"Authentication Error Occurred ({type(err).__name__}):", err)
except files_sdk.error.Error as err:
  print(f"Unknown Error Occurred ({type(err).__name__}):", err)

The Request Object

Some of the methods above return a Request object. The attributes of this object are listed below.

AttributeDescription
id
int64
Request ID
path
string
Folder path. This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
source
string
Source filename, if applicable
destination
string
Destination filename
automation_id
int64
ID of automation that created request
user_display_name
string
User making the request (if applicable)