Getting the Service URL of connector on client side
-
Vasileios Thanasias
Has successfully completed the online course Basics (100)
2 years ago #35260Hello, 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
2 years ago #35265::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
2 years ago #35262Vasileios Thanasias
Has successfully completed the online course Basics (100)
2 years ago #35263::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.
You must be logged in to reply to this topic.