@collect_auth
def add_pointer(auth):
    to_node_id = request.json.get('toNodeID')
    pointer_to_move = request.json.get('pointerID')

    if not (to_node_id and pointer_to_move):
        raise HTTPError(http.BAD_REQUEST)

    pointer = Node.load(pointer_to_move)
    to_node = Node.load(to_node_id)
    try:
        _add_pointers(to_node, [pointer], auth)
    except ValueError:
        raise HTTPError(http.BAD_REQUEST)
Add a single pointer to a node using only JSON parameters
dataset/ETHPy150Open CenterForOpenScience/osf.io/website/project/views/node.py/add_pointer