Updated rest url in api call. Added message when query fails. Starting
to add input validation.