Pending Work Events

A PendingWorkEvent is a log record for pending file work failures, such as GPG Encryption and GPG Decryption.

List Pending Work Events

SDK Method

\Files\Model\PendingWorkEvent::list;

Return Object

PendingWorkEvent[]

Authorization Requirement

Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

Additional Arguments

Example Request

try {
  $pending_work_events = \Files\Model\PendingWorkEvent::list();
  foreach ($pending_work_events as $pending_work_event) {
    // Operate on $pending_work_event
  }
} catch (\Files\NotAuthenticated\InvalidUsernameOrPasswordException $e) {
  echo 'Authentication Error Occurred (' . get_class($e) . '): ', $e->getMessage(), "\n";
} catch (\Files\FilesException $e) {
  echo 'Unknown Error Occurred (' . get_class($e) . '): ', $e->getMessage(), "\n";
}

Show Pending Work Event

SDK Method

\Files\Model\PendingWorkEvent::find;

Return Object

PendingWorkEvent

Authorization Requirement

Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

Method Arguments

ArgumentDescription
id
int64
Required
Pending Work Event ID.

Example Request

try {
  $pending_work_event = \Files\Model\PendingWorkEvent::find($id);
  // Operate on $pending_work_event
} catch (\Files\NotAuthenticated\InvalidUsernameOrPasswordException $e) {
  echo 'Authentication Error Occurred (' . get_class($e) . '): ', $e->getMessage(), "\n";
} catch (\Files\FilesException $e) {
  echo 'Unknown Error Occurred (' . get_class($e) . '): ', $e->getMessage(), "\n";
}

The PendingWorkEvent Object

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

AttributeDescription
id
int64
Event ID
event_type
string
Type of pending work event being recorded.
status
string
Status of event.
Possible values: success, failure, partial_failure, in_progress, skipped
body
string
Event body.
event_errors
array(string)
Event errors.
created_at
date-time
Event create date/time.
body_url
string
Link to log file.
folder_behavior_id
int64
Folder Behavior ID.