2

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?

artgrohe
  • 3,082
  • 2
  • 25
  • 31

1 Answers1

3

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

k-mx
  • 667
  • 6
  • 17
  • Thanks, so we have to write custom API extensions on our own, and every customer that wants to use this API has to install the files and do the setup in order to use it.... since we have more than 40 business customers with their own OTRS this will be a lot of fun... *sigh* – artgrohe Oct 22 '18 at 08:05