API
Planet APIs
The Planet platform offers two APIs for accessing Cases, Patterns, and Scenarios. These APIs were inspired by the discussions with the pattern exchange forum, a group of developers of various pattern tools and repositories across Europe. The initial implementation is being tested by LDSE and CloudWorks, among others.We offer two flavours of API: generic and simple. Both APIs are based on REST model with only GET method enabled at this stage. In effect this means that client applications can read the content in our system, but cannot edit, delete or add new items.
The generic API allows programmatic navigation through the class and object structure. Clients can retrieve the list of classes (datatypes), the structure of each class, and then list objects from any class or ask for specific fields of specific objects. The expected syntax for an API call is:
http://patternlanguagenetwork.myxwiki.org/xwiki/bin/view/api/genericXML?xpage=rdf[&targetClass=[classname]][&targetObject=[objectName]][&fields=[field1,flield2,..]][&list=true]][&getScheme=true]]
The simple API allows clients to retrieve Cases, Patterns and Scenarios specifying search criteria and output format. The expected syntax for an API call is:
http://patternlanguagenetwork.myxwiki.org/xwiki/bin/view/api/simple[parameters]
generic XML
- xpage=rdf: if set, produce xml. if missing, produce a form.
- targetClass: class to export, default is patterns
- targetObject: if specified, query only this object
- fields: comma seperated list of fields to display. if empty, display all.
- list: list only, display field names but not values.
- getScheme: display scheme, i.e. list classes and property names
simple API
The following parameters are allowed| Name | Value(s) | Mandatory | Description |
|---|---|---|---|
| "subject=" | Patterns, Cases or Scenarios | Default is Patterns; Search for Patterns, Case Studies or Scenarios | |
| "xpage=" | rdf or plain | YES - lower case * | Creates output file header |
| "format=aFormat" | PLML**, CSV, XML, RSS. | Default is RSS; | |
| "text=someText" | Search for "someText" in the whole pattern (or case studies, scenarios) document; | ||
| "andorText=OR" | AND or OR | Use with 'text' attribute only; Default is OR; | |
| "problem=someText" | Search for "someText" in the problem section of every pattern document; | ||
| "context=someText" | Search for "someText" in the context section of every pattern document; | ||
| "solution=someText" | Search for "someText" in the solution section of every pattern document; | ||
| "rationale=someText" | Search for "someText" in the the rationale section of every pattern document; | ||
| "andorSection=OR" | AND or OR | Use with 'problem,context,solution,rationale' attribute only; Default is OR; | |
| "listonly=true" | Returns a list of pattern names (or case studies, scenarios) held in the database *** ; | ||
| "tags=someText,some Text" | Search for documents (Patterns/Cases/Scenarios) containing given tags. Optionally combine it with 'andor' operator. Use a comma to separate tags; | ||
| "andor=" | AND or OR; | Use with 'tags' attribute only; Default is OR; | |
| "candidate=true" | Use with Patterns only; Default is false; |
