perlweb-servicessoapotrsgeneric-interface

How to get user related data with Generic Interface in OTRS 6?


I wonder how to get User Data with Generic Interface. It seems that there is no Controller to get User Data... these are the only controllers: enter image description here So how can I add user methods to my webservices? I tried adding a User section in my webservice.yml and reimported it:

User:
      Description: Search for User Data
      MappingInbound: {}
      MappingOutbound: {}
      Type: Kernel::System::User

but that didn't work. OTRS says that there is no Controller for Kernel::System::User. I also tried only to set Type to User. Same error.

Since the generic interface replaces the deprecated RPC.pl API, it should have at least the same set of methods. Otherwise this would'nt be an improvement of the API right?


Solution

  • You can create controller by youself, it's not that hard.

    Take a look at existing services in Kernel/GenericInterface/Operation/*

    Register new operation with XML, look for examples here: Kernel/Config/Files/XML/GenericInterface.xml

    Don't forget to call:

    /opt/otrs/bin/otrs.SetPermissions.pl (as root)

    /opt/otrs/bin/otrs.Console.pl Maint::Config::Rebuild

    after creation of new files