PUT API /admin/connections/ throwing error

Ankit96140
Level 2
PUT API /admin/connections/ throwing error

Hi,

I am trying to update the db connection details using REST API provided by Dataiku.i am adding same object received by GET /admin/connections/${connectionName} call in the request body for PUT API but its trowing BAD request error.

Can any one help me with exact format of request body ?

 

0 Kudos
1 Reply
Clรฉment_Stenac

Hi,

You need to PUT on /admin/connections/connectionName

(on /admin/connections you can only GET to list and POST to create).

The body of the PUT /admin/connections/connectionName must be exactly the same thing than the result of GET /admin/connections/connectionName

Please note that we strongly recommend using the Python API client whenever possible rather than the raw REST API as the API client provides higher-level helpers.

You can notably see the GET/PUT couple for connections here: https://github.com/dataiku/dataiku-api-client-python/blob/master/dataikuapi/dss/admin.py#L90 

0 Kudos