You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

The net.dante.otrs.OTRSProducer JAVA class take one integer parameter which is the number of minutes to subtract from the current time, in order to determine the date and time range of the tickets required.

The OTRS system has a generic SOAP based web service that allows users to search and retrieve Ticket information from the system. When a search is executed, a list of Ticket Identifiers is returned. This list of Ticket Identifiers is then iterated through, requiring a second call to the SOAP based web service using the Ticket Identifier as the key in order to return the required Ticket information.

The OTRS Web service URL is : https://tts.geant.net/otrs/nph-genericinterface.pl/Webservice/GenericTicketConnector

** If you have Admin access to OTRS, you can review the SOAP Based Service settings using the following URL: https://tts.geant.net/otrs/index.pl?Action=AdminGenericInterfaceWebservice;Subaction=Change;WebserviceID=1;Nav=


TicketSearch

The SOAP message that is sent to the OTRS web service looks like the following XML:

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.otrs.org/TicketConnector/">

       <SOAP-ENV:Header/>

            <SOAP-ENV:Body>

                  <ns:TicketSearch>

                         <ns:UserLogin>msruser</ns:UserLogin>

                         <ns:Password>********</ns:Password>

                         <ns:Types>Maintenance::Planned</ns:Types>

                         <ns:Types>Maintenance::Emergency</ns:Types>

                         <ns:Limit>2500</ns:Limit>

                         <ns:TicketChangeTimeNewerMinutes>60</ns:TicketChangeTimeNewerMinutes>

                  </ns:TicketSearch>

          </SOAP-ENV:Body>

</SOAP-ENV:Envelope>


*** The TicketChangeTimeNewerMinutes value is set by the parameter sent to the Java Class 

***** Password Stored In KeyPass

TicketGet

The SOAP message that is sent to the OTRS web service looks like the following XML:

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.otrs.org/TicketConnector/">

       <SOAP-ENV:Header/>

            <SOAP-ENV:Body>

                  <ns:TicketGet>

                         <ns:UserLogin>msruser</ns:UserLogin>

                         <ns:Password>********</ns:Password>

                         <ns:TicketID>98016</ns:TicketID>

                         <ns:DynamicFields>1</ns:DynamicFields>

                  </ns:TicketGet>

          </SOAP-ENV:Body>

</SOAP-ENV:Envelope>


98016 is an example TicketId used as the key to retrieve the Ticket where the TicketID field matches 98016


A typical response is:

