Understanding How The API Works

Perl Examples – Sample Zone Commands

Here’s a PERL example using SOAP::WSDL and the libraries from wsdl2perl.pl to:

  1. Log in to the API to establish a Session [SessionLogin]
  2. Get a List of existing Zones [GetZones]
  3. Create a new zone [CreateZone]
  4. Add A Records and MX Records [CreateARecord CreateMXRecord]
  5. Create a new node with an A record [CreateARecord]
  6. Publish the Zone [PublishZone]
  7. Logout [SessionLogout]

Click to view the example code.

Perl Examples – Sample RTTM Create

Here’s a PERL example using SOAP::WSDL and the libraries from wsdl2perl.pl to:

  1. Log in to the API to establish a Session [SessionLogin]
  2. Create an RTTM service on a new node [CreateRTTM]
    Note: This script assumes an existing published zone in DynECT
  3. Examine some of the information about the new service
  4. Logout [SessionLogout]

Click to view the example code.

Perl Examples – Sample Get RTTM Commands

Here’s a PERL example using SOAP::WSDL and the libraries from wsdl2perl.pl to:

  1. Log in to the API to establish a Session [SessionLogin]
  2. Get details of an existing RTTM Service [GetOneRTTM]
  3. Examine some of the data
  4. Logout [SessionLogout]

Click to view the example code.

Perl Examples – Get Message Infomation

A <msgs> element is a list of zero or more messages with sub-elements

  1. SOURCE: A debugging field. If reporting an error to your Dynect Concierge, be sure to include this.
  2. LEVEL: The severity of the message. One of: ‘FATAL’, ‘ERROR’, ‘WARN’, or ‘INFO’
  3. INFO: The actual message itself.
  4. ERR_CD: An error code (if appropriate) regarding the message.

Here’s an example of a Perl utility function to take a response and gather info from each of the messages element (uses SOAP::WSDL get_DATA methods)

Click to view the example code.