Update to API to allow endpoint defition to send alternative status codes and simulate latency - fix #1