Split the restful endpoint query into parts