repalce call links apis to call function apis