Create custom RESTful API endpoint with JSON output in Drupal 7 RESTful API endpoints in Drupal can allow you to expose the content of Drupal website to other external resources. These endpoints can be used for fetching data with an AJAX call or simply a web service.