0

We have an application behind our firewall that we want to push content to a content type on our external Drupal site. Our internal application will need to create new nodes, update existing nodes, and delete existing nodes as needed. It would also have to have some kind of authentication method that would be used by the application.

What modules/process (services maybe) are best for doing this type of action on the Drupal site? What type of custom programming will need to be done on the Drupal side to allow this?

0

Services might be your easiest path to success. For custom programming, your custom application would need to be able to make a RESTful (or SOAP) call against an external endpoint.

Services can accept a lot of data input depending on how you set it up. Everything from:

  • bencode
  • json
  • jsonp
  • php
  • xml
  • yaml

You can configure most of this from the UI, but if you want you can extend the services module and create custom resources and tune the data you take in and what variables you expose.

For authentication, you have a lot of options. By default, session authentication comes with it, but you can extend via modules to add things like API key authentication, basic authentication, Oauth and more.

One of many guides: https://www.ostraining.com/blog/drupal/services/

0

I use a custom module to do this very thing in D7. It works like this:

  • The internal applications write to a transaction log (a database table) reflecting changes that will need to be added/edited/deleted on the site.
  • A simple API app exposes this transaction log over the Internet, with API keys.
  • The Drupal site reads new transaction log entries (it remembers the last log entry it synchronized) from the API then queues and makes the node changes when cron runs.

You could do something similar in D8. Or, considering Drupal 8 has a RESTful API, you could instrument your internal application to make synchronous changes to the Drupal site.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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