Thanks for replying Luigi. Based on your documentation I was able to figure out how to set up the Joomla server and create the url to retrieve data. I can see the data response via postman.
The issue I'm having now is accessing the data remotely (cross domains). To work around this issue I created a php file on the server where the Joomla site resides. However, when I try this url (
www.momspumphere.com/j3x/mph_restful_mobile_aboutus2.php) in postman i get this response:
{
"status": "ko",
"error_code": "REQ_MNS",
"error_description": "Module not specified"
}
Here is the simple php code:
<?php
header("Content-Type:application/json");
// Feed URL
$feed_url = "
www.momspumphere.com/j3x/rest/get/content/articles/44";
// Read the feed
$handle = fopen($feed_url, "r");
$feed = '';
while (!feof($handle)) {
$feed .= fread($handle, 1024);
}
fclose($handle);
$json_response=json_encode($feed);
echo $json_response
?>
However when I use the jbackend url I get a properly formed json reponse:
www.momspumphere.com/j3x/rest/get/content/articles/44
{
"status": "ok",
"id": "44",
"title": "About Moms Pump Here Mobile",
"alias": "about-moms-pump-here-mobile",
"content": "<p>Moms Pump Here is the first service to use smartphones to help moms easily locate places to breast pump or breastfeed on demand in privacy. Our mobile site and smartphone app allow moms to find, rate, and share safe places to express breast milk. We answer the question,<a href=\"places/list/all/\" title=\"View all places where you can breast pump\"><strong> can I pump here?</strong></a> </p>\r\n<p><strong>Quick Fact:</strong> Over 4 million babies are born a year in the US and 75% of those moms breastfeed and breast pump for up to 2 years. So at any given time we're servicing about 8 million moms. Childbirth, breast pumping, and breastfeeding is never-ending so our demographic is huge and our service never ends.</p>\r\n<p>We have a network of places, and moms like you, who have pumped away from home and rated their pumping spots so we all can learn the safe, comfortable places to make milk for our little ones when we can’t be with them.</p>\r\n<p><span style=\"line-height: 1.3em;\">Are you planning a day trip and aren’t sure which rest stops have the private bathrooms to allow you to pump cleanly and discretely?</span></p>\r\n<p>Are you a bridesmaid in your kid sister’s wedding and want to know if her catering hall has a big enough suite for the bride and YOUR boobs? Which hotels have in-room refrigerators with freezer compartments? Moms Pump Here can help answer these questions that you won’t find being asked anywhere else – and they’re answered by moms like you!</p>\r\n<p>Kim and I aren't just work from home moms, we were diehard breast pumpers too. Breast pumping moms don't always have the luxury to pump whenever or whereever they want. Moms Pump Here solves this problem by connecting moms to the closest breast pumping rooms on demand. At the touch of your web enabled ipad or smartphone, we connect you to our network of public or private breast pumping spots usig GPS and cellular triangulation location (yeah big words). Basically we have a smart finder that delivers pumping spots right to your location's smartphone screen. Don't worry no one knows where you're pumping when you checkin, only those you choose to let know. Learn more about <a href=\"index.php?option=com_content&view=article&id=31&Itemid=355\"><strong>how it works</strong></a> and your <a href=\"index.php?option=com_content&view=article&id=28&Itemid=180\"><strong>Safety and Privacy</strong></a> with Moms Pump Here. </p>\r\n<p>Our community of Moms, Sponsors, and Channel Partners mutually benefit from one another. <strong><a href=\"index.php?option=com_content&view=article&id=34:benefits-rewards-and-partners&catid=7:articles&Itemid=397\" title=\"How to become a sponsor or channel partner with Moms Pump Here\">Click here</a></strong> to see the benefits of becoming a sponsor or channel partner with Moms Pump Here.</p>",
"images": {
"image_intro": "
www.momspumphere.com/j3x/",
"float_intro": "",
"image_intro_alt": "",
"image_intro_caption": "",
"image_fulltext": "
www.momspumphere.com/j3x/",
"float_fulltext": "",
"image_fulltext_alt": "",
"image_fulltext_caption": ""
},
"metadesc": "",
"metakey": "",
"metadata": {
"robots": null,
"author": null,
"rights": null,
"xreference": null
},
"language": "*",
"category_title": "Articles",
"author": "MomsPumpHere",
"published_date": "2014-08-01 20:25:55",
"state": "1"
}
This will be a phonegap application. I have full access to the joomla server if I need to make any server changes. Any help would be appreciated.
Thanks,
D