View the Project on GitHub converspace/activitypush-specification
A lightweight method for URI addressable resources to be automatically notified about remote (off-site) activites on them.
A crypto-free alternative to the Salmon Protocol for public activites.
> GET /bob/post/2 HTTP/1.1
> Host: bobs.host
< HTTP/1.1 200 OK
< Link: <http://bobs.host/activitypush-endpoint>; rel="http://activitypush.org/"
< ...
<
< <html>
< ...
< <link href="http://bobs.host/activitypush-endpoint" rel="http://activitypush.org/" />
< ...
> POST /activitypush-endpoint HTTP/1.1
> Host: bobs.host
> Content-Type: application/x-www-url-form-encoded
>
> actor=http://alices.host/alice&\
> activityid=http://alices.host/alice/activity/42&\
> object=http://bobs.host/bob/post/2
< HTTP/1.1 202 Accepted
Note: the "\" character is used here to indicate line wrapping in the request content and is not part of the content itself.
bobs.host should check that the object of the activity belongs to it.
> GET /alice HTTP/1.1
> Host: alices.host
< HTTP/1.1 200 OK
< Link: <http://alices.host/activitypush-endpoint>; rel="http://activitypush.org/"
< ...
<
< <html>
< ...
< <link href="http://alices.host/activitypush-endpoint" rel="http://activitypush.org/" />
< ...
> GET /activitypush-endpoint?actor=...&activityid=...&object=... HTTP/1.1
> Host: alices.host
< HTTP/1.1 200 OK
< Content-Type: application/stream+json
<
< {JSON Activity Streams}
bobs.host should check that the actor and the object of the activity are the same as the one it received in the notification.
ActivityPush is agnostic to how Activities are represented as long as it has an actor URL, a verb and an object URL. For example, instead of the application/stream+json, 'alices.host` could have returned an HTML representation containing activity microformats or RDFa.
Feel free to file an issue if you have feedback/questions/suggestions.