@fiss_cmd<EOL>def entity_copy(args):
if not args.to_workspace:<EOL><INDENT>args.to_workspace = args.workspace<EOL><DEDENT>if not args.to_project:<EOL><INDENT>args.to_project = args.project<EOL><DEDENT>if (args.project == args.to_project<EOL>and args.workspace == args.to_workspace):<EOL><INDENT>eprint("<STR_LIT>"<EOL>"<STR_LIT>")<EOL>return <NUM_LIT:1><EOL><DEDENT>if not args.entities:<EOL><INDENT>ents = _entity_paginator(args.project, args.workspace, args.entity_type,<EOL>page_size=<NUM_LIT>, filter_terms=None,<EOL>sort_direction='<STR_LIT>')<EOL>args.entities = [e['<STR_LIT:name>'] for e in ents]<EOL><DEDENT>prompt = "<STR_LIT>"<EOL>prompt = prompt.format(len(args.entities), args.entity_type, args.project,<EOL>args.workspace, args.to_project, args.to_workspace)<EOL>if not args.yes and not _confirm_prompt("<STR_LIT>", prompt):<EOL><INDENT>return<EOL><DEDENT>r = fapi.copy_entities(args.project, args.workspace, args.to_project,<EOL>args.to_workspace, args.entity_type, args.entities,<EOL>link_existing_entities=args.link)<EOL>fapi._check_response_code(r, <NUM_LIT>)<EOL>return <NUM_LIT:0><EOL>
Copy entities from one workspace to another.