Building Web Services with Drupal 7

Web services, APIs, structured data. These things are all the rage right now and with good reason. As more and more internet enabled devices start wanting to make use of the data in our websites we need to give them some way to interact with that data that isn’t point and click in a browser. Enter the Drupal 7 services module.

In this series Joe Shindelar will walk through using the services module and teach you how to create a RESTful web services API that exposes Drupal’s internal data like nodes and users as JSON or XML that can be easily consumed by a huge variety of clients and programming languages. Paving the way for allowing access to the data contained within your Drupal site to any number of native mobile applications, partner websites, or even internet enabled refrigerators.

The first few lessons in the series are focused more on theory and explaining the various terms that are used both in Drupal and the wider web development sphere to describe web services and all the pieces. Including a description of REST itself and an explanation for why it’s a good fit. As well as some discussion about Drupal 7’s content model and the ways that it lends itself nicely to serializing data into various formats via the services module in order to be consumed in structured and meaningful ways.

Throughout the series we’ll see a couple of examples of how to first enable Drupal to return requested data elements as JSON and then subsequently how to properly format an HTTP request to retrieve those elements. Joe will demonstrate making requests to the API via both cURL and the Chrome REST Console. Doing so will help students to learn about both the Drupal configuration that is required and the way in which any 3rd party applications can request data from Drupal via concrete examples.

With the basics of creating an endpoint and making simple requests out of the way Joe will demonstrate how to enable authentication via the services module and then use both cURL and the REST Console to explain the authentication handshake. A somewhat complex exchange of a username & password for a session authentication token that takes place in HTTP requests and headers whenever you want to perform an action via the API that requires an authenticated user. Learning how this works will enable to you create 3rd party applications that can access Drupal as a specific user allowing for greater personalization.

After that Joe looks at ways to integrate the lists that site administrators create using the views module with services in order to output their contents as structured data. As wall as ways to use views to create entirely new custom services resources. Followed by an example of leveraging the power of views exposed filters via services.

Finally, for those scenarios where you simply can’t point and click your way to an answer Joe will teach you how to implement your own custom services resources for both saving and retrieving data from within Drupal. Demonstrating the basic knowledge required to allow you to use services to solve all of your own custom API needs.

Things you’ll be able to do after completion of this series:

  • Understand the basic principals of both web services and RESTful APIs.
  • Explain why Drupal is a good fit for web applications that want to allow 3rd party clients to access their data.
  • Create a RESTful web services API using the services module for Drupal 7.
  • Retrieve data from your Drupal site in both JSON and XML format.
  • Create new nodes in Drupal via web services.
  • Make authenticated requests to Drupal via web services.
  • Integrate the views module with services to retrieve views data in various formats.
  • Write your own module providing custom services data and actions.
  • Create meaningful documentation that will enable others to take advantage of your newly created service.

This series provides information about the services module for both intermediate and advanced Drupal users. Since this module makes use of basic Drupal site building skills and custom views users should be familiar with those topics. Also, while not required knowledge of running commands via the command line will be helpful. Finally, if you want to write your own custom services resources you’ll need to understand basic module development.

Related posts

