Setting up for hal_json RESTful services
The development version of the app database is held on the staging site. Note all development and testing will be completed on the staging site.
Drupal 9 uses:
- HAL : Serializes entities using Hypertext Application Language.
- RESTful Web Services
For testing purposes you can use either of the following Chrome extensions:
- Postman;
- DHC
RESTful query user - Drupal
The user parameters provides details about a specific user based on the following parameters:
- User uid;
The output of this query will return user profile data only of the fields containing data. An example of the data returned includes, but is not limited to the following:
REST API Drupal user
The user API, was originally created under the General Documenation area (see Query - user). I'm creating a new user API document under the API documentation area.
Calling a query
To call a user query the details are required:
Uploading plist data to the server using an API
I had an instance where I needed to move content from a plist to the server database. To achieve this step, I added a few lines of code where the plist was called and added a call to the API so the data would be on the server.
The original code appeared as: