我想知道如何使用通用接口(interface)获取用户数据。似乎没有 Controller 来获取用户数据...... 这些是唯一的 Controller : 那么如何将用户方法添加到我的网络服务中呢? 我尝试在 webservice.yml 中添加一个 User 部分并重新导入它:
User:
Description: Search for User Data
MappingInbound: {}
MappingOutbound: {}
Type: Kernel::System::User
但这没有用。 OTRS 表示 Kernel::System::User 没有 Controller 。我也尝试只将类型设置为用户。同样的错误。
由于通用接口(interface)取代了已弃用的 RPC.pl API,因此它至少应该具有相同的方法集。 否则这不是 API 的改进,对吗?
最佳答案
你可以自己创建 Controller ,这并不难。
查看 Kernel/GenericInterface/Operation/*
中的现有服务
使用 XML 注册新操作,请在此处查找示例:Kernel/Config/Files/XML/GenericInterface.xml
别忘了打电话:
/opt/otrs/bin/otrs.SetPermissions.pl
(作为 root)
/opt/otrs/bin/otrs.Console.pl Maint::Config::Rebuild
创建新文件后
关于perl - 如何使用 OTRS 6 中的通用接口(interface)获取用户相关数据?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52903541/