Web API Discovery

Automatic Discovery of Web API Endpoints

Editor's Draft 05 January 2010

Latest Editor's Draft:
http://payswarm.com/specs/web-api-discovery.html
Editors:
Manu Sporny, Digital Bazaar, Inc.

Abstract

Web Applications have become widely adopted and are replacing public and corporate software infrastructure at an accelerated pace. The need for inter-operable Web Services and Web Service Providers is growing at the same pace. While the definition of these Web APIs will be handled by expert organizations such as messaging, storage, commerce, and computing providers, the discovery of these Web APIs can utilize existing standards to announce these Web Service endpoints. This document defines a mechanism and vocabulary for user agents that may be used to automatically discover Web APIs using standard web authoring technologies - HTML and RDFa.

Status of this document

This section describes the status of this document at the time of its publication. Other documents may supersede this document.

This is a very experimental document and has no status as a standards-track document at this time. While it is very early in the development of this document, all feedback is welcome.

Browsable version-control record of all changes:
Github change record: http://github.com/digitalbazaar/payswarm/tree/
Raw Git interface: git clone git://github.com/digitalbazaar/payswarm.git

This specification is the 05 January 2010 Editor's Draft.

This document was produced by a group operating under the 5 February 2004 W3C Patent Policy. W3C maintains a public list of any patent disclosures made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains Essential Claim(s) must disclose the information in accordance with section 6 of the W3C Patent Policy.

Table of Contents

  1. 1 The Basic Idea
  2. 2 Acknowledgements
  3. 3 References
    1. 3.1 Normative References
    2. 3.2 Non-Normative References

1 The Basic Idea

Using XHTML 1.1, HTML5 or XHTML5, one could use RDFa to express webservices that are available via a particular website.

For example, if a website supported a standard messaging API, every page on the site could have the following piece of markup:

We support the <a rel="webapi:services" href="services.html">Web Storage API</a>.

The services.html document would be marked up with RDFa, generating triples like the following:

   <http://mysite.com/some/arbitary/path/api/sendmsg>
      <http://w3.org/vocab/messaging-webapi#deliver-message>
         "POST" .

User agents could then use this to make specific calls to a website using a standardized Web API protocol. If this sounds much like SOAP/WSDL/WSIL/UDDI it is, but much, much less complex.

Our experiences with SOAP/WSDL/WSIL and UDDI have been fairly awful. We needed a lightweight solution and settled on AJAX, REST and JSON for the RPC stack. The switch resulted in a simpler implementation, less code and an easier to understand Web API.

One of the goals of this document is to make publishing Web APIs as simple and straightforward as possible, using tools that many are already familiar with using to create.

2 Acknowledgements

The editors graciously acknowledge reviews and contributions from (in alphabetical order):

3 References

Some of the following references are normative while others are informative.

3.1 Normative References

[XHTML+RDFA]
RDFa in XHTML: Syntax and Processing, Mark Birbeck, Shane McCarron, Steven Pemberton. W3C, October 2008.

3.2 Non-Normative References

All references are non-normative.

[HTML4]
The HTML 4.01 Specification, D. Raggett, A. Le Hors, I. Jacobs, 24 December 1999.
[HTML5] (currently not a REC)
The HTML5 Specification, Ian Hickson. W3C, Work in Progress