frePPLev2.0
open source Production PLanning
  • Home
  • Documentation
    • Getting started
    • Modeling guide
    • User guide
    • Installation guide
    • Developer guide
    • FAQ
  • C++ API

REST web service module

From release 0.9.3 onwards, this module will not be available any longer in the community edition.

This module implements a multi-threaded REST webservice server.
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 Service Oriented Architecture (SOA), sharing information with other applications.

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 architecture to understand the difference.

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.

The module enables the following new objects:

  • Python function RESTwebservice(address, port)
    This function starts the service on the address and port specified.
    The default port is 8080 and the address of the default network card is detected by default.

The XML messages have the structure as described in the modeling section.

The following URLS serve information files:

  • http://<address>:<port>/frepple.xsd:
    Returns the main XSD schema definition of the frePPLe XML format.
    This XSD schema defines the top level structure.
  • http://<address>:<port>/frepple_core.xsd:
    Returns the XSD schema definition of the XML format of the frePPLe objects.
    This XSD schema file is included from the previous one.

HTTP GET-requests to the following URLs are used to read information from frePPLe:

  • http://<address>:<port>/:
    Returns the complete model
  • http://<address>:<port>/buffer/:
    Returns all buffers.
  • http://<address>:<port>/buffer/<name>/:
    Returns the specific buffer.
  • http://<address>:<port>/calendar/:
    Returns all calendars.
  • http://<address>:<port>/calendar/<name>/:
    Returns the specific calendar.
  • http://<address>:<port>/customer/:
    Returns all customers.
  • http://<address>:<port>/customer/<name>/:
    Returns the specific customer.
  • http://<address>:<port>/demand/:
    Returns all demands.
  • http://<address>:<port>/demand/<name>/:
    Returns the specific demand.
  • http://<address>:<port>/flow/:
    Returns all flows.
  • http://<address>:<port>/item/:
    Returns all items.
  • http://<address>:<port>/item/<name>/:
    Returns the specific item.
  • http://<address>:<port>/load/:
    Returns all loads.
  • http://<address>:<port>/location/:
    Returns all locations.
  • http://<address>:<port>/location/<name>/:
    Returns the specific location.
  • http://<address>:<port>/operation/:
    Returns all operations.
  • http://<address>:<port>/operation/<name>/:
    Returns the specific operation.
  • http://<address>:<port>/operationplan/:
    Returns all operationplans.
  • http://<address>:<port>/operationplan/<id>/:
    Returns the specific operationplan.
  • http://<address>:<port>/problem/:
    Returns all problems.
  • http://<address>:<port>/resource/:
    Returns all resources.
  • http://<address>:<port>/resource/<name>/:
    Returns the specific resource.

HTTP POST- and PUT-requests to the following URLs are used to write information to frePPLe.
Multiple fields can be specified as parameters to the URL.
The web service return the string “OK” or a description of the error(s) found.

  • http://<address>:<port>/:
    Create or update entities in frePPLe.
    The uploaded XML document can create, update or delete objects of any type.
  • http://<address>:<port>/buffer/<name>/?<field>=<value>:
    Create or update a buffer.
  • http://<address>:<port>/calendar/<name>/?<field>=<value>:
    Create or update a calendar.
  • http://<address>:<port>/customer/<name>/?<field>=<value>:
    Create or update a customer.
  • http://<address>:<port>/demand/<name>/?<field>=<value>:
    Create or update a demand.
  • http://<address>:<port>/item/<name>/?<field>=<value>:
    Create or update a item.
  • http://<address>:<port>/location/<name>/?<field>=<value>:
    Create or update a location.
  • http://<address>:<port>/operation/<name>/?<field>=<value>:
    Create or update a operation.
  • http://<address>:<port>/operationplan/<id>/?<field>=<value>:
    Create or update a operationplan.
  • http://<address>:<port>/resource/<name>/?<field>=<value>:
    Create or update a resource.
    • Getting started
    • Modeling guide
      • Simplified domain model
      • Detailed domain model
      • Environment variables
      • Python interpreter
      • Global parameters
      • Buffer
      • Calendar
      • Customer
      • Demand
      • Flow
      • Item
      • Load
      • Location
      • Operation
      • Suboperation
      • Operationplan
      • Problem
      • Resource
      • SetupMatrix
      • Skill
      • Resource skill
      • Solver
      • Extension modules
        • Forecast module
        • REST web service module
        • Linear programming solver module
        • OpenERP connector module
    • User guide
      • Main features
      • Supported browsers
      • Getting around
        • Logging in
        • Logging out
        • Changing password
        • Navigation
          • Menu bar
          • Jump search
          • Context menus
          • Browser bookmarks
        • Filtering data
        • Sorting data
        • Selecting time buckets
        • Exporting data
        • Importing data
        • User preferences
        • User permissions and roles
      • Screens
        • Data input
        • Supply Path / Where Used
        • Comments
        • History – Audit trail
        • Plan analysis
          • Problem report
          • Constraint report
          • Inventory report
          • Inventory detail report
          • Resource report
          • Resource Gantt report
          • Resource detail report
          • Operation report
          • Operation detail report
          • Demand report
          • Demand detail report
          • Demand Gantt report
          • Forecast report
          • Performance indicator report
        • Execute
      • Batch commands
        • manage.py (manage.exe on Windows)
        • frepple (frepple.exe on Windows)
        • freppleservice.exe (Windows only)
    • Installation guide
      • Windows installer
      • Compiling on Windows
      • Linux binary packages
      • Compiling on Linux
      • Compiling on debian-based linux
      • Compiling on Red Hat based Linux
      • Compiling from the subversion source code repository
      • Running the VMWare virtual machine
      • Other platforms
      • Configuring the user interface
      • Configuring multiple models in the user interface
      • Configuring as a Python extension module
    • FAQ
    • Developer guide
      • Code structure
      • Class diagram
      • Solver
        • Solver features
        • Planning algorithm
          • Top level loop
          • Demand solver
          • Buffer solver
          • Flow solver
          • Load solver
          • Operation solver
          • Resource solver
        • Cluster and level algorithm
      • Extension modules
      • Version control
      • Style guide
      • Portability
      • Security
      • Internationalization
      • Translating the user interface
      • Adding or customizing a report
      • Unit tests
        • buffer_procure_1
        • calendar
        • callback
        • cluster
        • constraints_combined_1
        • constraints_combined_2
        • constraints_leadtime_1
        • constraints_material_1
        • constraints_material_2
        • constraints_material_3
        • constraints_material_4
        • constraints_resource_1
        • constraints_resource_2
        • constraints_resource_3
        • constraints_resource_4
        • constraints_resource_5
        • datetime
        • deletion
        • demand_policy
        • flow_alternate_1
        • flow_alternate_2
        • flow_effective
        • forecast_1
        • forecast_2
        • forecast_3
        • forecast_4
        • forecast_5
        • forecast_6
        • jobshop
        • load_alternate
        • load_effective
        • lpsolver_1
        • multithreading
        • name
        • operation_alternate
        • operation_available
        • operation_effective
        • operation_pre_post
        • operation_routing
        • pegging
        • problems
        • python_1
        • python_2
        • python_3
        • safety_stock
        • sample_module
        • scalability_1
        • scalability_2
        • scalability_3
        • setup_1
        • setup_2
        • skill
        • xml
        • xml_remote
    • License
      • GNU Affero General Public License
      • GNU Free Documentation License
    • Third party add-ons
  • Copyright © 2010-2013 frePPLe bvba