ID: 4645

Perl SDK

Zoom supports a Perl SDK that provides higher-level constructs than the regular Zoom Web/Java/command line APIs. This allows developers to integrate with Zoom using the powerful Perl scripting language on any OS platform (Windows, Mac, Linux). The automations developed using the Perl SDK can be used with Zoom Workflow Auto Tasks, Zoom Hot Folder pre/post hooks, Archive pre/post hooks, Check-in pre/post hooks, Custom Converters

The Perl SDK is targeted at experienced Perl developers who have at-least 3 years+ experience working with Perl.  If this is the first time for you developing integration using Perl, you will struggle with lot of the material and APIs described below.

  1. Minimum Perl Version Supported: 5.8+. Please ensure your Perl distribution is upto date.
  2. Windows: Please download and install the Strawberry Perl distribution

Note: for Windows use Strawberry Perl 5.24.1.1

  1. There are a number of Perl modules that the SDK functions depend upon. Please install the following Perl modules for maximum compatibility with the SDK lib modules:
     
    Log::Log4perl
    Log::Dispatch::File
    Config::IniFiles
    Net::SMTP::SSL
    DateTime::Format::Strptime
    JSON
    URL::Encode
    URI::Encode
    Log::Dispatch::FileRotate
    Time::Piece
    List::Util
    List::MoreUtils
    LWP::UserAgent
    Net:SSLeay
    YAML
    IO::Pty::Easy
    XML::LibXML
    LockFile::Simple
    Data::UUID
    JSON::Parse
    Data::Dumper
    File::Copy
    List::MoreUtils
    File::Basename
    Encode
    File::Find
    Time::Format
    Time::HiRes
    Encode::Locale
    FindBin
    File::Path
    Cwd
    LWP::Simple
    URI::Escape
    File::Temp
    Net::SMTP
    Switch
    Config
    XML::Simple
    Net::FTP
     
     
    These can be installed using the command line below for instance:
     
    cpan -fi Log::Log4perl Log::Dispatch::File Config::IniFiles Net::SMTP::SSL DateTime::Format::Strptime JSON URL::Encode URI::Encode Log::Dispatch::FileRotate Time::Piece List::Util List::MoreUtils LWP::UserAgent Net:SSLeay YAML Net:SSLeay Net:SSLeay Net:SSLeay IO::Pty::Easy Switch Config XML::Simple XML::LibXML LockFile::Simple Data::UUID JSON::Parse
  2. Please consult the Perl forums such as http://www.perlmonks.org/ if you have trouble installing the Perl modules.

 

  1. Download the SDK from the support portal and unzip it into a recommended root folder: 
  2. Linux or MacOS: /zoom-deploy e.g. /home/evolphin/zoom-deploy
    Windows: /evolphin/zoom-deploy/ for e.g. d:/evolphin/zoom-deploy
  3. The Perl SDK is contained in the libs/ folder. The various Perl modules and the functions supported are described latter in this article.
  4. Included with the SDK are number of samples that can be used as template  for creating new automations.

 

  1. Please follow the folder structure below for developing the automation using the Zoom Perl SDK:

     Folder Structure - Perl SDK

    1. Download the SDK, unzip it and copy the lib directory under user-home/zoom-deploy.
    2. The perl scripts for automation should be placed under user-home/zoom-deploy/scripts.
    3. The scripts configuration should go into user-home/zoom-deploy/scripts/conf/config.ini.
    4. Logs configuration should go into user-home/zoom-deploy/scripts/conf/log4perl.conf
  2. Please review a sample script below to learn how to initialize the various Perl modules:

    Perl Script - Send a test mail

 


 

Example: log4perl.conf

##############################################################################

# Log::Log4perl Conf # ############################################################################### log4perl.rootLogger = DEBUG, LOG1

log4perl.appender.LOG1 = Log::Log4perl::Appender::File

log4perl.appender.LOG1.filename = /home/evolphin/zoom-deploy/log/mylog.log

log4perl.appender.LOG1.mode = append

log4perl.appender.LOG1.layout = Log::Log4perl::Layout::PatternLayout

log4perl.appender.LOG1.layout.ConversionPattern = %d %p %m %n

 

Example: config.ini

[ZOOMSERVER]

serverUsername = superuser

serverPassword = zoom

serverURL = http://localhost:8880

webminURL = http://localhost:8443

[ENVIRONMENT]

zmPath = /opt/zoom/bin/zm [DATE]

# Based on Perl Time::Piece supported format strings

#Date Format = %Y-%m-%d Date Format = %m/%d/%Y

# Need to be from http://en.wikipedia.org/wiki/List_of_tz_database_time_zones TZ column Time Zone = America/Los_Angeles