$conf, $runtime; function_exists('chdir') AND chdir(APP_PATH); $r = 'mysql' == $conf['cache']['type'] ? website_set('runtime', $runtime) : cache_set('runtime', $runtime); } function runtime_truncate() { global $conf; 'mysql' == $conf['cache']['type'] ? website_set('runtime', '') : cache_delete('runtime'); } register_shutdown_function('runtime_save'); ?>rest api - Why does AWStats show wp-json* as Viewed URLs|Programmer puzzle solving
最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

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

matteradmin10PV0评论

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.

Post a comment

comment list (0)

  1. No comments so far