We have external webservice which is making query to our sales force and getting the data. how can i see the logs for that external service, like what query they are making and what is returned.
@DanielBallinger has one solution but frankly, when faced with this situation in my orgs, if the third party service is making OOTB REST/SOAP API calls on Salesforce, I go to that third party system's logging to see what queries are made and the responses therein.
If the third party system is having issues, that system should be doing logging. SFDC OOTB REST/SOAP APIs are guaranteed to deliver correct results given whatever query is supplied (hence perhaps explaining why the queries aren't logged in SFDC as part of the standard license).
Should you be using a custom REST service, then the incoming request and response can be logged to a custom
One option is to use the Event Monitoring API (This will be a paid feature outside of a developer edition org).
With this API you can pull a log file down that shows all API calls made within a 24-hour period. You would just need to select the correct Event Type based on the API being called. Not that this won't show you the data returned at the time the call was made.