Skip to main content

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

 

Using Postman to perform a GET command for a node

The get string is https:/{your-site.com}/node/<nid>?_format=hal_json, where the variable <nid> is changed to the required integer.  In this example we will use the integer 1 (one).

GET input: https://{your-site.com}/node/1?_format=hal_json

Under the headers area:

Authorization: for the moment use basic... need to cross check level of security using this type.  There are two inputs required, these will be the credentials of the user logged in:

  • username: 
  • password:

For now use the credentials you are using to access the site.

Content-Type: application/hal+json

Accept: application/hal+json

X-CSRF-Token: This token is accessed via the following URL - {your-site.com}/rest/session/token.  Note, you need to log into the staging site before calling the session token.

 

Related articles