Simplifier App as a REST API

Tagged:
  • Burak
        5 years ago #16682

        Hello,

        In some cases, we have existing custom apps in different platforms and we need some REST services to get data from several systems like SQL DBs, SAP etc.

        Is it possible to call a Simplifier app as a REST service end point?

         

        Example:

        I will send a GET request to https://simplifier-dev.siemens.net/appDirect/REST_APP/listmaterials

        and it will return a list of materials collected from a DB as a JSON output ?

         

        Steffen Decker
            Has successfully completed the online course Intermediate (200)
          5 years ago #16706
          Up
          0
          Down
          ::

          Hello,

          that’s exactly the way we build companion hololens apps for existing simplifier business apps.

          You can find our new client v.2 REST API documentation via the following link: https://community.simplifier.io/documentation/simplifier-client-api/

          Furthermore you have to authenticate yourself in the simplest case with the https://domain/genToken/ api and basic auth to generate a token, which you have to add to the header (SimplifierToken=xxx ) of the actual rest api call.

          Example:

          POST  https://simplifier-dev.siemens.net/client/2.0/connector/materialdb/listmaterials (Headers: Basic Auth + Content-Type:application/json , Body: {})

          connector: materialdb
          connector call: listmaterials

           

          Burak
              5 years ago #16715
              Up
              0
              Down
              ::

              Hi again,

              It is great to have this option ! I tried several things but I am unable to realize a real call.

              What I tried:

              1- Send a request via POSTMAN which did not work (I guess it is about proxy settings but I couldn’ t figure out it)

              2- Create a PHP script with a basic cURL setup which did not also work.

               

              And for genToken, I did not get how it works actually. Can we have a 15-20 min. live meeting to demonstrate the case if you have some time ?

               

              BR,

              Burak

              Steffen Decker
                  Has successfully completed the online course Intermediate (200)
                5 years ago #16716
                Up
                0
                Down
                ::

                Hi,

                I made some screenshots with my example project settings.

                Generate token:

                MySQL Connector “MaterialsDB” and Call “Select_article”

                If it do not work with your settings, just write me some lines to: steffen.decker@simplifier.io an we set up a meeting.

                Burak
                    5 years ago #16717
                    Up
                    0
                    Down
                    ::

                    Please correct me if I am wrong.

                    I will send my request to https://simplifier-dev.siemens.net/genToken

                    is it true?

                    Steffen Decker
                        Has successfully completed the online course Intermediate (200)
                      5 years ago #16718
                      Up
                      0
                      Down
                      ::

                      You forgot a slash / at the end!

                      Kahn
                          Has successfully completed the online course Introduction
                          Has successfully completed the online course Intermediate (200)
                          Has successfully completed the online course Advanced (300)
                        5 years ago #16719
                        Up
                        0
                        Down
                        ::

                        Hi, please use genToken/

                        The slash at the end is required and not optional.

                         

                        It should work then 🙂

                        Burak
                            5 years ago #16721
                            Up
                            0
                            Down
                            ::

                            Although I got some trouble, it worked now.

                            Thank you for your great support! This is a great option to combine multiple scenarios!

                             

                          Viewing 8 posts - 1 through 8 (of 8 total)

                          You must be logged in to reply to this topic.