Thank you for your feedback.
Form temporarily unavailable. Please try again or contact docfeedback@servicenow.com to submit your comments.
Versions
  • London
  • Kingston
  • Jakarta
  • Istanbul
  • Helsinki
  • Geneva
  • Store
Close

Perl API architecture

Perl API architecture

This reference explains the Perl API architecture.

Figure 1. Perl API overview

ServiceNow.pm

At the top most of the class hierarchy is the ServiceNow.pm module. This module provides direct subroutines that delegate down into subroutines of the object heirarchy, providing a convenient calling convention if object oriented Perl programming is not a desired practice.

ITIL Objects

The next layer of the class hierarchy contains the ITIL Objects for example Incident.pm, and Change.pm. These objects extend the Task.pm object which inherits from the GlideRecord.pm object.

Configuration.pm

To use the Perl API, the programmer instantiates a Configuration.pm object and sets the service endpoint as well as the login credentials to use the API. For example:
my $CONFIG = ServiceNow::Configuration->new();
$CONFIG->setSoapEndpoint("https://instance_name.service-now.com/");

my $incident = ServiceNow::ITIL::Incident->new($CONFIG);

Connection.pm

The Connection.pm class defines the interfaces for making the SOAP calls to the platform. The default implementation uses the SOAP::Lite module, if you wish to implement your own SOAP interface, you can override this class with your own and implement the following subroutines:
  • new
  • open
  • send
  • close
If running behind a firewall, edit Connection.pm to specify information about the HTTP proxy. In Connection.pm, change the line:
$me->{'SOAP'} = SOAP::Lite->proxy($CONFIG->getSoapEndPoint($target));
to:
$me->{'SOAP'} = SOAP::Lite->proxy($CONFIG->getSoapEndPoint($target), proxy => ['https' => 'http://myproxy.mycompany.com/']);
Substitute the appropriate proxy URL.

This site is scheduled for a small content update on Monday, November 19th, between the hours of 3:30pm and 5:00pm Pacific Time (Nov 19 23:30 – Nov 20 1:00 UTC). Acces to this site may be slightly delayed during that time.