I'm working to integrate a Drupal 8 site's content into a 3rd-party search tool. To get our data, the 3rd party requires us to post JSON to their API. Having never done this before, what is conceptually needed to accomplish this in Drupal 8? The site in question is around 5-6k nodes.

My initial thoughts are a custom module with a route that calls a controller function that creates an http client. The client gets its data from a json View. So when I visit the route, it pushes the data to the endpoint? That is my rough guess and any insight is much appreciated.


1 Answer 1


Quite a few ways to do that, but here's one approach using the queue api, for async processing:

  1. Add the items to a queue on save.
  2. Add a queue worker to process the queue and send the items to the remote service.

If you use a cron queue, you can process them automatically via cron.

More info:

  • Thanks, David! I'll be sure to consider implementing using this type of approach. Commented Dec 10, 2020 at 20:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.