Search code examples
ibm-mobilefirstmobilefirst-adaptersmobilefirst-server

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


We have logger adapter "WLClientLogReceiver". When we tried to hit the REST service using below link to get adapter details we got 404 error

 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>

Solution

  • The 404 seems to suggest the URL is wrong. If the URL were indeed proper , then a message such as - " The adapter \"WLClientLogReceiver\" of the runtime \"yourruntime\" does not exist in the MobileFirst administration database" is returned, in case you query for a missing adapter.

    To test:

    a) The URL - "https://example.com/worklightadmin/management-apis/1.0/runtimes/myruntimename/adapters?" returns metadata of all deployed adapters.

    Check if you get the list of all adapters and see if WLClientLogReceiver is in the list.

    b) If that also gives you a 404 :

    If you are deployed on a standalone server, your admin context might be different - for standalone servers ,it is by default "wladmin" as opposed to "worklightadmin" in the Development server. Verify your context root.