Skip to main content
Glama

transfer_workflow

Transfer ownership of a workflow to a new user by specifying the workflow ID and new owner ID, enabling efficient management of workflow permissions and responsibilities.

Instructions

Transfer workflow ownership to a new user

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
new_owner_idYes
workflow_idYes

Implementation Reference

  • The core handler function that implements the transfer_workflow tool logic. It validates the workflow and new owner exist, creates a TransferWorkflowContract, and calls the Alteryx API to transfer ownership.
    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}"
  • MCP tool registration decorator (@self.app.tool()) that wraps and registers the transfer_workflow function, delegating execution to the Tools instance.
    @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)
  • Swagger-generated model class defining the input schema for the transfer workflow API contract, with fields 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