transfer_all_assets
Transfer all assets from one user to another in Alteryx Server. Use this tool to reassign workflows, collections, and resources between users.
Instructions
Transfer all assets from one user to another
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| user_id | Yes | ||
| new_owner_id | Yes |
Implementation Reference
- src/tools.py:447-472 (handler)Core handler function implementing the logic to transfer all specified assets (workflows, schedules, collections) from one user to another using the Alteryx Server API.def transfer_all_assets( self, user_id: str, new_owner_id: str, transfer_workflows: bool, transfer_schedules: bool, transfer_collections: bool, ): """Transfer all assets (workflows, schedules, collections) owned by one user to another.""" try: user = self.users_api.users_get_user(user_id) if not user: return "Error: User 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.TransferUserAssetsContract( owner_id=new_owner_id, transfer_workflows=transfer_workflows, transfer_schedules=transfer_schedules, transfer_collections=transfer_collections, ) api_response = self.users_api.users_transfer_assets(user_id, contract) return pprint.pformat(api_response) except ApiException as e: return f"Error: {e}"
- src/mcp_server.py:271-274 (registration)MCP tool registration for 'transfer_all_assets' using the @app.tool decorator, which delegates to the tools implementation.@self.app.tool() def transfer_all_assets(user_id: str, new_owner_id: str): """Transfer all assets from one user to another""" return self.tools.transfer_all_assets(user_id, new_owner_id)