21 Replies to “Building Web Services with Drupal 7
  1. 即日取款,還款期長達36期。自主財務,輕鬆還款無壓力。集誠是你可靠的財務策劃師! 貸款額高達30萬. 多元化的低息網上貸款服務. 10分鐘極速批核. 只需簡單文件. 還款期長達36期. 你可靠的財務策劃師. 服務: 私人貸款, 業主貸款, 公務員貸款, 樓宇按揭, 升學貸款, 現金周轉, 清還咭數.

  2. 高能聚焦量超聲波( HIFU )以物理性聚焦集中成一點, 快速穿透皮膚真皮及脂肪層面直達面部表淺肌肉腱膜系統( SMAS )層令其組織細胞分子高速磨擦 , 瞬間升溫至60 -70 度,令整個表淺肌肉腱膜系統( SMAS )受熱收縮,形成熱固化區域, 令結綈組織同時拉緊,達到拉皮防皺及美容效果。SMAZ聚焦超聲波提供了最有效的HIFU能量收緊皮膚及刺激胶原蛋白新生,提升彈性,恢復更緊緻的皮膚和更年輕的美貌。激光陰道收緊療程

  3. 加強優化面部輪廓,可被身體完全吸引,能自然地修飾面部輪廓 功效可長達24個月以上 JUVEDERM的特點: 效果立即可見 非永久性 非手術性 安全有效 效果自然 JUVEDERM獲歐盟(CE)及美國及藥物管理局(FDA)認證 首先及唯一獲得FDA認證在首次療程後能維持長達一年2-4功效 新世代專員Hylacross科技為產品帶來獨特的物理特質,包括凝聚力、支撐力及柔順度 8點提升 這是一套由全球著名醫學美容醫生Dr. Maurício de Maio,以JUVÉDERM®系列透明質酸產品為基礎而研發的面部優化療程,藉著簡單程序便達致面部優化效果,不需進行手術,減低風險。 此療程會根據病人的個別情況,重點針對面部8個最常因流失膠原蛋白及彈性纖維而凹陷的位置,再依據特定的順序,從顴骨至下巴位置配合JUVÉDERM®系列的透明質酸產品進行療程,從而改善這些位置的豐盈度及滑溜度,全面性優化面部輪廓。真空激光脫毛

  4. 有關雙眼皮手術、眉壓眼、抬頭紋、三角眼、前額拉皮、前額提拉、抬眉手術眼袋手術、中下臉拉皮手術、提眉手術、全臉補脂、自體脂肪移植、隆鼻手術等一些相關、似是而非或有爭議的事項的披露與討論。鎖色

  5. Thanks a lot for providing individuals with an extraordinarily spectacular chance to read from this blog. It is usually so good plus full of a lot of fun for me and my office co-workers to visit your web site really thrice in one week to read the new guides you will have. Of course, I’m also always amazed with your great suggestions you serve. Certain 3 ideas in this article are unquestionably the most efficient we’ve had.

  6. I simply desired to say thanks once again. I am not sure what I could possibly have carried out in the absence of the entire recommendations contributed by you regarding that concern. It seemed to be the distressing situation in my view, nevertheless finding out this skilled form you resolved it made me to weep with happiness. Now i’m thankful for the support as well as pray you know what an amazing job your are doing teaching the others by way of your web page. I’m certain you’ve never met any of us.

  7. I precisely wished to say thanks all over again. I do not know what I would have accomplished in the absence of the type of ideas shown by you relating to such a area of interest. It became the frightful difficulty in my view, but seeing the expert style you managed it took me to cry with contentment. I am happy for the service and thus expect you recognize what a great job you happen to be providing instructing people by way of your blog. Most probably you haven’t come across any of us.

  8. My wife and i have been absolutely thankful that Emmanuel could deal with his investigation with the precious recommendations he was given from your own web page. It’s not at all simplistic to simply be giving freely helpful hints other folks might have been making money from. And now we keep in mind we have got the website owner to thank for this. Most of the illustrations you have made, the straightforward blog navigation, the relationships you will aid to promote – it is all powerful, and it is assisting our son in addition to us believe that the situation is satisfying, which is highly fundamental. Thank you for all!

  9. My wife and i got quite peaceful when John could conclude his research while using the ideas he obtained out of the web site. It is now and again perplexing just to choose to be making a gift of thoughts which often other people have been making money from. And now we realize we now have the website owner to appreciate because of that. All the explanations you made, the straightforward web site menu, the relationships your site help to instill – it is mostly spectacular, and it is aiding our son in addition to our family imagine that this issue is cool, and that’s exceedingly vital. Thank you for all!

  10. I am also writing to let you be aware of of the fabulous discovery my friend’s child encountered browsing your web page. She even learned numerous things, which include what it is like to have a very effective helping nature to get other individuals with no trouble thoroughly grasp selected multifaceted things. You truly did more than readers’ desires. Thanks for imparting such important, safe, revealing not to mention fun tips about that topic to Kate.

  11. My wife and i were really fortunate Peter managed to round up his web research by way of the ideas he came across out of your weblog. It’s not at all simplistic to simply happen to be giving out things which usually other folks have been selling. And we all consider we have got the website owner to appreciate because of that. Most of the explanations you made, the easy site navigation, the friendships your site aid to instill – it’s got everything fantastic, and it’s assisting our son in addition to our family reckon that the issue is awesome, and that is wonderfully important. Thank you for the whole thing!

  12. I precisely had to appreciate you yet again. I am not sure the things I could possibly have undertaken in the absence of the concepts contributed by you regarding my subject matter. It was actually a real difficult concern in my view, however , encountering a specialized avenue you dealt with it took me to cry with happiness. I’m just happy for this information and wish you comprehend what a great job you were accomplishing educating other individuals thru a web site. I know that you have never met all of us.

  13. I precisely desired to appreciate you once again. I am not sure the things that I would have handled in the absence of the actual recommendations discussed by you on my industry. It was the terrifying case for me, but looking at the very professional form you solved it made me to cry over delight. I am just grateful for your assistance and as well , trust you know what an amazing job you are always accomplishing instructing the mediocre ones using a web site. More than likely you haven’t got to know any of us.

  14. Thank you for your own effort on this blog. My niece delights in managing research and it’s really simple to grasp why. Most of us hear all relating to the compelling manner you render invaluable thoughts by means of your web blog and even welcome response from visitors on that point plus our favorite simple princess is without question starting to learn a lot of things. Have fun with the rest of the new year. You’re doing a dazzling job.

  15. My husband and i got so relieved when John managed to deal with his survey by way of the ideas he acquired in your web page. It’s not at all simplistic to simply happen to be making a gift of things which most people have been trying to sell. And we also acknowledge we have got the writer to give thanks to because of that. All the explanations you made, the easy website menu, the relationships you help instill – it is most terrific, and it is letting our son and our family know that this theme is awesome, which is seriously fundamental. Thank you for all the pieces!

Leave a Reply