How to purge WP REST API

If you are using a cache for WordPress and want to include the WP-API, you'll have to invalidate it when a post is published or edited.
This is the list of urls you need to invalidate when a POST X is published or edited:

POST X:

LATEST POST, from the page where POST X is located (for example 3):

CATEGORIES (for example Y) containing POST X, from the page where POST X is located (for example 7):

TAGS (for example Z) containing POST X, from the page where POST X is located (for example 1):

Other useful considerations: