Bundle Notifications

A BundleNotification is an E-Mail sent out to users when certain actions are performed on or within a shared set of files and folders.

SDK Function

BundleNotification.list()

Return Object

ListIterator<BundleNotification>

Authorization Requirement

Available to all authenticated keys or sessions.

Function Arguments

ArgumentDescription
user_id
int64
User ID. Provide a value of 0 to operate the current session's user.
bundle_id
int64
Bundle ID

Additional Arguments

Example Request

import com.files.ListIterator;
import com.files.exceptions.*;
import com.files.exceptions.ApiErrorException.*;
import com.files.models.BundleNotification;

try {
  HashMap<String, Object> parameters = new HashMap<>();
  parameters.put("user_id", 1);
  
  ListIterator<BundleNotification> bundleNotifications = BundleNotification.list(parameters);
  for (BundleNotification bundleNotification : bundleNotifications.listAutoPaging()) {
    // Operate on bundleNotification
  }
} catch (NotAuthenticatedException e) {
  System.out.println("Authentication Error Occurred (" + e.getClass().getName() + "): " + e.getMessage());
} catch (SdkException e) {
  System.out.println("Unknown Error Occurred (" + e.getClass().getName() + "): " + e.getMessage());
}

SDK Function

BundleNotification.find()

Return Object

BundleNotification

Authorization Requirement

Available to all authenticated keys or sessions.

Function Arguments

ArgumentDescription
id
int64
Required
Bundle Notification ID.

Example Request

import com.files.exceptions.*;
import com.files.exceptions.ApiErrorException.*;
import com.files.models.BundleNotification;

try {
  HashMap<String, Object> parameters = new HashMap<>();
  BundleNotification bundleNotification = BundleNotification.find(id, parameters);
  // Operate on bundleNotification
} catch (NotAuthenticatedException e) {
  System.out.println("Authentication Error Occurred (" + e.getClass().getName() + "): " + e.getMessage());
} catch (SdkException e) {
  System.out.println("Unknown Error Occurred (" + e.getClass().getName() + "): " + e.getMessage());
}

SDK Function

BundleNotification.create()

Return Object

BundleNotification

Authorization Requirement

Available to all authenticated keys or sessions.

Function Arguments

ArgumentDefaultDescription
user_id
int64
User ID. Provide a value of 0 to operate the current session's user.
bundle_id
int64
Required
Bundle ID to notify on
notify_user_id
int64
The id of the user to notify.
notify_on_registration
boolean
falseTriggers bundle notification when a registration action occurs for it.
notify_on_upload
boolean
falseTriggers bundle notification when a upload action occurs for it.

Example Request

import com.files.exceptions.*;
import com.files.exceptions.ApiErrorException.*;
import com.files.models.BundleNotification;

try {
  HashMap<String, Object> parameters = new HashMap<>();
  parameters.put("bundle_id", 1);
  
  BundleNotification bundleNotification = BundleNotification.create(parameters);
  // Operate on bundleNotification
} catch (NotAuthenticatedException e) {
  System.out.println("Authentication Error Occurred (" + e.getClass().getName() + "): " + e.getMessage());
} catch (SdkException e) {
  System.out.println("Unknown Error Occurred (" + e.getClass().getName() + "): " + e.getMessage());
}

SDK Function

bundleNotification.update();

Return Object

BundleNotification

Authorization Requirement

Available to all authenticated keys or sessions.

Attribute Setters

SetterDescription
setNotifyOnRegistration
boolean
Triggers bundle notification when a registration action occurs for it.
setNotifyOnUpload
boolean
Triggers bundle notification when a upload action occurs for it.

Example Request

import com.files.exceptions.*;
import com.files.exceptions.ApiErrorException.*;
import com.files.models.BundleNotification;

try {
  // Find the bundleNotification object by its id.
  BundleNotification bundleNotification = BundleNotification.find(id, null);
  HashMap<String, Object> parameters = new HashMap<>();
  parameters.put("notify_on_registration", true);
  bundleNotification.update(parameters);
} catch (NotAuthenticatedException e) {
  System.out.println("Authentication Error Occurred (" + e.getClass().getName() + "): " + e.getMessage());
} catch (SdkException e) {
  System.out.println("Unknown Error Occurred (" + e.getClass().getName() + "): " + e.getMessage());
}

SDK Function

bundleNotification.delete();

Return Object

No return value.

Authorization Requirement

Available to all authenticated keys or sessions.

Example Request

import com.files.exceptions.*;
import com.files.exceptions.ApiErrorException.*;
import com.files.models.BundleNotification;

try {
  // Find the bundleNotification object by its id.
  BundleNotification bundleNotification = BundleNotification.find(id, null);
  bundleNotification.delete(null);
} catch (NotAuthenticatedException e) {
  System.out.println("Authentication Error Occurred (" + e.getClass().getName() + "): " + e.getMessage());
} catch (SdkException e) {
  System.out.println("Unknown Error Occurred (" + e.getClass().getName() + "): " + e.getMessage());
}

The BundleNotification Object

Some of the functions above return a BundleNotification object. The attributes of this object are listed below.

AttributeDescription
bundle_id
int64
Bundle ID to notify on
id
int64
Bundle Notification ID
notify_on_registration
boolean
Triggers bundle notification when a registration action occurs for it.
notify_on_upload
boolean
Triggers bundle notification when a upload action occurs for it.
notify_current_user
boolean
Is the current user the user to notify?
notify_user_id
int64
The id of the user to notify.
workspace_id
int64
Workspace ID. 0 means the default workspace.