API Endpoint for a List of Connections
Hi SiSense Community,
Is there a REST API endpoint that will list down all the connections along with their oid?
For some reason, 'api/v1/connection' endpoint doesn't show the Snowflake connection that I've just set up.
Thanks
fxs7576
Posted 2 years ago · Edited 2 years ago·Last reply 2 years ago
10 comments
DRay
·2 years agoHello fxs7576,
I wanted to follow up to see if the solution offered by dehrlich worked for you.
If so, please click the 'Accept as Solution' button so that other users with the same questions can find the answer faster. If not, please let us know so that we can continue to help.
Thank you.
DRay
·2 years agoHi fxs7576,
Thank you for your question.
Is that a Live Connection or a Elasticube? Have you successfully built it yet?
fxs7576
OP2 years agoHi DRay
It's a live connection to Snowflake, and I have successfully published it.
The reason for this is that I'm currently working with multiple instances (say, instance A and instance B) that have the same:
When I move from instance A to instance B, I have to manually reconfigure the datamodel connection (as its connection oid for different instances is not the same) in the SiSense app for the datamodel to work. Checking to see if I can change the datamodel's connection via. REST API (per this instruction) which might require the connection metadata.
Regards
DRay
·2 years agoThank you for your reply fxs7576.
Can you take a look at this post and let me know if it helps?
Thank you.
fxs7576
OP2 years agoHi DRay,
Thanks for referring me to the PATCH /datamodels/{datamodelId}/schema/datasets/{datasetId} endpoint.
With that endpoint, can we switch the connection of the datamodel to the existing one?
When using the following body payload, the endpoint created a new connection named SnowflakeJDBC -Snowflake..., and the datamodel is connecting to it instead of the existing connection named Snowflake (as shown in the attached screenshot).
DRay
·2 years agoHi fxs7576,
I am reaching out to internal technical resources to close the loop on this.
David Ehrlich
·2 years agoThere is an easier way to manage the connections. You can turn on connection management through Admin/feature management (https://docs.sisense.com/main/SisenseLinux/about-connecting-sisense-with-data-sources.htm).
Once connection management is turned on (wait about 10 minutes the first time for the system to upgrade the existing connections) you can then use the v2 connection-rest-controller API methods. This feature has been available since L2023.7
David Ehrlich
·2 years agoAttached is a screen shot of the API methods
fxs7576
OP2 years agoHi dehrlich and DRay ,
Really appreciate for the reply. I can now see the live connection that I need via. GET api/v2/connections endpoint.
Is there any tutorial on how to switch the connection of the datamodel to the existing live connection using connection-rest-controller API methods?