Last active
July 27, 2018 21:50
-
-
Save Abromeit/d0dac75f20c0825b3b4c032885cf3d6d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## POSTS ################################################################################################# | |
| # list all posts, paginated | |
| # where result posts might be everthing under '/news/' or sth. | |
| # | |
| # interesting values included: | |
| # * comment_status (if comments are allowed) | |
| # * ping_status (if pings from other weblogs are allowed) | |
| # * slug | |
| # * date_gmt | |
| # * modified_gmt | |
| # * link (the absolute post url) | |
| # * content.rendered (AFAIS the full post content without boilerplate - perfect for crawlers) | |
| # | |
| # default `per_page` is 10 | |
| https://some-wordpress-website.tld/wp-json/wp/v2/posts?page=1&per_page=100 | |
| # list latest posts, paginated | |
| # where result posts might be filtered from everthing under '/news/' or sth. | |
| # | |
| # `after` cannot be written as '2018-03-00'! | |
| # default `per_page` is 10 | |
| https://some-wordpress-website.tld/wp-json/wp/v2/posts?after=2018-03-01T00:00:00&page=1&per_page=100 | |
| # search within posts (ala `?q=…`), paginated | |
| # where result posts might be filtered from everthing under '/news/' or sth. | |
| # | |
| # default `per_page` is 10 | |
| https://some-wordpress-website.tld/wp-json/wp/v2/posts?search=online+marketing&page=1&per_page=100 | |
| ## PAGES ################################################################################################# | |
| # list all pages, paginated | |
| # where result pages might be 'about us', 'contact', etc. | |
| # | |
| # default `per_page` is 10 | |
| https://some-wordpress-website.tld/wp-json/wp/v2/pages?page=1&per_page=100 | |
| # search within pages (ala `?q=…`), paginated | |
| # where result pages might be 'about us', 'contact', etc. | |
| # | |
| # default `per_page` is 10 | |
| https://some-wordpress-website.tld/wp-json/wp/v2/pages?search=online+marketing&page=1&per_page=100 | |
| ## OTHER ################################################################################################# | |
| # list all wp users, paginated | |
| # | |
| # default `per_page` is 10 | |
| https://some-wordpress-website.tld/wp-json/wp/v2/users?page=1&per_page=100 | |
| # list all comments, paginated | |
| # | |
| # default `per_page` is 10 | |
| https://some-wordpress-website.tld/wp-json/wp/v2/comments?page=1&per_page=100 | |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
get number/sum of comments on a blog