Creating an Issue
my $USE_PROXY_SERVER = 1;
my $soap = new SOAP::Lite;
$soap->uri( 'http://fakeserver.phoneycompany.com/MRWebServices' );
'http://fakeserver.phoneycompany.com/MRcgi/MRWebServices.pl',
proxy => ['http' => 'http://localhost:8888/'] );
$soap->proxy( 'http://fakeserver.phoneycompany.com/MRcgi/MRWebServices.pl' );
my $soapenv = $soap→MRWebServices__createIssue(
title => 'Place title of new issue here.',
assignees => ['user1', 'user2'],
description => "Place issue description here.\nFrom PERL code.",
{
Email__baddress => 'johndoe@nowhere.com',
Custom__bAB__bField__bOne => 'Value of Custom AB Field One'
},
{
Custom__bField__bOne => 'Value of Custom Field One',
Custom__bField__bTwo => 'Value of Custom Field Two'
}
}
print ${$soapenv->fault}{faultstring} . "\n";
$result = $soapenv->result;
print "Issue $result has been created.\n";
Editing an Issue
my $USE_PROXY_SERVER = 1;
my $soap = new SOAP::Lite;
$soap->uri( 'http://fakeserver.phoneycompany.com/MRWebServices' );
'http://fakeserver.phoneycompany.com/MRcgi/MRWebServices.pl',
proxy => ['http' => 'http://localhost:8888/'] );
$soap->proxy( 'http://fakeserver.phoneycompany.com/MRcgi/MRWebServices.pl' );
my $soapenv = $soap->MRWebServices__editIssue(
title => 'NEW title is here.',
Custom__bAB__bField__bOne => 'NEW VALUE FOR Custom AB Field One'
Custom__bField__bTwo => 'NEW VALUE FOR Custom Field Two'
print ${$soapenv->fault}{faultstring} . "\n";
Retrieving Issue Details
my $USE_PROXY_SERVER = 1;
my $soap = new SOAP::Lite;
$soap->uri( 'http://fakeserver.phoneycompany.com/MRWebServices' );
'http://fakeserver.phoneycompany.com/MRcgi/MRWebServices.pl',
proxy => ['http' => 'http://localhost:8888/'] );
$soap->proxy( 'http://fakeserver.phoneycompany.com/MRcgi/MRWebServices.pl' );
my $soapenv = $soap->MRWebServices__getIssueDetails(
print ${$soapenv->fault}{faultstring} . "\n";
$result = $soapenv->result;
foreach my $item ( keys %hash )
print "ITEM IS: [$item]\n";
my $USE_PROXY_SERVER = 1;
my $soap = new SOAP::Lite;
$soap->uri( 'http://fakeserver.phoneycompany.com/MRWebServices' );
'http://fakeserver.phoneycompany.com/MRcgi/MRWebServices.pl',
proxy => ['http' => 'http://localhost:8888/'] );
$soap->proxy( 'http://fakeserver.phoneycompany.com/MRcgi/MRWebServices.pl' );
my $soapenv = $soap->MRWebServices__search(
"select mrID, mrTITLE from MASTER78 WHERE mrTITLE LIKE '%of%'"
print ${$soapenv->fault}{faultstring} . "\n";
$result = $soapenv->result;
my @result_list = @{$result};
for( my $i = 0; $i <= $#result_list; $i++ )
my $hash_ref = $result_list[$i];
foreach my $item ( keys %{$hash_ref} )
my $val = $hash_ref->{$item};
print "$item = '$val'\n";
print "---------------------\n";
Linking Issues
my $USE_PROXY_SERVER = 1;
my $soap = new SOAP::Lite;
$soap->uri( 'http://yourFootPrintsServer/MRWebServices' );
'http://yourFootPrintsServer/MRcgi/MRWebServices.pl',
proxy => ['http' => 'http://localhost:8888/'] );
$soap->proxy( 'http://yourFootPrintsServer/MRcgi/MRWebServices.pl' );
# By calling this, you don't need to worry about whether this is a new or edited contact. This method
my $soapenv = $soap->MRWebServices__linkIssues(
issue1 => {projectID => 1, mrID => 1},
issue2 => {projectID => 2, mrID => 5},
print ${$soapenv->fault}{faultstring} . "\n";
$result = $soapenv->result;
print "Link is successful.\n" if $result;
my $USE_PROXY_SERVER = 1;
my $soap = new SOAP::Lite;
$soap->uri( 'http://yourFootPrintsServer/MRWebServices' );
'http://yourFootPrintsServer/MRcgi/MRWebServices.pl',
proxy => ['http' => 'http://localhost:8888/'] );
$soap->proxy( 'http://yourFootPrintsServer/MRcgi/MRWebServices.pl' );
my $soapenv = $soap->MRWebServices__createContact(
Last__bName => 'Doe',
First__bName => 'John',
Email__baddress => 'johndoe@nowhere.com',
Custom__bAB__bField__bOne => 'Value of Custom AB Field One'
print ${$soapenv->fault}{faultstring} . "\n";
$result = $soapenv->result;
print "Contact $result has been created.\n";
my $USE_PROXY_SERVER = 1;
my $soap = new SOAP::Lite;
$soap->uri( 'http://yourFootPrintsServer/MRWebServices' );
'http://yourFootPrintsServer/MRcgi/MRWebServices.pl',
proxy => ['http' => 'http://localhost:8888/'] );
$soap->proxy( 'http://yourFootPrintsServer/MRcgi/MRWebServices.pl' );
my $soapenv = $soap->MRWebServices__editContact(
abID => 44, # can leave this out so long as the primary key field has a value; must use this if editing name of primary key value
Last__bName => 'Doe',
First__bName => 'John',
Email__baddress => 'johndoe@nowhere.com',
Custom__bAB__bField__bOne => 'Value of Custom AB Field One'
print ${$soapenv->fault}{faultstring} . "\n";
$result = $soapenv->result;
print "Contact $result has been edited.\n";
my $USE_PROXY_SERVER = 1;
my $soap = new SOAP::Lite;
$soap->uri( 'http://yourFootPrintsServer/MRWebServices' );
'http://yourFootPrintsServer/MRcgi/MRWebServices.pl',
proxy => ['http' => 'http://localhost:8888/'] );
$soap->proxy( 'http://yourFootPrintsServer/MRcgi/MRWebServices.pl' );
# By calling this, you don't need to worry about whether this is a new or edited contact. This method
my $soapenv = $soap->MRWebServices__createOrEditContact(
Last__bName => 'Doe',
First__bName => 'John',
Email__baddress => 'johndoe@nowhere.com',
Custom__bAB__bField__bOne => 'Value of Custom AB Field One'
print ${$soapenv->fault}{faultstring} . "\n";
$result = $soapenv->result;
print "Contact $result has been edited.\n";
Assigning individual Agents, Agents as Team members, and Teams
An 'assignees' key is available for the extraInfo parameter of the createIssue and editIssue Web API SOAP calls which is used for assigning or reassigning agents to an Issue. Agent assignment to an Issue is based on the order of Agents and Teams in the list applied to this 'assignees' key for the createIssue and editIssue Web API SOAP calls:
Assigning Agents
Agents which are not preceded by a Team name are assigned as individual agents regardless of team membership:
'assignees' => [ 'individual_agent1', 'agent1_Team1', 'agentN_TeamK' ],
In this case, individual_agent1, agent1_Team1, and agentN_TeamK will be assigned as individual agents.
Assigning Agents as Team members
Agents preceded by Team name will be assigned as Team members:
'assignees' => [ 'TeamK', 'agent1_TeamK'],
In this case, agent1_TeamK will be assigned as a member of TeamK.
'assignees' => [ 'individual_agent1', 'agentN_TeamK', 'Team1', 'agent1_Team1', 'agent2_Team1', 'TeamK', 'agent1_TeamK', 'agent2_TeamK' ],
In this case, individual_agent1 and agentN_TeamK will be assigned as individuals, agent1_Team1 and agent2_Team1 will be assigned as members of Team1, and agent1_TeamK and agent2_TeamK will be assigned as members of TeamK.
Assigning Teams
Teams which are not followed by agents will be assigned based on team properties, i.e. to a team, selected agents, all members, or round robin base:
'assignees' => [ 'TeamL', 'TeamN' ],
Both teams (TeamL and TeamN) will be assigned based on their properties - to a team, selected agents, all members or round robin base.
'assignees' => [ 'individual_agent1', 'agentN_TeamK', 'Team1', 'agent1_Team1', 'agent2_Team1', 'TeamK', 'agent1_TeamK', 'agent2_TeamK', 'TeamL', 'TeamN' ],
In this case, individual_agent1 and agentN_TeamK will be assigned as individuals, agent1_Team1 and agent2_Team1 will be assigned as members of Team1, agent1_TeamK and agent2_TeamK will be assigned as members of TeamK, and TeamL and TeamN will be assigned based on team properties - to a team, selected agents, all members, or round robin base.
Unassigning Agents
To unassign all agents, form an Issue using the editIssue Web API SOAP call. An empty list should be passed to the 'assignees' key of the extraInfo parameter:
If the 'assignees' key of the externalInfo parameter is not defined, the assignees defined for an Issue remain unchanged.
Creating a CI
my $baseUrl = 'http://pyxis';
###################################################
###################################################
###################################################
my $soap = new SOAP::Lite;
$soap->uri( $baseUrl . '/MRWebServices' );
$soap->proxy( $baseUrl . '/MRcgi/MRWebServices.pl' );
my $submit_usertimestamp;
my $lastedit_usertimestamp;
my $revision_usertimestamp;
my $soapCall = $soap->MRWebServices__createCI(
CI_TYPE_ID => $ci_type_id,
SUBMIT_USER => $submit_user,
SUBMIT_SYSTIMESTAMP => $submit_systimestamp,
SUBMIT_USERTIMESTAMP => $submit_usertimestamp,
LASTEDIT_USERTIMESTAMP => $lastedit_usertimestamp,
REVISION_USERTIMESTAMP => $revision_usertimestamp,
ATTRIBUTES => \%attributes,
print ${$soapCall->fault}{faultstring} . "\n";
Edit a CI
my $baseUrl = 'http://pyxis';
###################################################
###################################################
###################################################
my $soap = new SOAP::Lite;
$soap->uri( $baseUrl . '/MRWebServices' );
$soap->proxy( $baseUrl . '/MRcgi/MRWebServices.pl' );
my $soapCall = $soap->MRWebServices__editCI(
CI_TYPE_ID => $ci_type_id,
ATTRIBUTES => \%attributes,
print ${$soapCall->fault}{faultstring} . "\n";
Create a CI Relationship
my $baseUrl = 'http://pyxis';
###################################################
###################################################
###################################################
my $soap = new SOAP::Lite;
$soap->uri( $baseUrl . '/MRWebServices' );
$soap->proxy( $baseUrl . '/MRcgi/MRWebServices.pl' );
my $soapCall = $soap->MRWebServices__createCIRelation(
RELATION_CFG_ID => $relation_cfg_id,
FROM_CI_ID => $from_ci_id,
FROM_CI_TYPE => $from_ci_type,
TO_CI_TYPE => $to_ci_type,
print ${$soapCall->fault}{faultstring} . "\n";
my $baseUrl = 'http://pyxis';
###################################################
###################################################
###################################################
my $soap = new SOAP::Lite;
$soap->uri( $baseUrl . '/MRWebServices' );
$soap->proxy( $baseUrl . '/MRcgi/MRWebServices.pl' );
my $soapCall = $soap->MRWebServices__createCIContactLink(
CI_TYPE_ID => $ci_type_id,
print ${$soapCall->fault}{faultstring} . "\n";
Link an Issue to a CI
my $baseUrl = 'http://pyxis';
###################################################
###################################################
###################################################
my $soap = new SOAP::Lite;
$soap->uri( $baseUrl . '/MRWebServices' );
$soap->proxy( $baseUrl . '/MRcgi/MRWebServices.pl' );
my $soapCall = $soap->MRWebServices__createCIIssueLink(
CI_TYPE_ID => $ci_type_id,
print ${$soapCall->fault}{faultstring} . "\n";