1. Edit your view and add filter criteria for the node title field. 2.Configure the filter to expose it to the REST API by checking the "Expose this filter to visitors, to allow them to change it" option. 3. Select Filter type to expose as "Single filter" 4. In Operators select "Contains any word" 5. Save your view. 6. Access your API with end point like this : /api/employee/?title=loren%20ipsun Here you can see, I have passed title with node title in query parameter. I hope this will be helpful to you.
@npnguyen8 ай бұрын
@@drupal-academy Thanks you sir, this helped me a lot
@ViktorBogutskii Жыл бұрын
Cool! Also, the preview shows special characters, but on real request - raw data as expected. Thanks for short demo
@rubenescudero00 Жыл бұрын
Do you know how I could document this view with swagger or something similar?
@carlosvillavicencio86124 күн бұрын
Very interesting, but how do I create filters? let's say there are some parameters in the view, say employee's age, and we want those who have a specific age. Or language of the person.
@drupal-academy24 күн бұрын
@@carlosvillavicencio861 By adding expose filter, you can filter the data. Check pinned comment for more detail.
@SholikulHuda Жыл бұрын
how to make those API only available for authenticated users or roles based users only? I try to choose Access Roles, but in postman i got 403 Forbidden error
@bluehead_info Жыл бұрын
oauth module and access keys
@erhimanshuraj298 Жыл бұрын
But we can pass Dynamically id
@drupal-academy Жыл бұрын
Yes, If you have watched full video. I passed dynamic node Id.