-
Notifications
You must be signed in to change notification settings - Fork 3
Simple REST server
DG Christensen edited this page Dec 3, 2020
·
3 revisions
A simple REST server can be created for any Zeidon project that can serve all LODs defined in the project. A .war file is created that can be deployed to any web container. There are two default REST projects. Include either one in your WAR build and deploy.
- zeidon-jaxrs: A Java project that uses standard JAX-RS annotations for designating end-points.
- zeidon-scalatra-rest: A Scala project that uses Scalatra for defining end-points.
See sample Zeidon app for examples on how to use these projects in your build.
Once deployed, any LOD can be activated with an HTTP get using the following URL:
//hostname/path/APPLICATIONNAME/LODNAME?(qual={JSON}|qualOi={QUAL-OBJECT}
Qualification is specified with either the qual
or qualOi
query param. qual
specifies a simple JSON qualification and qualOi
specifies a Zeidon qualification OI. An example of an activate using the Northwind sample application and curl
:
curl -G --data-urlencode 'qual={
"OrderId": 10248
}' http://localhost:8080/northwind-jaxrs-1.0/zeidon-api/Northwind/Order