
##########
Webservice
##########


****
NAME
****


Kernel::System::GenericInterface::Webservice


***********
DESCRIPTION
***********


Web service configuration backend.


****************
PUBLIC INTERFACE
****************


new()
=====


Don't use the constructor directly, use the ObjectManager instead:


.. code-block:: perl

     my $WebserviceObject = $Kernel::OM->Get('Kernel::System::GenericInterface::Webservice');



WebserviceAdd()
===============


add new Webservices

returns id of new web service if successful or undef otherwise


.. code-block:: perl

     my $ID = $WebserviceObject->WebserviceAdd(
         Name    => 'some name',
         Config  => $ConfigHashRef,
         ValidID => 1,
         UserID  => 123,
     );



WebserviceGet()
===============


get Webservices attributes


.. code-block:: perl

     my $Webservice = $WebserviceObject->WebserviceGet(
         ID   => 123,            # ID or Name must be provided
         Name => 'MyWebservice',
     );


Returns:


.. code-block:: perl

     $Webservice = {
         ID         => 123,
         Name       => 'some name',
         Config     => $ConfigHashRef,
         ValidID    => 123,
         CreateTime => '2011-02-08 15:08:00',
         ChangeTime => '2011-02-08 15:08:00',
     };



WebserviceUpdate()
==================


update web service attributes

returns 1 if successful or undef otherwise


.. code-block:: perl

     my $Success = $WebserviceObject->WebserviceUpdate(
         ID      => 123,
         Name    => 'some name',
         Config  => $ConfigHashRef,
         ValidID => 1,
         UserID  => 123,
     );



WebserviceDelete()
==================


delete a Webservice

returns 1 if successful or undef otherwise


.. code-block:: perl

     my $Success = $WebserviceObject->WebserviceDelete(
         ID      => 123,
         UserID  => 123,
     );



WebserviceList()
================


get web service list


.. code-block:: perl

     my $List = $WebserviceObject->WebserviceList();
 
     or
 
     my $List = $WebserviceObject->WebserviceList(
         Valid => 0, # optional, defaults to 1
     );



WebserviceConfigReplace()
=========================


Replaces <OTRS_CONFIG> tags in arrays, hashes and strings recursively.


.. code-block:: perl

     my $Data   = '<OTRS_CONFIG_Home>';
     my $Result = $WebserviceObject->WebserviceConfigReplace($Data);


Returns:


.. code-block:: perl

     my $Result = '/opt/znuny';





