6 Replies Latest reply on Jul 6, 2016 8:28 AM by Antoni Zahariev

    Rest API

      Share This:

      Hello,

       

      Recently we have configured AR Server 9.1 POC server with SQL 2012 DB. As we heard that 9.1 has built in support for REST API, we followed the discussion - REST API: JavaScript and Java examples . But we are getting below error while running postman query, let me know where exactly things has gone wrong.

       

      HTTP ERROR 404

      Problem accessing /api/jwt/Login. Reason:

          Not Found

       


      Powered by Jetty://

       

       

      Thanks for your support.

        • 1. Re: Rest API
          LJ LongWing

          Krunal,

          Did you by chance follow the directions to enable the Restful portion of the server so that Rest is enabled?  If I remember correctly, it's not enabled by default

          • 2. Re: Rest API

            Hi,

             

            Thank you for quickly responding on this,

             

            I did test through netstat command, it seems port has jetty port 8008 configured,

             

            netstat -nab | findstr /c:"8008"

              TCP    0.0.0.0:8008           0.0.0.0:0              LISTENING

              TCP    [::]:8008              [::]:0                 LISTENING

             

            I did telnet from other server and it is connecting on this port.

             

            Let me know, if I missed any other configuration.

             

            Thank you,

            • 3. Re: Rest API
              LJ LongWing

              Ok...I haven't checked Justin Bakker's examples, but I assume that they are connecting to the non secured 8008 that you have verified is up...in fact, it has to be up because it's a Jetty server responding that it doesn't know the service in question....so, I'm not entirely sure what could be causing it.

              • 4. Re: Rest API
                Justin Bakker

                As LJ pointed out, the error comes from Jetty, so it's up-and-running. I think it's a typo. it should be login, not Login.

                 

                J

                • 5. Re: Rest API

                  Hi Justin,

                   

                  Apologies for responding it late. Was stuck with other activity.

                   

                  I did change url and add "login" instead of "Login" but got same error,

                   

                  HTTP ERROR 404

                  Problem accessing /api/arsys/login. Reason:

                      Not Found

                   


                  Powered by Jetty://

                   

                   

                  More over I have checked default link to access API - http://server:port/api/arsys/v1 but got same error,

                   

                  HTTP ERROR 404

                  Problem accessing /api/arsys/v1. Reason:

                      Not Found

                   


                  Powered by Jetty://

                   

                   

                   

                  It seems, I am missing big part but not sure where exactly to start with. Do we have any path that to be checked in order to validate whether this API actually exist in a path or not ?

                   

                  Thanks,

                  • 6. Re: Rest API
                    Antoni Zahariev

                    Hi Krunal,

                     

                    the URL should be as follows:
                    10.10.10.10:8008/api/jwt/login (not /api/arsys/login)

                     

                    Regards,

                    Toni