cancel
Showing results for 
Search instead for 
Did you mean: 

API Endpoint for a List of Connections

fxs7576
9 - Travel Pro
9 - Travel Pro

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

1 ACCEPTED SOLUTION

DRay
Community Team Member
Community Team Member

Hi @fxs7576,

I'm not aware of a guided walkthrough, but we can work to get a technical resource to work with you directly. Can you reach out to your Sisense account team? They will be able to get that set up for you.

David Raynor (DRay)

View solution in original post

10 REPLIES 10

DRay
Community Team Member
Community Team Member

Hi @fxs7576,

Thank you for your question.

Is that a Live Connection or a Elasticube? Have you successfully built it yet?

David Raynor (DRay)

fxs7576
9 - Travel Pro
9 - Travel Pro

Hi @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:

  • project_name
  • branch_name
  • datamodel (which also has the same schema and live connection name)

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
Community Team Member
Community Team Member

Thank you for your reply @fxs7576.

Can you take a look at this post and let me know if it helps?

Thank you.

David Raynor (DRay)

fxs7576
9 - Travel Pro
9 - Travel Pro

Hi @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).

 

 

 

 

{
    "name": "Snowflake",
    "type": "live",
    "connection": {
        "provider": "SnowflakeJDBC",
"parameters": {},
    "schema": "null",
    "fileName": "null",
    "uiParams": {},
    "globalTableConfigOptions": {}
    }
}

 

 

 

fxs7576_0-1714764047626.png

 

 

DRay
Community Team Member
Community Team Member

Hi @fxs7576,

I am reaching out to internal technical resources to close the loop on this. 

David Raynor (DRay)

dehrlich
Sisense Team Member
Sisense Team Member

There 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

dehrlich
Sisense Team Member
Sisense Team Member

Attached is a screen shot of the API methods

Hi @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?

DRay
Community Team Member
Community Team Member

Hi @fxs7576,

I'm not aware of a guided walkthrough, but we can work to get a technical resource to work with you directly. Can you reach out to your Sisense account team? They will be able to get that set up for you.

David Raynor (DRay)

DRay
Community Team Member
Community Team Member

Hello @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.

David Raynor (DRay)