If you have followed the developerWorks article then you should just be able to access the endpoint by doing a GET call (i.e. just adding this to a web browser) this url:
your_app_route.mybluemix.net\v1\products
or if you deployed to the UK (eu-gb) region then the url is:
your_app_route.eu-gb.mybluemix.net\v1\products
then append either .xml or .json to that url for the desired response type. The endpoint is defined in your app code, and from reading the developerWorks article it is set in the PHP code at this point:
$app->path('v1', function($request) use ($app) {
$app->path('products', function($request) use ($app) {
// GET /v1/products[.xml|.json]
// list all products
$app->get(function() use ($app) {
$products = Product::all();
// handle requests for XML content
$app->format('xml', function($request) use($app, $products) {
return $app->response(200, convert_array_to_xml($products->toArray()))
->header('Content-Type', 'application/xml');
});
// handle requests for JSON content
$app->format('json', function($request) use($app, $products) {
return $products->toArray();
});
The your_app_route
is the route/hostname name you can define when you do the cf push
command, if you don't explicitly set this route (-n
option or --random-route
option) then it will be set to the name of your Bluemix application. You can see what the url is by looking at the Bluemix UI console for your app (should be at the top of the page) or by looking at the end of the cf push
command where is says urls:
From the error you are getting it sounds like the app is starting, but the web server is not directing the requests to the Bullet module. You might want to check that Step 8(b) has been done correctly.