Skip to main content
Homestar9
Inspiring
October 6, 2016
Answered

ColdFusion 2016 Upgrade: Can no longer access /api/ folders

  • October 6, 2016
  • 2 replies
  • 2045 views

Hello CF Community,

I recently upgraded from ColdFusion 10 to ColdFusion 2016 and I noticed that I can no longer access any pages that live in any folder named /api/.

For example: www.mysite.com/api/index.cfm now returns a 500 error "Application could not be found".  See the following screenshot:

http://i.imgur.com/axFVekv.png

Note: when I installed ColdFusion 2016 I didn't select to install the API Manager service nor do I need it. 

Thanks for your help!

This topic has been closed for replies.
Correct answer Dave Ferguson

This is because there is a cf servlet-mapping for /api/. 

You can remove the mapping by going to  cfinstall/cfusion/wwwroot/WEB-INF/web.xml.  Search for the api servlet-mapping and comment it out. 

HTH,

--Dave

2 replies

Chad Armond_872
Participant
March 9, 2017

I just came across this issue as well.  It seems to me that Adobe either didn't think this through or made an assumption that developers would be ok with this change.  I would like to put in a feature request to allow you to change this behavior from the ColdFusion Administrator but when I went to the Feature Request/Bugs page, ColdFusion was not listed as an option.

Feature Request/Bug Report Form

Carl Von Stetten
Legend
March 13, 2017

Chad,

The ColdFusion bug tracker can be accessed here: Tracker

When ColdFusion's REST features were first introduced, they could only be accessed as /rest/.  There were many requests from the developer community to add /api/ as a common path for REST support, and IIRC it was added in CF 2016.  However, not everyone uses the built-in REST features, and use either /rest/ or /api/ along with common frameworks (FW/1, ColdBox, Taffy, etc.) to provide rest services.  So your suggestion to make it possible to disable the servlet mappings from within CF Administrator makes sense.  Please submit a ticket in the URL above and then post the link here so others can go vote on this.

-Carl V.

Chad Armond_872
Participant
March 13, 2017

Thank you for the link.  I have submitted the feature request.

https://tracker.adobe.com/#/view/CF-4198400

Dave Ferguson
Dave FergusonCorrect answer
Participating Frequently
October 6, 2016

This is because there is a cf servlet-mapping for /api/. 

You can remove the mapping by going to  cfinstall/cfusion/wwwroot/WEB-INF/web.xml.  Search for the api servlet-mapping and comment it out. 

HTH,

--Dave

Homestar9
Homestar9Author
Inspiring
October 6, 2016

Outstanding Dave, thank you.

I wonder if there's a way to do this on a per site basis or if the servlet-mapping is global for all sites on the server?