Skip to main content
Glama
jupiterbak

AYX-MCP-Wrapper

by jupiterbak

transfer_workflow

Transfer ownership of Alteryx workflows to different users by specifying workflow and new owner IDs.

Instructions

Transfer workflow ownership to a new user

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workflow_idYes
new_owner_idYes

Implementation Reference

  • MCP tool registration for 'transfer_workflow'. The @self.app.tool() decorator registers this thin handler function with the MCP server, which delegates execution to the Tools class method.
    @self.app.tool()
    def transfer_workflow(workflow_id: str, new_owner_id: str):
        """Transfer workflow ownership to a new user"""
        return self.tools.transfer_workflow(workflow_id, new_owner_id)
  • Core handler logic in the Tools class. Validates the workflow and new owner exist, creates TransferWorkflowContract, calls the Alteryx Server API to transfer ownership, and formats the response.
    def transfer_workflow(self, workflow_id: str, new_owner_id: str):
        """Transfer a workflow to a new owner by its ID"""
        try:
            workflow = self.workflows_api.workflows_get_workflow(workflow_id)
            if not workflow:
                return "Error: Workflow not found"
            new_owner = self.users_api.users_get_user(new_owner_id)
            if not new_owner:
                return "Error: New owner not found"
            contract = server_client.TransferWorkflowContract(owner_id=new_owner_id)
            api_response = self.workflows_api.workflows_transfer_workflow(workflow_id, contract)
            return pprint.pformat(api_response)
        except ApiException as e:
            return f"Error: {e}"
  • Swagger-generated schema/model for TransferWorkflowContract, used as the request body for the workflows_transfer_workflow API call. Defines owner_id (required) and transfer_schedules.
    class TransferWorkflowContract(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 = {"owner_id": "str", "transfer_schedules": "bool"}
    
        attribute_map = {"owner_id": "ownerId", "transfer_schedules": "transferSchedules"}
    
        def __init__(self, owner_id=None, transfer_schedules=None, _configuration=None):  # noqa: E501
            """TransferWorkflowContract - a model defined in Swagger"""  # noqa: E501
            if _configuration is None:
                _configuration = Configuration()
            self._configuration = _configuration
    
            self._owner_id = None
            self._transfer_schedules = None
            self.discriminator = None
    
            self.owner_id = owner_id
            self.transfer_schedules = transfer_schedules
    
        @property
        def owner_id(self):
            """Gets the owner_id of this TransferWorkflowContract.  # noqa: E501
    
    
            :return: The owner_id of this TransferWorkflowContract.  # noqa: E501
            :rtype: str
            """
            return self._owner_id
    
        @owner_id.setter
        def owner_id(self, owner_id):
            """Sets the owner_id of this TransferWorkflowContract.
    
    
            :param owner_id: The owner_id of this TransferWorkflowContract.  # noqa: E501
            :type: str
            """
            if self._configuration.client_side_validation and owner_id is None:
                raise ValueError("Invalid value for `owner_id`, must not be `None`")  # noqa: E501
    
            self._owner_id = owner_id
    
        @property
        def transfer_schedules(self):
            """Gets the transfer_schedules of this TransferWorkflowContract.  # noqa: E501
    
    
            :return: The transfer_schedules of this TransferWorkflowContract.  # noqa: E501
            :rtype: bool
            """
            return self._transfer_schedules
    
        @transfer_schedules.setter
        def transfer_schedules(self, transfer_schedules):
            """Sets the transfer_schedules of this TransferWorkflowContract.
    
    
            :param transfer_schedules: The transfer_schedules of this TransferWorkflowContract.  # noqa: E501
            :type: bool
            """
            if self._configuration.client_side_validation and transfer_schedules is None:
                raise ValueError("Invalid value for `transfer_schedules`, must not be `None`")  # noqa: E501
    
            self._transfer_schedules = transfer_schedules

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jupiterbak/AYX-MCP-Wrapper'

If you have feedback or need assistance with the MCP directory API, please join our Discord server