How To Get All Posts With Custom Taxonomy Of X

I’m trying to get a list of all posts with a certain custom taxonomy.

I know I can retrieve all the types of said custom taxonomy (genre) using the following:

const response = await libraries.source.api.get({
 endpoint: "genre",
  params: {
   per_page: 100,
  },
 });

But what if I want all posts that have a genre property of “disco”?

Thanks
James

Hi @fishoutdolanout . You should pass any params to the request that you would use building the WP REST API request manually. So, for this I’d suggest you check the WP REST API docs to know what query do you need exactly to get the posts filtered by genre.