Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 54cac1c2268db633d66eeff1b4faa585 > files > 52

frepple-doc-0.8.1-3.fc15.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
  <title>Frepple / REST webservice module</title>
  <link rel='stylesheet' href='../styles.css' type='text/css' />
  <!--PageHeaderFmt-->  
</head>
<body>
<div id="container">

<div id="menubar">
  
<div id="logo" align="center">
<br/><img src='../frepple.bmp' alt="frepple" /><br/>
<a href='http://www.frepple.com/'>
<strong>a Free<br/>Production Planning<br/>Library</strong>
</a></div>
<div id="menu">
<br/>
<h3><a href='../Main/HomePage.html'>Main</a></h3>
<h3><a href='../UI/Main.html'>User Manual</a></h3>
<h3><a href='../Tutorial/Main.html'>Tutorial</a></h3>
<h3><a href='Main.html'>Reference Manual</a></h3>
<h3><a href='../Main/FAQ.html'>FAQ</a></h3>
<h3><a href='../reference/index.html'>C++ API</a></h3>
<br/><div>
</div>  
</div>
</div>

<div id="content">
<br/>
<!--PageText-->
<div id='wikitext'>
<p><a class='wikilink' href='../Main/HomePage.html'>Main</a> &gt; <span class='wikitrail'><a class='wikilink' href='Main.html'>Reference Manual</a> > <a class='wikilink' href='Modules.html'>Extension modules</a> > <a class='selflink' href='ModulesRESTWebservice.html'>REST webservice module</a></span>
</p>
<p class='vspace'>This module implements a multi-threaded REST webservice server.<br />Using the webservice frePPLe can make the plan information on-line accessible to other systems and users, and also receive updated information. FrePPLe can thus integrate flexibly in a <strong>Service Oriented Architecture</strong> (SOA), sharing information with other applications.
</p>
<p class='vspace'>Note that the module works with the frePPLe objects loaded memory. It does not persist any data in the database. See the chapter on the <a class='wikilink' href='OverviewArchitecture.html'>architecture</a> to understand the difference.
</p>
<p class='vspace'>The module is coded in Python using the excellent CherryPy HTTP framework, which needs to be installed seperately. The webservice provides full read and write access to all frePPLe objects. 
</p>
<p class='vspace'>The module enables the following new objects:
</p><ul><li>Python function <strong>RESTwebservice(address, port)</strong><br />  This function starts the service on the address and port specified.<br />  The default port is 8080 and the address of the default network card is detected by default.
</li></ul><p class='vspace'>The XML messages have the structure as described in the modeling section.
</p>
<p class='vspace'>The following URLS serve information files:
</p><ul><li><strong>http://&lt;address&gt;:&lt;port&gt;/frepple.xsd</strong>:<br />  Returns the main XSD schema definition of the frePPLe XML format.<br />  This XSD schema defines the top level structure.
</li><li><strong>http://&lt;address&gt;:&lt;port&gt;/frepple_core.xsd</strong>:<br />  Returns the XSD schema definition of the XML format of the frePPLe objects.<br />  This XSD schema file is included from the previous one.
</li></ul><p class='vspace'>HTTP GET-requests to the following URLs are used to <strong>read</strong> information from frePPLe:
</p><ul><li><strong>http://&lt;address&gt;:&lt;port&gt;/</strong>:<br />  Returns the complete model
</li><li><strong>http://&lt;address&gt;:&lt;port&gt;/buffer/</strong>:<br />  Returns all buffers.
</li><li><strong>http://&lt;address&gt;:&lt;port&gt;/buffer/&lt;name&gt;/</strong>:<br />  Returns the specific buffer.
</li><li><strong>http://&lt;address&gt;:&lt;port&gt;/calendar/</strong>:<br />  Returns all calendars.
</li><li><strong>http://&lt;address&gt;:&lt;port&gt;/calendar/&lt;name&gt;/</strong>:<br />  Returns the specific calendar.
</li><li><strong>http://&lt;address&gt;:&lt;port&gt;/customer/</strong>:<br />  Returns all customers.
</li><li><strong>http://&lt;address&gt;:&lt;port&gt;/customer/&lt;name&gt;/</strong>:<br />  Returns the specific customer.
</li><li><strong>http://&lt;address&gt;:&lt;port&gt;/demand/</strong>:<br />  Returns all demands.
</li><li><strong>http://&lt;address&gt;:&lt;port&gt;/demand/&lt;name&gt;/</strong>:<br />  Returns the specific demand.
</li><li><strong>http://&lt;address&gt;:&lt;port&gt;/flow/</strong>:<br />  Returns all flows.
</li><li><strong>http://&lt;address&gt;:&lt;port&gt;/item/</strong>:<br />  Returns all items.
</li><li><strong>http://&lt;address&gt;:&lt;port&gt;/item/&lt;name&gt;/</strong>:<br />  Returns the specific item.
</li><li><strong>http://&lt;address&gt;:&lt;port&gt;/load/</strong>:<br />  Returns all loads.
</li><li><strong>http://&lt;address&gt;:&lt;port&gt;/location/</strong>:<br />  Returns all locations.
</li><li><strong>http://&lt;address&gt;:&lt;port&gt;/location/&lt;name&gt;/</strong>:<br />  Returns the specific location.
</li><li><strong>http://&lt;address&gt;:&lt;port&gt;/operation/</strong>:<br />  Returns all operations.
</li><li><strong>http://&lt;address&gt;:&lt;port&gt;/operation/&lt;name&gt;/</strong>:<br />  Returns the specific operation.
</li><li><strong>http://&lt;address&gt;:&lt;port&gt;/operationplan/</strong>:<br />  Returns all operationplans.
</li><li><strong>http://&lt;address&gt;:&lt;port&gt;/operationplan/&lt;id&gt;/</strong>:<br />  Returns the specific operationplan.
</li><li><strong>http://&lt;address&gt;:&lt;port&gt;/problem/</strong>:<br />  Returns all problems.
</li><li><strong>http://&lt;address&gt;:&lt;port&gt;/resource/</strong>:<br />  Returns all resources.
</li><li><strong>http://&lt;address&gt;:&lt;port&gt;/resource/&lt;name&gt;/</strong>:<br />  Returns the specific resource.
</li></ul><p class='vspace'>HTTP POST- and PUT-requests to the following URLs are used to <strong>write</strong> information to frePPLe.<br />Multiple fields can be specified as parameters to the URL.<br />The web service return the string "OK" or a description of the error(s) found.
</p><ul><li><strong>http://&lt;address&gt;:&lt;port&gt;/</strong>:<br />  Create or update entities in frePPLe.<br />  The uploaded XML document can create, update or delete objects of any type. 
</li><li><strong>http://&lt;address&gt;:&lt;port&gt;/buffer/&lt;name&gt;/?&lt;field&gt;=&lt;value&gt;</strong>:<br />  Create or update a buffer.
</li><li><strong>http://&lt;address&gt;:&lt;port&gt;/calendar/&lt;name&gt;/?&lt;field&gt;=&lt;value&gt;</strong>:<br />  Create or update a calendar.
</li><li><strong>http://&lt;address&gt;:&lt;port&gt;/customer/&lt;name&gt;/?&lt;field&gt;=&lt;value&gt;</strong>:<br />  Create or update a customer.
</li><li><strong>http://&lt;address&gt;:&lt;port&gt;/demand/&lt;name&gt;/?&lt;field&gt;=&lt;value&gt;</strong>:<br />  Create or update a demand.
</li><li><strong>http://&lt;address&gt;:&lt;port&gt;/item/&lt;name&gt;/?&lt;field&gt;=&lt;value&gt;</strong>:<br />  Create or update a item.
</li><li><strong>http://&lt;address&gt;:&lt;port&gt;/location/&lt;name&gt;/?&lt;field&gt;=&lt;value&gt;</strong>:<br />  Create or update a location.
</li><li><strong>http://&lt;address&gt;:&lt;port&gt;/operation/&lt;name&gt;/?&lt;field&gt;=&lt;value&gt;</strong>:<br />  Create or update a operation.
</li><li><strong>http://&lt;address&gt;:&lt;port&gt;/operationplan/&lt;id&gt;/?&lt;field&gt;=&lt;value&gt;</strong>:<br />  Create or update a operationplan.
</li><li><strong>http://&lt;address&gt;:&lt;port&gt;/resource/&lt;name&gt;/?&lt;field&gt;=&lt;value&gt;</strong>:<br />  Create or update a resource.
</li></ul>
</div>

<!--PageFooterFmt-->
<!--HTMLFooter-->
</div></div>
</body>
</html>