<?xml version="1.0" encoding="UTF-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

      <soap:Body>

             <TicketGetResponse xmlns="http://www.otrs.org/TicketConnector/">

                     <Ticket>

                           <Age>35030226</Age>

                           <ArchiveFlag>y</ArchiveFlag>

                           <ChangeBy>1</ChangeBy>

                           <Changed>2017-03-20 16:18:56</Changed>

                           <CreateBy>1</CreateBy>

                           <CreateTimeUnix>1469511635</CreateTimeUnix>

                           <Created>2016-07-26 05:40:35</Created>

                           <CustomerID>OTRS-GEANT-NREN</CustomerID>

                           <CustomerUserID/>

                          <DynamicField><Name>AdditionalRecipients</Name><Value>6noc@cernet.edu.cn</Value><Value>david.west@geant.org</Value></DynamicField>

                          <DynamicField><Name>Equipment</Name><Value/></DynamicField>

                          <DynamicField><Name>EventEndTime</Name><Value/></DynamicField>

                          <DynamicField><Name>EventStartTime</Name><Value/></DynamicField>

                          <DynamicField><Name>FirstResponseBreach</Name><Value/></DynamicField>

                          <DynamicField><Name>GeneralInformation</Name><Value/></DynamicField>

                          <DynamicField><Name>ITSMCriticality</Name><Value>3 normal</Value></DynamicField>

                          <DynamicField><Name>ITSMDecisionDate</Name><Value/></DynamicField>

                          <DynamicField><Name>ITSMDecisionResult</Name><Value/></DynamicField>

                          <DynamicField><Name>ITSMDueDate</Name><Value/></DynamicField>

                          <DynamicField><Name>ITSMImpact</Name><Value/></DynamicField>

                          <DynamicField><Name>ITSMRecoveryStartTime</Name><Value/></DynamicField>

                          <DynamicField><Name>ITSMRepairStartTime</Name><Value/></DynamicField>

                          <DynamicField><Name>ITSMReviewRequired</Name><Value/></DynamicField>

                          <DynamicField><Name>MaintenanceClose</Name><Value>closed successful</Value></DynamicField>

                          <DynamicField><Name>MaintenanceValidated</Name><Value/></DynamicField>

                          <DynamicField><Name>NMSAlarmID</Name><Value/></DynamicField>

                          <DynamicField><Name>OpenedAsP1</Name><Value/></DynamicField>

                          <DynamicField><Name>ProcessManagementActivityID</Name><Value>0</Value></DynamicField>

                          <DynamicField><Name>ProcessManagementProcessID</Name><Value>0</Value></DynamicField>

                          <DynamicField><Name>ProcessSelect</Name><Value/></DynamicField>

                          <DynamicField><Name>Project</Name><Value>GÉANT</Value></DynamicField>

                          <DynamicField><Name>ProjectM</Name><Value/></DynamicField>

                          <DynamicField><Name>ProviderRefNo</Name><Value>GJ-2016-823</Value></DynamicField>

                          <DynamicField><Name>QCInternal</Name><Value/></DynamicField>

                          <DynamicField><Name>QCQualityIssue</Name><Value/></DynamicField>

                          <DynamicField><Name>QCSD</Name><Value/></DynamicField>

                          <DynamicField><Name>QCSupplier</Name><Value/></DynamicField>

                          <DynamicField><Name>QCVendor</Name><Value/></DynamicField>

                          <DynamicField><Name>ReportSource</Name><Value>Email</Value></DynamicField>

                          <DynamicField><Name>SDAccountable</Name><Value>Yes</Value></DynamicField>

                          <DynamicField><Name>SRCompletionDate</Name><Value/></DynamicField>

                          <DynamicField><Name>SRFinanceFreeText</Name><Value/></DynamicField>

                          <DynamicField><Name>SRFinanceInform</Name><Value/></DynamicField>

                          <DynamicField><Name>SRNewUpgradeDecom</Name><Value/></DynamicField>

                          <DynamicField><Name>SRNextStage</Name><Value/></DynamicField>

                          <DynamicField><Name>SROCAcceptance</Name><Value/></DynamicField>

                          <DynamicField><Name>SRRequestedCapacity</Name><Value/></DynamicField>

                          <DynamicField><Name>SRRequestedImplementationDate</Name><Value/></DynamicField>

                          <DynamicField><Name>SRSRFNumber</Name><Value/></DynamicField>

                          <DynamicField><Name>SubService</Name><Value>UK-TEIN BJ-ORIENTplus</Value></DynamicField>

                          <DynamicField><Name>Supplier</Name><Value>China Unicom</Value></DynamicField>

                          <DynamicField><Name>SupportLevel</Name><Value>Tier 1</Value></DynamicField>

                          <DynamicField><Name>TicketCalendarEndTime</Name><Value>2016-07-31 22:00:00</Value></DynamicField>

                          <DynamicField><Name>TicketCalendarStartTime</Name><Value>2016-07-31 16:00:00</Value></DynamicField>

                          <DynamicField><Name>TicketFreeText1</Name><Value/></DynamicField>

                          <DynamicField><Name>TicketFreeText2</Name><Value/></DynamicField>

                          <DynamicField><Name>UpdateTimeBreach</Name><Value/></DynamicField>

                          <DynamicField><Name>allowEmailUpdate</Name><Value>1</Value></DynamicField>

                          <DynamicField><Name>custID</Name><Value/></DynamicField>

                          <DynamicField><Name>custIDs</Name><Value/></DynamicField>

                          <DynamicField><Name>eex1424Circuit</Name><Value/></DynamicField>

                          <DynamicField><Name>eex1425Circuit</Name><Value/></DynamicField>

                          <DynamicField><Name>eex1426Circuit</Name><Value/></DynamicField>

                          <DynamicField><Name>eexAMS100G</Name><Value/></DynamicField>

                          <DynamicField><Name>eexAMSOOB</Name><Value/></DynamicField>

                          <DynamicField><Name>eexGEN100G</Name><Value/></DynamicField>

                          <DynamicField><Name>eexGEN272OOB</Name><Value/></DynamicField>

                          <DynamicField><Name>eexGEN513OOB</Name><Value/></DynamicField>

                          <DynamicField><Name>eexLON100G</Name><Value/></DynamicField>

                          <DynamicField><Name>eexLONOOB</Name><Value/></DynamicField>

                          <DynamicField><Name>eexOPEN100G</Name><Value/></DynamicField>

                          <DynamicField><Name>esnetEEX</Name><Value>No</Value></DynamicField>

                          <DynamicField><Name>geantServiceTypes</Name><Value/></DynamicField>

                          <DynamicField><Name>highestSLA</Name><Value/></DynamicField>

                          <DynamicField><Name>internalAlert</Name><Value/></DynamicField>

                          <DynamicField><Name>internalAlertNotification</Name><Value/></DynamicField>

                          <DynamicField><Name>secCategory</Name><Value/></DynamicField>

                          <DynamicField><Name>secFlowmonID</Name><Value/></DynamicField>

                          <DynamicField><Name>secFlowsSample</Name><Value/></DynamicField>

                          <DynamicField><Name>secPerspective</Name><Value/></DynamicField>

                          <DynamicField><Name>secPorts</Name><Value/></DynamicField>

                          <DynamicField><Name>secProtocol</Name><Value/></DynamicField>

                          <DynamicField><Name>secSeverity</Name><Value/></DynamicField>

                          <DynamicField><Name>secSourceIP</Name><Value/></DynamicField>

                          <DynamicField><Name>secTargetIPs</Name><Value/></DynamicField>

                          <DynamicField><Name>secTime</Name><Value/></DynamicField>

                          <DynamicField><Name>secType</Name><Value/></DynamicField>

                           <DynamicField><Name>ticketReasonCode</Name><Value/></DynamicField>

                           <EscalationResponseTime>0</EscalationResponseTime>

                           <EscalationSolutionTime>0</EscalationSolutionTime>

                           <EscalationTime>0</EscalationTime>

                           <EscalationUpdateTime>0</EscalationUpdateTime>

                           <GroupID>14</GroupID>

                           <Lock>unlock</Lock>

                           <LockID>1</LockID>

                           <Owner>samuel.price@intercity.technology</Owner>

                           <OwnerID>90</OwnerID>

                           <Priority>3 normal</Priority>

                           <PriorityID>3</PriorityID>

                           <Queue>Maintenance</Queue>

                           <QueueID>22</QueueID>

                           <RealTillTimeNotUsed>0</RealTillTimeNotUsed>

                           <Responsible>root@localhost</Responsible>

                           <ResponsibleID>1</ResponsibleID>

                           <SLAID/>

                           <Service>Trunk / Infrastructure</Service>

                           <ServiceID>25</ServiceID>

                           <State>closed successful</State>

                           <StateID>2</StateID>

                           <StateType>closed</StateType>

                           <TicketID>98016</TicketID>

                           <TicketNumber>2016072634000159</TicketNumber>

                           <Title>[lon] PM, UK-TEIN BJ-ORIENTplus, ChinaUnicom</Title>

                           <Type>Maintenance::Planned</Type>

                           <TypeID>6</TypeID>

                           <UnlockTimeout>1470004353</UnlockTimeout>

                           <UntilTime>0</UntilTime>

                    </Ticket>

            </TicketGetResponse>

     </soap:Body>

</soap:Envelope>



  • No labels