Details
-
Improvement
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
None
-
None
-
None
-
Mac OS 10.11.3, Maven 3.2.5, 1.8.0_45
-
Platform Sprint 142
Description
I'm playing around with the 10.2 Content REST API by following the tutorial, and I ran into the following issue. The base URL (localhost:8080/site/api) returns a 404, see also the snippet of stacktrace below (full stacktrace is attached). Obviously I need to use the correct URL (localhost:8080/site/api/documents) as stated in the tutorial and documentation. However, the REST Services Setup Tool in Essentials (http://localhost:8080/essentials/#/tools/restServices) displays only the base URL, which leads to confusion. In my lack of expertise I copied this URL and tried it and saw a 404 and thought the API was broken. If I run into such an issue, changes are new devs will also do something similar.
I would like to recommend two ways for improving this. First, fix the 404, so that it returns something more sensible. And second, to show a notice in the REST Services Setup Tool about the base URL and the actual URL (with /documents added to the base URL).
Stacktrace:
[INFO] [talledLocalContainer] 23.02.2016 11:29:07 WARN http-nio-8080-exec-8 [JAXRSUtils.findTargetMethod:522] No operation matching request path "/site/api/" is found, Relative Path: /, HTTP Method: GET, ContentType: /, Accept: text/html,application/xhtml+xml,image/webp,application/xml;q=0.9,/;q=0.8,. Please enable FINE/TRACE log level for more details.
[INFO] [talledLocalContainer] 23.02.2016 11:29:07 WARN http-nio-8080-exec-8 [WebApplicationExceptionMapper.toResponse:72] javax.ws.rs.ClientErrorException: HTTP 404 Not Found
Attachments
Issue Links
- relates to
-
HSTTWO-3441 Load hst-cms-rest.xml and template-composer-rest.xml as Spring addon module
- Closed
-
HSTTWO-3849 improve setup of content rest api to not log stacktraces on 404s
- Closed