get_connection_by_id
Retrieve specific connection details from Alteryx Servers using its unique identifier to access configuration and status information.
Instructions
Get a connection by its ID
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| connection_id | Yes |
Implementation Reference
- src/tools.py:731-738 (handler)Core implementation of the get_connection_by_id tool. Fetches the connection details from the DCM API using the provided connection_id and returns a pretty-formatted string of the API response or an error message.def get_connection_by_id(self, connection_id: str): """Get a connection by its ID""" try: api_response = self.dcm_api.d_cme_get_dcm_connection(connection_id) return pprint.pformat(api_response) except ApiException as e: return f"Error: {e}"
- src/mcp_server.py:351-355 (registration)MCP tool registration decorator and wrapper function that delegates the call to the underlying tools instance method.@self.app.tool() def get_connection_by_id(connection_id: str): """Get a connection by its ID""" return self.tools.get_connection_by_id(connection_id)
- Pydantic/Swagger-generated model defining the structure of the DCMEGetConnectionView response object returned by the underlying API, used in the tool's output.class DCMEGetConnectionView(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ """ Attributes: swagger_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ swagger_types = { "shared_by": "DCMEUserView", "shared_from_connection": "str", "connection_id": "str", "assigned_connection_ids": "list[str]", "created_on": "datetime", "last_changed_on": "datetime", "owner": "DCMEUserView", "sharing": "DCMESharingView", "id": "str", "name": "str", "schema_name": "str", "allow_in_sdks": "bool", "parameters": "dict(str, object)", "data_source": "DCMEDataSourceView", "credentials": "dict(str, DCMECredentialView)", } attribute_map = { "shared_by": "sharedBy", "shared_from_connection": "sharedFromConnection", "connection_id": "connectionId", "assigned_connection_ids": "assignedConnectionIds", "created_on": "createdOn", "last_changed_on": "lastChangedOn", "owner": "owner", "sharing": "sharing", "id": "id", "name": "name", "schema_name": "schemaName", "allow_in_sdks": "allowInSdks", "parameters": "parameters", "data_source": "dataSource", "credentials": "credentials", } def __init__(