I've been trying to follow good RESTful APIs practices when designing them. One of them which happens to be very simple and common keeps getting hard to follow:
- Use
GET
http verb to retrieve resources
Why? Consider you have a URI to get account information like this:
Where AXY_883772
is an account id in a bank system. Security auditing will raise a warning stating that:
- Account ID will appear on HTTP ACCESS LOGS
- Account ID might get cached on browser's history (even though is unlikely to use a browser regularly to access a RESTful API)
And they end up by "recommending" that POST
verb should be used instead.
So, my question is:
What can we do about it? Just follow security recommendations and avoid using GET
most of the times? Use some kind of special APACHE/IIS/NGINX access log configuration to avoid logging access to certain URLs?