I have 2 custom post type (songs, artists) that are connected with each other by relation field, every songs post have a relation field that store artist that relate the song post.
I'm getting data for mobile app via rest API
but I need filter API result post based on
ACF field like getting songs post that related to an artist post.
Rest API : http://www.example.com/wp-json/wp/v2/songs
I need something like : http://www.example.com/wp-json/wp/v2/songs?artist=1234 that return songs post that artist field is 1234
I found some tutorial but they are more than 2 years old and don't work now.