rest api - Why does AWStats show wp-json* as Viewed URLs

admin2025-06-05  0

Generally, I track site resource usage using Google Analytics. Recently, I needed to check a clients site stats through AWStats instead. I noticed a number of URLs starting with /wp-json ...

My client uses FTP for a few web tasks and will not see those files in the directory structure. The fact that these record start with wp- is likely to be a source of confusion. While I understand that this is tied to the REST API in /wp-includes, I need to give my client a better explanation because I will be sharing those stats with her.

Generally, I track site resource usage using Google Analytics. Recently, I needed to check a clients site stats through AWStats instead. I noticed a number of URLs starting with /wp-json ...

My client uses FTP for a few web tasks and will not see those files in the directory structure. The fact that these record start with wp- is likely to be a source of confusion. While I understand that this is tied to the REST API in /wp-includes, I need to give my client a better explanation because I will be sharing those stats with her.

Share Improve this question edited Dec 30, 2018 at 1:05 Nora McDougall-Collins asked Dec 29, 2018 at 1:40 Nora McDougall-CollinsNora McDougall-Collins 3952 silver badges15 bronze badges 2
  • And what do you mean by “better explanation”? URL has nothing to do with files on server - there is no directory like /rss/ and there is no directory like /category/uncaregorized/, so what is the problem with correct explanation - these are the requests to REST API? – Krzysiek Dróżdż Commented Dec 29, 2018 at 7:24
  • That is a very good thought! I can provide an explanation that compares the /wp-json* addresses to /category/*. The place where I got stumped is the ambiguity in the pattern of wp-json looking so much like wp-content or wp-config.php. If you can put this in an answer, I will check it. – Nora McDougall-Collins Commented Dec 29, 2018 at 17:49
Add a comment  | 

2 Answers 2

Reset to default 2

I'm not entirely sure what will be better explanation, or why this one (the real one) is not enough.

In your stats you see URLs of requests and not paths to files. URL has nothing to do with files on server.

Yes - if the requests targets physical file, then that file exists, but... There are plenty URLs that are not connected to any file - mod_rewrite takes care of them. For example there is no directory like /rss/ anywhere in your WP installation directory. There is no directory like /category/uncaregorized/, and yet - both of these URLs work and you can find them in stats...

I don't see anything wrong in explaining, that your client sees HTTP requests and not file paths. And these /wp-json/* requests are requests to WP REST API.

PS. You don't see them in Google Analytics, because there is no tracking code in REST API, so there requests are not logged to GA. But AWStats are more like server logs, so all requests get logged.

Just delete the data from what you're showing the client. If a person doesn't understand what the API is, showing him data on it will simply confuse the human being. Use Whiteout if you have to.

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1749059103a316005.html

最新回复(0)