Skip to content

Commit f7cfaab

Browse files
committed
Add contextual project key to connection.get_info
1 parent 35846a2 commit f7cfaab

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

dataikuapi/dss/admin.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,18 @@ def get_location_info(self):
6565
warnings.warn("DSSConnection.get_location_info is deprecated, please use get_info", DeprecationWarning)
6666
return self.get_info()
6767

68-
def get_info(self):
68+
def get_info(self, contextual_project_key=None):
6969
"""
7070
Gets information about this connection.
7171
7272
Note: this call requires permissions to read connection details
7373
74+
:param contextual_project_key: optional project key use to resolve variables
7475
:returns: a :class:`DSSConnectionInfo` containing connection information
7576
"""
77+
additional_params = { "contextualProjectKey": contextual_project_key } if contextual_project_key is not None else None
7678
return DSSConnectionInfo(self.client._perform_json(
77-
"GET", "/connections/%s/info" % self.name))
79+
"GET", "/connections/%s/info" % self.name, params=additional_params))
7880

7981
########################################################
8082
# Connection deletion

0 commit comments

Comments
 (0)