Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jreijn/hippo-addon-restful-webservices-demo
Repository with demo project for webservices addon
https://github.com/jreijn/hippo-addon-restful-webservices-demo
Last synced: about 1 month ago
JSON representation
Repository with demo project for webservices addon
- Host: GitHub
- URL: https://github.com/jreijn/hippo-addon-restful-webservices-demo
- Owner: jreijn
- Created: 2014-04-16T13:22:29.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-02-23T21:44:37.000Z (over 9 years ago)
- Last Synced: 2023-03-11T18:33:29.718Z (over 1 year ago)
- Language: JavaScript
- Size: 648 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Hippo RESTful Web services demo project
[![Build Status](https://travis-ci.org/jreijn/hippo-addon-restful-webservices-demo.svg?branch=master)](https://travis-ci.org/jreijn/hippo-addon-restful-webservices-demo)
This project is a demo project for the [Hippo RESTful Web services addon](https://github.com/jreijn/hippo-addon-restul-webservices).
To run this project you will first need to install the web services add-on into your local maven repository.## Running locally
This project uses the Maven Cargo plugin to run the CMS and site locally in Tomcat.
From the project root folder, execute:```
$ mvn clean install
$ mvn -P cargo.run
```Access the CMS at http://localhost:8080/cms, and the site at http://localhost:8080/site
Logs are located in target/tomcat7x/logs## Testing the API
The web services addon APIs are documented with [Swagger](https://helloreverb.com/developers/swagger).
Visiting [http://localhost:8080/cms/swagger/](http://localhost:8080/cms/swagger/) after startup shows you the Swagger UI, where you see and test the available service end-points and their documentation.
Before you can do so you will need to login with the default username and password .e.g (admin/admin).## Examples of working with the API
``` console
$ curl --user admin:admin http://localhost:8080/cms/rest/api/
```
Which returns:``` json
{
"clusterid":"",
"vendor":{
"name":"Hippo Repository","version":"2.26.09"
}
}
```Performing a search for document within the cms
``` console
$ curl --user admin:admin -H "Content-Type: application/json" -XPOST http://localhost:8080/cms/rest/api/_query/ -d '
{
"statement":"/jcr:root/content/documents//element(*,hippo:document)",
"language":"xpath",
"limit":5
}'
```