Can services module be used to create a "Content API"?

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
dellis's picture

I'm having trouble wrapping my head around services. I was hoping a post here might yield some fruit. I have an interest in creating a "Content API" for my site--so that other people could submit custom queries to my drupal db and have something like a JSON object returned to them with the resulting content in it.

Thinking of a much more simple version of something that api.npr.org has. A couple of questions:

First, is this the kind of use-case that services was intended to fill?

Second, if not, is there another project I should look at--if it is, can someone point me in the right direction for a tutorial/example that might help me start down this path?

Thanks so much for any help/advice.

Comments

Yes, this is a central use

adub's picture

Yes, this is a central use case for services. As far as I understand, most people are currently using services either for flash front ends or for syndication in a controlled environment (e.g. internal redistribution of content). For a public API, Services 3 will be the best choice as it has features more in tune with this (resource oriented, multiple endpoints, multiple protocols for transport and auth).

(An alternative approach if your content doesn't need to be protected in any way would be to use queryable views outputting RSS or Atom.)

Newspapers on Drupal

Group organizers

Group categories

Topics - Newspaper on Drupal

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: