REST web service
The OpenWGA REST Web Service is a new web service interface available since OpenWGA 6.3.
It is a web service that follows the rules of RESTful and resource-oriented architecture for web services and as such can be used from a multitude of devices and clients. It is especially suited for usage from mobile apps or from browser scripts.
Some general information about the service:
- It is a pure HTTP web service, therefor is stateless, allows usage all HTTP-based functionalities for additional enhancements (like HTTPS for security, proxies for scaling and reduced bandwidth etc.)
- Its entry point is the URL /services/rest/v1 on every OpenWGA server
- It consumes and produces either JSON or XML formatted data. controlled either by the "Accept" HTTP header or a suffix ".xml" or ".json" to each URL (unless where otherwise specified)
- This documentation will however focus on the JSON format. The XML format uses the same structures as JSON just obeying to XML structure rules.
- It completely enforces regular OpenWGA authentication and authorisation. Currently it only accepts authentication via two ways:
- HTTP Basic Authentication
- Existing authentication from a regular WebTML web session. Note however that this is not RESTful by the paper as it relies on application state on the server. This is for convenience use when WebTML pages query the rest service from inside an existing session.
Table of contents:
- Enabling REST support
- Getting to know the REST service
- Working with collections in REST
- Working with documents in REST
- The REST APIs
- Throwing and receiving errors