Getting the Service URL of connector on client side

Tagged:
  • Vasileios Thanasias
        Has successfully completed the online course Basics (100)
      1 year ago #35260

      Hello, is it possible to retrieve the Service URL of a Connector, on a client-server business object?

      Jennifer Häfner
          Has successfully completed the online course Intermediate (200)
          Has successfully completed the online course Advanced (300)
          Has successfully completed the online course Basics (100)
          Has successfully completed the online course Advanced (310)
          Has successfully completed the online course Advanced (320)
          Has successfully completed the Intermediate Certification
          Has successfully completed the Advanced Certification
        1 year ago #35265
        Up
        1
        Down
        ::

        Unfortunately, we do not have an open and stable API call to read a connector’s endpoint at the moment.

        What I suggest in your use case:

        • Write a Server-Side Business Object (SSBO) function that reads the current instance (as configured in the server environment settings)
        • In this function, use the SSBO System API to achieve get the active instance: Simplifier.System.getActiveInstance() (documentation). The returned object includes the type of the instance: Custom, Develop, Quality, Production
        • Based on this type, return the respective endpoint URL.
          You can find an example of using the SSBO System API in this video of the Advanced Course on SSBOs: https://community.simplifier.io/system-api/
        • In your client-side calls, use this SSBO function to fetch the endpoint URL depending on the active instance. Then, use the retrieved URL in the further process

        This way, you only have to define the required endpoint URLs once in a SSBO function. I hope this approach is suitable for your use case.

        Jennifer Häfner
            Has successfully completed the online course Intermediate (200)
            Has successfully completed the online course Advanced (300)
            Has successfully completed the online course Basics (100)
            Has successfully completed the online course Advanced (310)
            Has successfully completed the online course Advanced (320)
            Has successfully completed the Intermediate Certification
            Has successfully completed the Advanced Certification
          1 year ago #35262
          Up
          0
          Down
          ::

          Hi Vasileios,

          With Service URL, do you mean the connector’s endpoint URL that is defined in the endpoints tab? Or do you mean the URL that you need to execute a connector call?

          Also, it would be helpful that you describe the use case in more detail so we can find a good solution.

          Vasileios Thanasias
              Has successfully completed the online course Basics (100)
            1 year ago #35263
            Up
            0
            Down
            ::

            Hi Jennifier, yes the connector base URL  in the REST endpoints tab , as in the picture below.

            As we said on a previous topic,  I would need to do some calls from client-side business object, since we cannot send multipart from connector.

            But our URL will change depending on the system/environment (dev, prod, QA etc.). So I would like to fetch a URL, depending on the environment I am using.

             

             

             

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

          You must be logged in to reply to this topic.