我们是否需要对 MobileFirst 中的 REST API 管理服务进行任何额外设置?

Do we need any additional setup for REST API Administration Services in MobileFirst?

我们有记录器适配器"WLClientLogReceiver"。当我们尝试使用下面的 link 访问 REST 服务以获取适配器详细信息时,我们收到 404 错误

 https://example.com/worklightadmin/management-apis/1.0/runtimes/myruntimename/adapters/WLClientLogReceiver


    Respnse:
    <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
    <html><head>
    <title>404 Not Found</title>
    </head><body>
    <h1>Not Found</h1>
    <p>The requested URL /worklightadmin/management-apis/1.0/runtimes/myruntimename/adapters/WLClientLogReceiver was not found on this server.</p>
    <hr>
    <address>IBM_HTTP_Server at example.com Port 443</address>
    </body></html>

404 似乎表明 URL 是错误的。如果 URL 确实正确,则会返回一条消息,例如 -“运行时 \"yourruntime\" 的适配器 \"WLClientLogReceiver\" 在 MobileFirst 管理数据库中不存在”,以防您查询缺少的适配器。

测试:

一个) URL - “https://example.com/worklightadmin/management-apis/1.0/runtimes/myruntimename/adapters?” returns 所有已部署适配器的元数据。

检查您是否获得了所有适配器的列表,并查看 WLClientLogReceiver 是否在列表中。

b) 如果这也给你一个 404 :

如果您部署在独立服务器上,您的管理上下文可能会有所不同 - 对于独立服务器,它默认为 "wladmin" 而不是开发服务器中的 "worklightadmin"。验证您的上下文根。