This is no longer active or running. If you think it's a good idea just email me and I'll run it again, or send you the code, or both.

The Observer Web Service Documentation

Currently this is a very minimal service with a REST interface. More will come when it comes.

Watching

Input

To attach as a dependant on an URL send a GET request to http://observer.mike-burns.com/ping/watch with two parameters, subject and dependant.

The value of the subject parameter should be the URL that you want tracked.

The value of the dependant parameter should be the URL that should be pinged when the subject has changed. The dependant URL should point to a resource which can take the parameter subject. The subject parameter's value is the URL of the subject.

Output

The result of this is:

<success message="Notification is set" subject="some URL" dependant="some URL" />

A non-successful result is:

<error message="Unable to save observation" />

Example

http://observer.mike-burns.com/ping/watch?subject=http://mike-burns.com/&dependant=http://mike-burns.com/cgi-bin/echo

With the result:

<success message="Notification is set"
         subject="http://mike-burns.com/"
         dependant="http://mike-burns.com/cgi-bin/echo" />

Ignoring

Input

To stop watching a URL send a GET request to http://observer.mike-burns.com/ping/ignore with two parameters, subject and dependant.

The value of the subject parameter should be the URL you wish to now ignore.

The value of the dependant parameter should be your ping URL.

Output

The output of this is:

<success message="No longer watching" subject="some URL" dependant="some URL" />

A non-successful result is:

<error message="No such subject" />

Or:

<error message="No such dependant" />

Or:

<error message="Internal error: unable to delete dependant" />

Example

http://observer.mike-burns.com/ping/ignore?subject=http://mike-burns.com/&dependant=http://mike-burns.com/cgi-bin/echo

With the result:

<success message="No longer watching"
         subject="http://mike-burns.com/"
         dependant="http://mike-burns.com/cgi-bin/echo" />

Subjects

Input

To get all the subjects that you are watching send a GET request to http://observer.mike-burns.com/ping/watching with the parameter dependant set to the URL of your ping endpoint.

Output

<subjects dependant="a URL">
  <subject url="some URL" />
  <subject url="some other URL" />
  <subject url="another URL" />
</watchings>

Example

http://observer.mike-burns.com/ping/watching?dependant=http://mike-burns.com/ping/echo

With the result:

<subjects dependant="http://mike-burns.com/ping/echo">
  <subject url="http://mike-burns.com/">
</subjects>

Dependants

Input

For all the URLs watching you send a GET request to http://observer.mike-burns.com/ping/watchers with the parameter subject set to the subject's URL.

Output

<dependants subject="a URL">
  <dependant url="some URL" />
  <dependant url="some other URL" />
  <dependant url="another URL" />
<dependants>

Example

http://observer.mike-burns.com/ping/watching?subject=http://mike-burns.com/

With the result:

<dependants subject="http://mike-burns.com/">
  <dependant url="http://mike-burns.com/cgi-bin/echo">
</dependants>

FOAF Mike Burns <mike@mike-burns.com> <mikeburns@myjabber.net>