<font size=2 face="sans-serif">Is it possible to retrieve all rules within
a category via the Rest API (or some other means) ?</font>
<br>
<br><font size=2 face="sans-serif">Thanks</font>
<br><font size=2 face="sans-serif">gpatel</font>
<br>
<br>
<br>
<br><font size=1 color=#5f5f5f face="sans-serif">From: &nbsp; &nbsp; &nbsp;
&nbsp;</font><font size=1 face="sans-serif">Andrew Waterman &lt;awaterma@ecosur.mx&gt;</font>
<br><font size=1 color=#5f5f5f face="sans-serif">To: &nbsp; &nbsp; &nbsp;
&nbsp;</font><font size=1 face="sans-serif">Rules Users List &lt;rules-users@lists.jboss.org&gt;</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Date: &nbsp; &nbsp; &nbsp;
&nbsp;</font><font size=1 face="sans-serif">12/21/2010 12:12 PM</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Subject: &nbsp; &nbsp;
&nbsp; &nbsp;</font><font size=1 face="sans-serif">Re: [rules-users]
Upload an existing .drl for the Guvnor dynamically</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Sent by: &nbsp; &nbsp;
&nbsp; &nbsp;</font><font size=1 face="sans-serif">rules-users-bounces@lists.jboss.org</font>
<br>
<hr noshade>
<br>
<br>
<br><font size=3>Hi Dirk,</font>
<br>
<br><font size=3>You could also try using the existing remote API with
Guvnor to push up new content to the server.</font>
<br>
<br><font size=3>Try: </font>
<br>
<br><font size=3>1. GET </font><a href=http://servername:port//org.drools.guvnor.Guvnor/api/packages/{packageName}><font size=3 color=blue><u>http://servername:port//org.drools.guvnor.Guvnor/api/packages/{packageName}</u></font></a>
<br>
<br><font size=3>To pull the list of assets from the Guvnor API for a specific
package.</font>
<br>
<br><font size=3>2. &nbsp;You can POST a DRL using the existing rest api
like so.</font>
<br>
<br><font size=3>A) Create a post request to &quot;</font><a href=http://servername:port//org.drools.guvnor.Guvnor/api/packages/{YourPackageName}/{YourAssetName}><font size=3 color=blue><u>http://servername:port//org.drools.guvnor.Guvnor/api/packages/{YourPackageName}/{YourAssetName}</u></font></a><font size=3>&quot;</font>
<br>
<br><font size=3>e.g., POST h</font><a href=ttp://servername:port//org.drools.guvnor.Guvnor/api/packages/{YourPackageName}/{YourAssetName}><font size=3 color=blue><u>ttp://servername:port//org.drools.guvnor.Guvnor/api/packages/{YourPackageName}/{YourAssetName}</u></font></a>
<br>
<br><font size=3>B) Append your file data to the POST request as part of
the request (as you would with a POST'ed file upload).</font>
<br>
<br><font size=3>&quot;REST&quot; based calls are handled through two classes:</font>
<br>
<br><font size=3><b><i>org.drools.guvnor.server.filesRestAPIServlet</i></b></font>
<br><font size=3>(in the drools-guvnor module)</font>
<br>
<br><font size=3>and</font>
<br>
<br><font size=3><b><i>org.drools.repository.remoteapi.RestAPI</i></b></font>
<br><font size=3>(in the drools-repository module).</font>
<br>
<br><font size=3>3. &nbsp;PUT calls handle updates to existing resources
on the server, in a similar way, with DELETE allowing removal of resources.
</font>
<br>
<br><font size=3>4. &nbsp;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. </font>
<br>
<br><font size=3>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).</font>
<br>
<br><font size=3>There is some discussion about REST, as well, currently
on the dev mailing list if you search Nabble.</font>
<br>
<br><font size=3>A few ideas,</font>
<br>
<br><font size=3>Andrew</font>
<br>
<br><font size=3>On Dec 17, 2010, at 8:08 AM, dhermanns wrote:</font>
<br>
<br><font size=3><br>
Hi!<br>
<br>
I would like to accomplish the same thing. Is there really no programmatic<br>
way to do this?<br>
I noticed that the files are uploaded through the eclipse-plugin using<br>
webdav. Is it documented<br>
what has to be done in order to install/update a drl using webdav?<br>
<br>
Thx,<br>
Dirk<br>
-- <br>
View this message in context: </font><a href="http://drools-java-rules-engine.46999.n3.nabble.com/Upload-an-existing-drl-for-the-Guvnor-dynamically-tp721148p2104873.html"><font size=3 color=blue><u>http://drools-java-rules-engine.46999.n3.nabble.com/Upload-an-existing-drl-for-the-Guvnor-dynamically-tp721148p2104873.html</u></font></a><font size=3><br>
Sent from the Drools - User mailing list archive at </font><a href=http://nabble.com/><font size=3 color=blue><u>Nabble.com</u></font></a><font size=3>.<br>
_______________________________________________<br>
rules-users mailing list</font><font size=3 color=blue><u><br>
</u></font><a href="mailto:rules-users@lists.jboss.org"><font size=3 color=blue><u>rules-users@lists.jboss.org</u></font></a><font size=3><br>
</font><a href="https://lists.jboss.org/mailman/listinfo/rules-users"><font size=3>https://lists.jboss.org/mailman/listinfo/rules-users</font></a>
<br><tt><font size=2>_______________________________________________<br>
rules-users mailing list<br>
rules-users@lists.jboss.org<br>
</font></tt><a href="https://lists.jboss.org/mailman/listinfo/rules-users"><tt><font size=2>https://lists.jboss.org/mailman/listinfo/rules-users</font></tt></a><tt><font size=2><br>
</font></tt>
<br>

-----------------------------------------
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