Wordpress REST API - get custom taxonomy category posts

I want to use Wordpress REST API to get the posts that are inside a custom taxonomy created by the theme.

The taxonomy is called my_portfolio but if I use this I have this response:

{code:rest_no_route,message:Nessun percorso fornisce una corrispondenza tra l'URL ed il metodo richiesto.,data:{status:404}}

Instead if I use my_portfolio_category I have 4 categories that are called: photo, video, design, web.

I want to retrieve the posts inside the category photos but the only thing I managed to get is the category info.

The API I used is the one down below where 921 is the ID of the category photo, using the slug doesn't work.

https://www.mywebsite.com/wp-json/wp/v2/my_portfolio_category/921

Is there a way to get the posts?

Topic wp-api rest-api custom-taxonomy api Wordpress

Category Web

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.