Wikicompany:REST

From Wikicompany

Contents

[edit]

Introduction

The goal of this project is to make the information on Wikicompany accessible using a REST webservice interface, for use by information processing systems.

The main components of the REST system are:

  • HTTP - the application-level communication protocol
  • RSS v2.0 - an output format
  • Atom 1.0 - an output format
  • JSON - an output format

See also the following documents:

[edit]

Structures and Naming

There are currently two interface commands: "company" and "companies".

  • company - returns a company profile (or a set of fields from the profile)
    • Optional argument: format:<format> (the format can be: rss, atom, json, html)
  • companies - returns a list of company profile links (separated by the ; character). The query language consists of sets of <tag>:<value> pairs
    • Optional argument: region:<region>
    • Optional argument: sector:<sector>
    • Optional argument: tag:<tag>
    • See optional tag arguments at: Semantic tags
[edit]

Company interface examples

Show the Philips profile:

[edit]

Companies interface examples

Show media companies:

Show companies with a Euronext stock notation:

Show media companies in the Netherlands with Euronext stock notation:

Show web and design companies:

Show restaurants in Amsterdam, excluding fast food chains:

Show biotech or healthcare companies operating in the US and Europe:

[edit]

REST principles

[edit]

REST data elements

Data Element             Modern Web Examples
---------------------------------------------
resource                 the intended conceptual target of a hypertext reference
resource identifier      URL, URN
representation           HTML document, JPEG image
representation metadata  media type, last-modified time
resource metadata        source link, alternates, vary
control data             if-modified-since, cache-control
  • Client-Server: a pull-based interaction style: consuming components pull representations.
  • Stateless: each request from client to server must contain all the information necessary to understand the request, and cannot take advantage of any stored context on the server.
  • Cache: to improve network efficiency responses must be capable of being labeled as cacheable or non-cacheable.
  • Uniform interface: all resources are accessed with a generic interface (e.g., HTTP GET, POST, PUT, DELETE).
  • Named resources - the system is comprised of resources which are named using a URL.
  • Interconnected resource representations - the representations of the resources are interconnected using URLs, thereby enabling a client to progress from one state to another.
  • Layered components - intermediaries, such as proxy servers, cache servers, gateways, etc, can be inserted between clients and resources to support performance, security, etc.
  • Design to reveal data gradually. Don't reveal everything in a single response document. Provide hyperlinks to obtain more details.
  • Specify the format of response data using a schema (DTD, W3C Schema, RelaxNG, or Schematron). For those services that require a POST or PUT to it, also provide a schema to specify the format of the response.
  • Describe how your services' are to be invoked using either a WSDL document, or simply an HTML document.
  • Categorize your resources according to whether clients can just receive a representation of the resource, or whether clients can modify (add to) the resource. For the former, make those resources accessible using an HTTP GET. For the later, make those resources accessible using HTTP POST, PUT, and/or DELETE.

(source: [1])

[edit]

Resources

[edit]

MediaWiki REST

  • WikiExchange Paper
    • YARS wiki
    • Demo site
  • CaseWiki:Feeds - Example of a MediaWiki REST interface to news feeds
  • openstreetmap.org REST ideas, see also openstreetmap.org
[edit]

REST info

  • rest-discuss yahoo forum
  • http://www.xfront.com/REST-Web-Services.html
  • http://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm
  • http://en.wikipedia.org/wiki/Web_service
  • http://en.wikipedia.org/wiki/Representational_State_Transfer
  • http://developer.yahoo.net/faq/
  • http://del.icio.us/tag/REST
  • REST-vs-API rant
[edit]

REST v State

  • http://common-lisp.net/project/ucw/rest.html
  • http://ll4.csail.mit.edu/slides/rest-slides.pdf
  • http://www.cincomsmalltalk.com/userblogs/avi/View.ssp
  • http://seaside.st
[edit]

REST related resources

  • XML: The answer to everything? Generic XML article
  • PHP peclweb
  • ezxml
  • minixml
  • Bricolage message about REST
[edit]

Webservices resources

  • "How To Roll Out An Open API"
  • Wikipedia Atom article
  • opensearch.a9.com
[edit]

XML and MediaWiki

  • XmlWiki
  • XML_Embedding_Extension
[edit]

RSS

  • "RSS is the Web 2.0 Pipe"
  • FeedCreator.class.php
    • Example: from plazes,com
  • Wikipedia RSS article
  • RSS2 versus Atom1
    • It appears Atom is more descriptive and able to handle XML inclusions such as RDF.
  • rss-extensions.org - Mediawiki-based RSS info site
[edit]

Atom

  • Atom 1.0 standard
  • atomenabled.org
[edit]

SPARQL URLs

[edit]

Example sites

  • findory.com - RSS news feed search service
Personal tools