making api run scripts