Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "SMILA/Documentation/Processing/JSON REST API for pipelets"

(Get Pipelet Overview)
Line 11: Line 11:
 
==== Get Pipelet Overview ====
 
==== Get Pipelet Overview ====
  
GET: Returns a list of all deployed pipelets which have been detected by the <tt>PipeletTracker</tt> including URLs to access their descriptions.
+
GET: Returns a list of all deployed pipelets which have been detected by the <tt>PipeletTracker</tt> including URLs to access their descriptions. The list also contains names of pipelets for which the pipelet description can be read from the <tt>SMILA-INF</tt> directory in the bundle, but the pipelet class cannot be successfully instantiated.
  
 
'''Supported operations:'''  
 
'''Supported operations:'''  
  
*GET: Gets a list of all available pipelets.
+
*GET: Gets a list of all registered pipelets.
  
 
'''Usage:'''  
 
'''Usage:'''  

Revision as of 11:40, 9 January 2012

Note.png
Available since SMILA 1.0!


JSON REST API for SMILA BPEL pipelines

SMILA now has an HTTP REST API that allows to display the registered pipelets as well as descriptions for single pipelets (i.e. class name, parameter description, pipelet description and other additional data).

Reference

Note: The trailing slash in URLs is optional.

Get Pipelet Overview

GET: Returns a list of all deployed pipelets which have been detected by the PipeletTracker including URLs to access their descriptions. The list also contains names of pipelets for which the pipelet description can be read from the SMILA-INF directory in the bundle, but the pipelet class cannot be successfully instantiated.

Supported operations:

  • GET: Gets a list of all registered pipelets.

Usage:

  • URL: http://<hostname>:8080/smila/pipelets/
  • Allowed methods:
    • GET (no further URL parameters and no request body allowed)
  • Response status codes:
    • 200 OK: Upon successful execution of GET.
    • 500 INTERNAL SERVER ERROR: Any other error.

Example:

GET http://localhost:8080/smila/pipelets/
200 OK
{
  "pipelets" : [{
    "class" : "org.eclipse.smila.processing.pipelets.xmlprocessing.RemoveElementFromXMLPipelet",
    "url" : "http://localhost:8050/ias/pipelets/org.eclipse.smila.processing.pipelets.xmlprocessing.RemoveElementFromXMLPipelet/"
  }, {
    "class" : "org.eclipse.smila.processing.pipelets.xmlprocessing.XPathFilterPipelet",
    "url" : "http://localhost:8050/ias/pipelets/org.eclipse.smila.processing.pipelets.xmlprocessing.XPathFilterPipelet/"
  }, {
    "class" : "org.eclipse.smila.processing.pipelets.xmlprocessing.XslTransformationPipelet",
    "url" : "http://localhost:8050/ias/pipelets/org.eclipse.smila.processing.pipelets.xmlprocessing.XslTransformationPipelet/"
  }, {
    "class" : "org.eclipse.smila.ontology.pipelets.SesameRecordReaderPipelet",
    "url" : "http://localhost:8050/ias/pipelets/org.eclipse.smila.ontology.pipelets.SesameRecordReaderPipelet/"
  }, {
    "class" : "org.eclipse.smila.aperture.pipelets.AperturePipelet",
    "url" : "http://localhost:8050/ias/pipelets/org.eclipse.smila.aperture.pipelets.AperturePipelet/"
  },
...
}

Get a Pipelet description

GET: Returns a JSON object containing the description of the requested pipelet. The object consists of the class name of the pipelet, optionally the textual description of the pipelet and the description of its parameters.

Supported operations:

  • GET: Get a pipelet description.

Usage:

  • URL: http://<hostname>:8080/smila/pipelets/<pipelet-class-name>/
  • Allowed methods:
    • GET (no further URL parameters and no request body allowed)
  • Response status codes:
    • 200 OK: Upon successful execution for GET.
    • 404 NOT FOUND: If the specified pipelet does not exist.
    • 405 METHOD NOT ALLOWED: For methods other than "GET".
    • 500 INTERNAL SERVER ERROR: Any other error.

Example:

GET http://localhost:8080/smila/pipelets/org.eclipse.smila.processing.pipelets.CopyPipelet
200 OK
{
  "class" : "org.eclipse.smila.processing.pipelets.CopyPipelet",
  "parameters": [        
    {
      "name": "inputType",
      "type": "string",
      "values": ["ATTACHMENT", "ATTRIBUTE"]       
    },
    {
      "name": "outputType",
      "type": "string",
      "values": ["ATTACHMENT", "ATTRIBUTE"]         
    },
    {
      "name": "inputName",
      "type": "string"            
    },
    {
      "name": "outputName",
      "type": "string"            
    },
    {
      "name": "mode",
      "type": "string",
      "values": ["COPY", "MOVE"],
      "optional": true
    }     
  ],
  "description": "This pipelet can be used to copy a string value between attributes and/or attachments. 
It supports two execution modes: COPY: copy the value from the input attribute/attachment to the output 
attribute/attachment, MOVE: same as COPY, but after that delete the value from the input attribute/attachment"
}

Back to the top