How do you retrieve a post by slug name through REST API?

It works for my pages but not for my posts. If I go to it will retrieve the page correctly. If I go to it will not retrieve a post in the same way. Can someone tell me how to get a post by slug name? The post does have a category too, but I don’t know if it’s necessary or how to properly add that to the query. All the documentation I have found refers to the [filter] function which is no longer supported.




Custom post type:

Leave a Comment