REST service for Web Content Manager
The REST service for Web Content Manager is a collection of Web services that are compliant with the Atom Publishing Protocol. They provide access to Web content, including versions and workflow states, via HTTP. The service is designed according to the REST (REpresentational State Transfer) architectural style.
REST services build interactive content which can be modified directly by the site users. Responsive, integrated editing tools can be created by embedding HTML and JavaScript in web content components which bind to the REST service to display or update content asynchronously. (AJAX)
HTTP makes integration with remote clients easier than with a traditional API. WCM functions can be exposed to remote systems without adding additional server side components, such as JSP, to access Java APIs. HTTP allows these services to work seamlessly with the infrastructure including firewall, proxy servers and caches.
Any examples in this section containing incomplete XML, or XML without namespace declarations, use the following declarations:
- xmlns:atom="http://www.w3.org/2005/Atom"
- xmlns:app="http://www.w3.org/2007/app"
- xmlns:wcm="http://www.ibm.com/xmlns/8.0"
Service entry points
The URLs which comprise the REST service can change from release to release, or even with minor updates. Therefore IBM recommends to never bookmark, or generate a URL unless it is for a defined entry point.
- Atom publishing protocol service document
/wps/mycontenthandler/model/serviceThis service document includes the entry points for all portal REST services. When browsing for content, you should first retrieve the service document. The AtomPub service document describes the top-level collections in an APP service. These collections represent libraries and other types of content accessible through the service.
Web content queries can be stored in certain collections. This allows administrators to limit the scope and structure of queries, and bind them to specific URLs, which all authenticated users can access to retrieve the results as an atom feed.
- POC Service
- If a specific content item is known, it can be accessed directly through the POC service, or the POC service can be used to lookup an URL for the content. The identity of a piece of content in the REST service is represented by its POC URI. The POC URI can be found in the ID element of the Atom Entry documents which represents the content item.
- Queries
- While queries can be stored within the REST service, they can also be executed directly through a single location:
/wcmrest/queryThis flexibility will be subject to security controls to prevent users from inadvertently overloading production servers with unnecessarily complex queries.
REST Service Access Levels
To use the REST service for Web Content Manager a client user be assigned the "user" role or higher in the WCM REST SERVICE virtual resource. All authenticated users are assigned the "user" role by default.
An administrator can edit the WCM REST SERVICE virtual resource by going to Administration > Resource Permissions > Virtual Resources.
Header Header User Users assigned the "user" role can:
- work with web content items and execute defined queries.
Editor Users assigned the "editor" role can:
- work with web content items and execute defined queries.
- execute custom queries through the following path: /wcmrest/query
Manager Users assigned the "manager" role can:
- work with web content items and execute defined queries.
- execute custom queries through the following path: /wcmrest/query
- create, read, update and delete defined queries.
Parent topic: REST services for Web Content Manager