Is it possible to retrieve all rules within
a category via the Rest API (or some other means) ?
Thanks
gpatel
From:
Andrew Waterman <awaterma@ecosur.mx>
To:
Rules Users List <rules-users@lists.jboss.org>
Date:
12/21/2010 12:12 PM
Subject:
Re: [rules-users]
Upload an existing .drl for the Guvnor dynamically
Sent by:
rules-users-bounces@lists.jboss.org
Hi Dirk,
You could also try using the existing remote API with
Guvnor to push up new content to the server.
Try:
1. GET http://servername:port//org.drools.guvnor.Guvnor/api/packages/{packageName}
To pull the list of assets from the Guvnor API for a specific
package.
2. You can POST a DRL using the existing rest api
like so.
A) Create a post request to "http://servername:port//org.drools.guvnor.Guvnor/api/packages/{YourPackageName}/{YourAssetName}"
e.g., POST http://servername:port//org.drools.guvnor.Guvnor/api/packages/{YourPackageName}/{YourAssetName}
B) Append your file data to the POST request as part of
the request (as you would with a POST'ed file upload).
"REST" based calls are handled through two classes:
org.drools.guvnor.server.filesRestAPIServlet
(in the drools-guvnor module)
and
org.drools.repository.remoteapi.RestAPI
(in the drools-repository module).
3. PUT calls handle updates to existing resources
on the server, in a similar way, with DELETE allowing removal of resources.
4. In terms of WebDAV, JCR also has a nice WEBDAV
client implementation available that extends Apache's httpclient, but with
some WEBDAV specific support built in.
The RestAPI class in Drools-Repository has some very good
detail on how this process works, and I'd suggest looking there if you
have questions (on the REST API side).
There is some discussion about REST, as well, currently
on the dev mailing list if you search Nabble.
A few ideas,
Andrew
On Dec 17, 2010, at 8:08 AM, dhermanns wrote:
Hi!
I would like to accomplish the same thing. Is there really no programmatic
way to do this?
I noticed that the files are uploaded through the eclipse-plugin using
webdav. Is it documented
what has to be done in order to install/update a drl using webdav?
Thx,
Dirk
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Upload-an-existing-drl-for-the-Guvnor-dynamically-tp721148p2104873.html
Sent from the Drools - User mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
-----------------------------------------
The information contained in this communication (including any
attachments hereto) is confidential and is intended solely for the
personal and confidential use of the individual or entity to whom
it is addressed. If the reader of this message is not the intended
recipient or an agent responsible for delivering it to the intended
recipient, you are hereby notified that you have received this
communication in error and that any review, dissemination, copying,
or unauthorized use of this information, or the taking of any
action in reliance on the contents of this information is strictly
prohibited. If you have received this communication in error,
please notify us immediately by e-mail, and delete the original
message. Thank you