Curl script to execute endpoints