6

How can I expose data from my Drupal site via web services to external applications such as iPhone or Android?

4 Answers 4

14

One of the most popular solutions is the Services module. It takes a little bit of set-up and know-how but it's very flexible in what it can output and what formats you need it. It's the solution we used at Palantir.net to provide data to our DrupalCon Chicago Android and iOS apps.

1
  • What is the best format to expose my data?JSON?
    – Dion
    Commented Mar 5, 2015 at 12:39
1

One option is to use RSS which is enabled by default. You can use RSS at http://example.com/rss.xml by default, or if you're using something like the views module, you can always set up an RSS feed for a specific view, to limit the data in the RSS feed to a specific type, or other filters.

0

Modules can also implement hook_xmlrpc(), and hook_xmlrpc_alter().
Depending on the data you need to exchange with the external applications, and from the format they need, you could also follow this approach.

0

For Drupal 8, it's best to use core REST API module. Here is a Drupal 8 Android app https://github.com/onedrupal/One-Drupal-Android that uses core REST APIs.

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.