Article

Module 1

Published: 4 Jun 2021 | Last updated 4 June 2021

1. Create a module in Drupal 8 with name: Node JSON Data, machine name node_json_data.

2. Create a configuration form in which an API key is accepted from the user. API Key will be a maximum 16 digit text value.

3. Create a controller with route /data/{apikey}/{node-id}, where api key should be same as API key saved in settings, and node-id should be valid node id existing in the system.

4. Once the route is accessed and everything is right, return JSON data on the node.

5. Push all the code on Github.

  • techtud official
  • @techtud
  • Senior editor at techtud

What to read next

Please Go through all these linksW3Schools – HTML Tutorial

DefinitionFiber optics is the technology used to transmit information as pulses of light through strands of fiber made of glass or plastic over long