How to create REST API using views in Drupal 9 | Drupal 10

  Рет қаралды 7,207

Drupal Academy

Drupal Academy

Күн бұрын

Пікірлер: 13
@npnguyen
@npnguyen 8 ай бұрын
Hi sir, How can filter by title node?
@drupal-academy
@drupal-academy 8 ай бұрын
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.
@npnguyen
@npnguyen 8 ай бұрын
@@drupal-academy Thanks you sir, this helped me a lot
@ViktorBogutskii
@ViktorBogutskii Жыл бұрын
Cool! Also, the preview shows special characters, but on real request - raw data as expected. Thanks for short demo
@rubenescudero00
@rubenescudero00 Жыл бұрын
Do you know how I could document this view with swagger or something similar?
@carlosvillavicencio861
@carlosvillavicencio861 24 күн бұрын
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-academy
@drupal-academy 24 күн бұрын
@@carlosvillavicencio861 By adding expose filter, you can filter the data. Check pinned comment for more detail.
@SholikulHuda
@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
@bluehead_info Жыл бұрын
oauth module and access keys
@erhimanshuraj298
@erhimanshuraj298 Жыл бұрын
But we can pass Dynamically id
@drupal-academy
@drupal-academy Жыл бұрын
Yes, If you have watched full video. I passed dynamic node Id.
@erhimanshuraj298
@erhimanshuraj298 Жыл бұрын
@@drupal-academy can you share full video link
@drupal-academy
@drupal-academy Жыл бұрын
It is in same video. Starts at 6:09.
Introduction to RESTful Web Services in Drupal 10 | Part-1
6:32
Drupal Academy
Рет қаралды 1,3 М.
Une nouvelle voiture pour Noël 🥹
00:28
Nicocapone
Рет қаралды 9 МЛН
Cheerleader Transformation That Left Everyone Speechless! #shorts
00:27
Fabiosa Best Lifehacks
Рет қаралды 16 МЛН
Create custom theme in Drupal 9, Drupal 10 | D4Drupal
5:23
Call REST API using GET method in Drupal 9.
10:38
Drupal Academy
Рет қаралды 4,2 М.
5 Must Have Modules for Every Drupal Website
7:24
OSTraining
Рет қаралды 13 М.
How to easily add and use custom CSS to any D9 theme or template
9:22
How to create a custom theme for Drupal 9 and Drupal 10
13:38
ChatGPT for drupal developers (Drupal 10)
6:48
ASYNC Drupal
Рет қаралды 6 М.
WP REST API - Custom Endpoints
14:00
Watch and Learn
Рет қаралды 80 М.
What Are Web Services? | Install JSON:API Module | Configure allowed operations
12:45