Intro to the Atom Publishing Protocol. Joe Gregorio Google

Similar documents
RSS to ATOM. ATOM to RSS

Request for Comments: NewBay Software October 2007

RSS - FEED ELEMENTS. It indicates the last time the Feed was modified in a significant way. All timestamps in Atom must conform to RFC 3339.

Intended status: Standards Track August 15, 2008 Expires: February 16, 2009

Publishing and Edi.ng Web Resources Atom Publishing Protocol. CS 431 Spring 2008 Cornell University Carl Lagoze 03/12/08

REST-based Integration Architecture for a Financial Business Service. Phillip Ghadir, innoq

Internet-Draft September 1, 2005 Expires: March 5, Feed History: Enabling Incremental Syndication draft-nottingham-atompub-feed-history-04

Intended status: Informational. B. Wyman October 2, 2007

Feature identification for topical relevance assessment in feed search engines 1

Open Archives Initiative Object Reuse & Exchange. Resource Map Discovery

Coalescence of XML-Based Really Simple Syndication (RSS) Aggregator for Blogosphere

Open Archives Initiative Object Reuse & Exchange. Resource Map Discovery

REMIT. Guidance on the implementation of web feeds for Inside Information Platforms

httplib2 Release 0.4

Expires: December 9, 2005 June 07, The Atom Syndication Format draft-ietf-atompub-format-09. Status of this Memo

BibSword. Implementation of SWORD client in Invenio for the automated submission of digital objects to arxiv

Introduction to AtomPub Web Services Ben Ramsey International PHP Conference 11 Oct 2010

Jabber, Inc. August 20, 2004

Erik Wilde (UC Berkeley School of Information)

OGC GeoRSS Encoding Standard

REST in Practice. From SOA to REST: Designing and Implementing RESTful Services [./] Tutorial at ICWE Sebastián, Spain) Contents

Internet-Draft. Boswijck Memex Consulting January 26, The Atom Syndication Format draft-ietf-atompub-format-05. Status of this Memo

Open Geospatial Consortium, Inc.

CICS for Architects: What you Need to Know About CICS Integration and Connectivity

Content Management Interoperability Services

Internet-Draft September 5, 2004 Expires: March 6, The Atom Syndication Format draft-ietf-atompub-format-02. Status of this Memo

REST in Practice. From SOA to REST: Designing and Implementing RESTful Services [./] Tutorial at WWW2009 [ (Madrid, Spain)

Open Source and Standards

Atom: From Blogging to Data, Web (Services) 2.0

Naming Things in Adafruit IO

Search Web Services - searchretrieve Operation: Binding for OpenSearch Version 1.0

FeedFeeds A Web Service for Feed Metadata

Introduction to XML. When talking about XML, here are some terms that would be helpful:

Distribution and Publication With Atom Web Services

Java Technology and REST: Implementing the Atom Publishing Protocol

Desktop client for open social networks

ETSI TS V ( ) Technical Specification

C - Colour Mixing. Let's use the Sparkle module and some switches to make a colour mixer! 2018 courses.techcamp.org.

Federated Search Developer Guide

Network Working Group Internet-Draft October 27, 2007 Intended status: Experimental Expires: April 29, 2008

MITOCW watch?v=kz7jjltq9r4

BEGINNER PHP Table of Contents

B - Broken Track Page 1 of 8

MITOCW ocw f99-lec07_300k

Web 2.0 Tutorial. Jacek Kopecký STI Innsbruck

Extended Identity for Social Networks

Instructor: Craig Duckett. Lecture 07: Tuesday, April 17 th, 2018 Conflicts and Isolation, MySQL Workbench

In today s video I'm going show you how you can set up your own online business using marketing and affiliate marketing.

by Jimmy's Value World Ashish H Thakkar

For more info on Cloud9 see their documentation:

The Atom Project. Tim Bray, Sun Microsystems Paul Hoffman, IMC

Content Syndication. Web Architecture and Information Management [./] Spring 2009 INFO (CCN 42509) Contents. Erik Wilde, UC Berkeley School of

Department of Computer Science Institute for System Architecture, Chair for Computer Networks. Internet Subscription Services

6.001 Notes: Section 8.1

Designing Pages with Widgets

Introduction, Notepad++, File Structure, 9 Tags, Hyperlinks 1

MITOCW watch?v=hverxup4cfg

Rob Weir, IBM 1 ODF and Web Mashups

BBC Learning English Face up to Phrasals Mark's Mistake


The syndication feed framework

Adding a RSS Feed Custom Widget to your Homepage

Printing Drafts in Outlook Showing Date sent Asked by: OntarioMedicalAssociatin

Feed Subscription Management

MITOCW watch?v=se4p7ivcune

An Approach to Enhancing Workflows Provenance by Leveraging Web 2.0 to Increase Information Sharing, Collaboration and Reuse

Open PermID Release notes R1.2

STIX Profile Development Tutorial

Integrating Visual FoxPro and MailChimp

Module 6. Campaign Layering

Pete Forde Partner, Unspace Interactive Toronto, ON January 9, 2007

Slide 1 CS 170 Java Programming 1 Testing Karel

What is an RSS/Atom News Aggregator? The best way to explain is to quote from the online Tutorial for BottomFeeder:

FAQ: Crawling, indexing & ranking(google Webmaster Help)

Using Web Services to Integrate with Questionmark Perception

Uploading and Embedding Your Digital Story (YouTube/Wordpress Version)

Forcing A Page To Not Load From Cache

All About Open & Sharing

Using metadata for interoperability. CS 431 February 28, 2007 Carl Lagoze Cornell University

Designing Enterprise IT Systems with REST: A (Cloudy) Case Study. Stuart Charlton Chief Software Architect, Elastra

[MS-WSUSOD]: Windows Server Update Services Protocols Overview

Introduction. From SOA to REST: Designing and Implementing RESTful Services [./] Tutorial at WWW2009 [ (Madrid, Spain) Contents

Lesson 5: Verifying RAMs with the Fluke 9010A Version 1.03

In our first lecture on sets and set theory, we introduced a bunch of new symbols and terminology.

BottomFeeder A Standards-Compliant News Aggregator

Web Architecture Review Sheet

Lesson 11: WordPress SEO, Statistics, and Analysis

Library 2.0 and User-Generated Content What can the users do for us?

MITOCW watch?v=0jljzrnhwoi

Here's how we are going to Supercharge WordPress.

What's the Slope of a Line?

RSS Feeds What they are and what they do. COMNET Meeting February 18th 20th, 2008 Education International Head Office, Brussels, Belgium

Network Working Group Internet-Draft August 2005 Expires: February 2, Atom Link No Follow draft-snell-atompub-feed-nofollow-03.

Introduction. From SOA to REST: Designing and Implementing RESTful Services [./] Tutorial at ICWE Sebastián, Spain) Contents

NetLogo Lab 3 Tutorial: Finding Peaks

Working with Lotus Web Content Management Web Content Integrator and Problem Determination

Linked Lists. What is a Linked List?

JSON and PL/SQL: A Match Made in Database

Search Operation. Using the Search Operation CHAPTER

Tracking changes in Word 2007 Table of Contents

Transcription:

Intro to the Atom Publishing Protocol Joe Gregorio Google

Atom

Atom Syndication Feed <feed xmlns="http://www.w3.org/2005/atom"> <title>example Feed</title> <link href="http://example.org/"/> <updated>2003-12-13t18:30:02z</updated> <author> <name>john Doe</name> </author> <id>urn:uuid:60a76c80-d399-11d9-b93c-0003939e0af6</id> <entry> <title>atom-powered Robots Run Amok</title> <link href="http://example.org/2003/12/13/atom03"/> <id>urn:uuid:1225c695-cfb8-4ebb-80da344efa6a</id> <updated>2003-12-13t18:30:02z</updated> <summary>some text.</summary> <link rel="edit" href="http://example.org/edit/1/"/> </entry>... </feed>

Atom Syndication Feed <feed xmlns="http://www.w3.org/2005/atom"> <title>example Feed</title> <link href="http://example.org/"/> <updated>2003-12-13t18:30:02z</updated> <author> <name>john Doe</name> </author> <id>urn:uuid:60a76c80-d399-11d9-b93c-0003939e0af6</id> <entry> <title>atom-powered Robots Run Amok</title> <link href="http://example.org/2003/12/13/atom03"/> <id>urn:uuid:1225c695-cfb8-4ebb80da344efa6a</id> <updated>2003-12-13t18:30:02z</updated> <summary>some text.</summary> <link rel="edit" href="http://example.org/edit/1/"/> </entry>... </feed>

Feed URI http://example.org/feed/ GET <feed xmlns="http://www.w3.org/2005/atom"> <title>example Feed</title> <link href="http://example.org/"/> <updated>2003-12-13t18:30:02z</updated> <author> <name>john Doe</name> </author> <id>urn:uuid:60a76c80-d399-11d9-0003939e0af6</id> <entry> <title>atom-powered Robots Run Amok</title> <link href="http://example.org/2003/12/13/atom03"/> <id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id> <updated>2003-12-13t18:30:02z</updated>...

Protocol Requirements Create Retrieve Update Delete

Protocol Requirements Create Retrieve Update Delete

Feed URI <entry> <author> <title>robot False Alarm</title> <id>urn:uuid:1225c695-cfb8-4ebb-80da344efa6a</id> <updated>2003-12-14t10:33:00z</updated> <content>sorry about the false alarm.</content> </entry> POST http://example.org/feed/

Feed <?xml version="1.0" encoding="utf-8"?> <feed xmlns="http://www.w3.org/2005/atom"> <title>example Feed</title> <link href="http://example.org/"/> <updated>2003-12-13t18:30:02z</updated> <author><name>john Doe</name></author> <id>urn:uuid:60a76c80-d399-11d9-0003939e0af6</id> <entry> <title>robot False Alarm</title> <link href="http://example.org/2003/12/14/norobots"/> <id>urn:uuid:1225c695-cfb8-4ebb-80da344efa6a</id> <updated>2003-12-14t10:33:00z</updated> <content>sorry about the false alarm.</content> <link rel="edit" href="http://example.org/edit/2/"/> </entry>... </feed>

Protocol Requirements Create Retrieve Update Delete

Feed <?xml version="1.0" encoding="utf-8"?> <feed xmlns="http://www.w3.org/2005/atom"> <title>example Feed</title> <link href="http://example.org/"/> <updated>2003-12-13t18:30:02z</updated> <author><name>john Doe</name></author> <id>urn:uuid:60a76c80-d399-11d9-0003939e0af6</id> <entry> <title>robot False Alarm</title> <link href="http://example.org/2003/12/14/norobots"/> <id>urn:uuid:1225c695-cfb8-4ebb-80da344efa6a</id> <updated>2003-12-14t10:33:00z</updated> <content>sorry about the false alarm.</content> <link rel="edit" href="http://example.org/edit/2/"/> </entry>... </feed>

Remove Entry DELETE http://example.org/feed/2/

Protocol Requirements Create Retrieve Update Delete

Edit URI http://example.org/feed/2/ GET <entry xmlns="http://www.w3.org/2005/atom"> <title>robot False Alarm</title> <link href="http://example.org/2003/12/14/norobots"/> <id>urn:uuid:1225c695-cfb8-4ebbaaaa-a80d...</id> <updated>2003-12-14t10:33:00z</updated> <content>sorry about the false alarm.</content> <link rel="edit" href="http://example.org/edit/2/"/> </entry>

Update <entry xmlns="http://www.w3.org/2005/atom"> <title>atom Powered Robot False Alarm</title> <link href="http://example.org/2003/12/14/norobots"/> <id>urn:uuid:1225c695-cfb8-4ebbaaaa-80da344efa6a</id> <updated>2003-12-14t10:33:00z</updated> <summary>sorry about the false alarm.</summary> <link rel="edit" href="http://example.org/edit/2/"/> </entry> PUT http://example.org/feed/2/

Protocol Requirements Create Retrieve Update Delete

Media

Media POST Slug: The Beach http://example.org/feed/

Feed <feed xmlns="http://www.w3.org/2005/atom"> <title>example Feed</title> <link href="http://example.org/"/> <updated>2003-12-13t18:30:02z</updated> <author><name>john Doe</name></author> <id>urn:uuid:60a76c80-d399-11d9-b93c-0003939e0af6</id> <entry xmlns="http://www.w3.org/2005/atom"> <title>the Beach</title> <id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id> <updated>2005-10-07t17:17:08z</updated> <summary type="text" /> <content type="image/png" src="http://media.example.org/the_beach.png"/> <link rel="edit-media" href="http://media.example.org/edit/the_beach.png" /> <link rel="edit" href="http://example.org/media/edit/the_beach.atom" /> </entry>... </feed>

Feed <feed xmlns="http://www.w3.org/2005/atom"> <title>example Feed</title> <link href="http://example.org/"/> <updated>2003-12-13t18:30:02z</updated> <author><name>john Doe</name></author> <id>urn:uuid:60a76c80-d399-11d9-b93c-0003939e0af6</id> <entry xmlns="http://www.w3.org/2005/atom"> <title>the Beach</title> <id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id> <updated>2005-10-07t17:17:08z</updated> <summary type="text" /> <content type="image/png" src="http://media.example.org/the_beach.png"/> <link rel="edit-media" href="http://media.example.org/edit/the_beach.png" /> <link rel="edit" href="http://example.org/media/edit/the_beach.atom" /> </entry>... </feed>

Feed <feed xmlns="http://www.w3.org/2005/atom"> <title>example Feed</title> <link href="http://example.org/"/> <updated>2003-12-13t18:30:02z</updated> <author><name>john Doe</name></author> <id>urn:uuid:60a76c80-d399-11d9-b93c-0003939e0af6</id> <entry xmlns="http://www.w3.org/2005/atom"> <title>the Beach</title> <id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id> <updated>2005-10-07t17:17:08z</updated> <summary type="text" /> <content type="image/png" src="http://media.example.org/the_beach.png"/> <link rel="edit-media" href="http://media.example.org/edit/the_beach.png" /> <link rel="edit" href="http://example.org/media/edit/the_beach.atom" /> </entry>... </feed>

Update Media shark PUT http://media.example.org/edit/the_beach.png

Update Media Link Entry <entry xmlns="http://www.w3.org/2005/atom"> <title>a Shark At The Beach</title> <id>urn:uuid:1225c695-cfb8-4ebb-80da344efa6a</id> <updated>2005-10-07t17:17:08z</updated> <summary type="text" /> <content type="image/png" src="http://media.example.org/the_beach.png"/> <link rel="edit-media" href="http://media.example.org/edit/the_beach.png" /> <link rel="edit" href="http://example.org/media/edit/the_beach.atom" /> </entry> PUT http://example.org/media/edit/the_beach.atom

Remove Media DELETE http://example.org/media/edit/the_beach.atom

Corrections More than one collection

Service Document <?xml version="1.0" encoding='utf-8'?> <service xmlns="http://www.w3.org/2007/app" xmlns:atom="http://www.w3.org/2005/atom"> <workspace> <atom:title>main Site</atom:title> <collection href="http://example.org/blog/main" > <atom:title>my Blog Entries</atom:title> </collection> <collection href="http://example.org/blog/pic" > <atom:title>pictures</atom:title> <accept>image/png</accept> <accept>image/jpeg</accept> <accept>image/gif</accept> </collection> </workspace> </service>

Service Document <?xml version="1.0" encoding='utf-8'?> <service xmlns="http://www.w3.org/2007/app" xmlns:atom="http://www.w3.org/2005/atom"> <workspace> <atom:title>main Site</atom:title> <collection href="http://example.org/blog/main" > <atom:title>my Blog Entries</atom:title> </collection> <collection href="http://example.org/blog/pic" > <atom:title>pictures</atom:title> <accept>image/png</accept> <accept>image/jpeg</accept> <accept>image/gif</accept> </collection> </workspace> </service>

Service Document <?xml version="1.0" encoding='utf-8'?> <service xmlns="http://www.w3.org/2007/app" xmlns:atom="http://www.w3.org/2005/atom"> <workspace> <atom:title>main Site</atom:title> <collection href="http://example.org/blog/main" > <atom:title>my Blog Entries</atom:title> </collection> <collection href="http://example.org/blog/pic" > <atom:title>pictures</atom:title> <accept>image/png</accept> <accept>image/jpeg</accept> <accept>image/gif</accept> </collection> </workspace> </service>

Service Document <?xml version="1.0" encoding='utf-8'?> <service xmlns="http://www.w3.org/2007/app" xmlns:atom="http://www.w3.org/2005/atom"> <workspace> <atom:title>main Site</atom:title> <collection href="http://example.org/blog/main" > <atom:title>my Blog Entries</atom:title> </collection> <collection href="http://example.org/blog/pic" > <atom:title>pictures</atom:title> <accept>image/png</accept> <accept>image/jpeg</accept> <accept>image/gif</accept> </collection> </workspace> </service>

Service Document <?xml version="1.0" encoding='utf-8'?> <service xmlns="http://www.w3.org/2007/app" xmlns:atom="http://www.w3.org/2005/atom"> <workspace> <atom:title>main Site</atom:title> <collection href="http://example.org/blog/main" > <atom:title>my Blog Entries</atom:title> </collection> <collection href="http://example.org/blog/pic" > <atom:title>pictures</atom:title> <accept>image/png</accept> <accept>image/jpeg</accept> <accept>image/gif</accept> </collection> </workspace> </service>

The End RFC 4287 RFC 5023 Jeff Fisher Intro to Google Data on YouTube http://code.google.com/apis/gdata/

Intro to the Atom Publishing Protocol Joe Gregorio Google 1 The Atom Publishing Protocol is a simple protocol for publishing content on the web. It uses the Atom Syndication Format and works over HTTP. This is an introduction to the Atom Publishing Protocol, meant to give you a high-level overview of the protocols fundamentals. Watching this will make it easier read RFC 5023, the specification that defines the Atom Publishing Protocol, something you should do since I will skip some of the details of the protocol.

Atom 2 Just as syndication feeds started out initially for weblogs and then got applied to other areas, the same is true for the Atom Publishing Protocol. We will use blogging as out motivating example, but realize that the Atom Publishing Protocol can be applied to a much wider range activities.

Atom Syndication Feed <feed xmlns="http://www.w3.org/2005/atom"> <title>example Feed</title> <link href="http://example.org/"/> <updated>2003-12-13t18:30:02z</updated> <author> <name>john Doe</name> </author> <id>urn:uuid:60a76c80-d399-11d9-b93c-0003939e0af6</id> <entry> <title>atom-powered Robots Run Amok</title> <link href="http://example.org/2003/12/13/atom03"/> <id>urn:uuid:1225c695-cfb8-4ebb-80da344efa6a</id> <updated>2003-12-13t18:30:02z</updated> <summary>some text.</summary> <link rel="edit" href="http://example.org/edit/1/"/> </entry>... </feed> 3 To begin, let's look at a feed in the Atom Syndication Format.

Atom Syndication Feed <feed xmlns="http://www.w3.org/2005/atom"> <title>example Feed</title> <link href="http://example.org/"/> <updated>2003-12-13t18:30:02z</updated> <author> <name>john Doe</name> </author> <id>urn:uuid:60a76c80-d399-11d9-b93c-0003939e0af6</id> <entry> <title>atom-powered Robots Run Amok</title> <link href="http://example.org/2003/12/13/atom03"/> <id>urn:uuid:1225c695-cfb8-4ebb80da344efa6a</id> <updated>2003-12-13t18:30:02z</updated> <summary>some text.</summary> <link rel="edit" href="http://example.org/edit/1/"/> </entry>... </feed> 4 A feed contains one entry for each weblog entry that has been recently created or updated. It contains the data for that weblog entry in a machine readable format.

Feed URI http://example.org/feed/ GET <feed xmlns="http://www.w3.org/2005/atom"> <title>example Feed</title> <link href="http://example.org/"/> <updated>2003-12-13t18:30:02z</updated> <author> <name>john Doe</name> </author> <id>urn:uuid:60a76c80-d399-11d9-0003939e0af6</id> <entry> <title>atom-powered Robots Run Amok</title> <link href="http://example.org/2003/12/13/atom03"/> <id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id> <updated>2003-12-13t18:30:02z</updated> 5... The way syndication works is that the feed lives at a URI and you issue an HTTP GET to that URI to retrieve the feed. In syndication you do those GETs periodically and look for new entries. If there are new or updated entries they will appear at the beginning of the feed.

Protocol Requirements Create Retrieve Update Delete 6 Our publishing protocol and be broken down into four basic operations you want to perform on individual entries. Those are to create new entries, retrieve the entries that make up a weblog, update an entry and remove an entry.

Protocol Requirements Create Retrieve Update Delete 7 So a feed actually satisfies one of our operations: Retrieve. So we've got 1 out of 4 already! Here's the fundamental idea of the Atom Publishing Protocol: That if we make changes to the feed, those changes get reflected in the blog. For various reasons you probably want the 'feed' that goes into an aggregator to be different from the one you use for editing. For example, some entries may be 'drafts' and we don't want those published until we explicitly remove them from 'draft' status, but we still want to be able to edit them with our publishing protocol. We'll differentiate the aggregator feed from the editing feed by calling the editing feed a 'collection feed'.

Feed URI <entry> <author> <title>robot False Alarm</title> <id>urn:uuid:1225c695-cfb8-4ebb-80da344efa6a</id> <updated>2003-12-14t10:33:00z</updated> <content>sorry about the false alarm.</content> </entry> POST http://example.org/feed/ 8 We have Retrieve, how do you add a new entry to a collection? We do the simplest thing you could think of, you merely send the entry in an HTTP POST request to the URI of the collection feed. This is just an entry on its own, it's not sitting inside a feed.

Feed <?xml version="1.0" encoding="utf-8"?> <feed xmlns="http://www.w3.org/2005/atom"> <title>example Feed</title> <link href="http://example.org/"/> <updated>2003-12-13t18:30:02z</updated> <author><name>john Doe</name></author> <id>urn:uuid:60a76c80-d399-11d9-0003939e0af6</id> <entry> <title>robot False Alarm</title> <link href="http://example.org/2003/12/14/norobots"/> <id>urn:uuid:1225c695-cfb8-4ebb-80da344efa6a</id> <updated>2003-12-14t10:33:00z</updated> <content>sorry about the false alarm.</content> <link rel="edit" href="http://example.org/edit/2/"/> </entry>... </feed> 9 That entry gets added to the collection feed. Like we said before, this change to the feed will also get reflected in the weblog.

Protocol Requirements Create Retrieve Update Delete 10 Now we have the Create and Retrieve cases covered. Let's go back and look at that newly added entry.

Feed <?xml version="1.0" encoding="utf-8"?> <feed xmlns="http://www.w3.org/2005/atom"> <title>example Feed</title> <link href="http://example.org/"/> <updated>2003-12-13t18:30:02z</updated> <author><name>john Doe</name></author> <id>urn:uuid:60a76c80-d399-11d9-0003939e0af6</id> <entry> <title>robot False Alarm</title> <link href="http://example.org/2003/12/14/norobots"/> <id>urn:uuid:1225c695-cfb8-4ebb-80da344efa6a</id> <updated>2003-12-14t10:33:00z</updated> <content>sorry about the false alarm.</content> <link rel="edit" href="http://example.org/edit/2/"/> </entry>... </feed> 11 When I create a new entry in the collection, the server will add some elements to the entry. The edit URI is the URI is one of those things. That URI is where the entry lives. It's the URI by which we can retrieve, update or delete an entry. Let's cover the simplest case first: delete.

Remove Entry DELETE http://example.org/feed/2/ 12 The way to remove an entry from the collection feed to send a DELETE to its edit URI. You'll notice there's no body to our request, just the DELETE method. This removes the entry from the collection feed.

Protocol Requirements Create Retrieve Update Delete 13 That's one more feature down, we have now covered creating, deleting and retrieving entries. Actually when I marked Retrieve off the list as complete it wasn't really true. The entry in the collection feed might not be complete. In order to retrieve the complete entry we need to GET the entry from the edit URI.

Edit URI http://example.org/feed/2/ GET <entry xmlns="http://www.w3.org/2005/atom"> <title>robot False Alarm</title> <link href="http://example.org/2003/12/14/norobots"/> <id>urn:uuid:1225c695-cfb8-4ebbaaaa-a80d...</id> <updated>2003-12-14t10:33:00z</updated> <content>sorry about the false alarm.</content> <link rel="edit" href="http://example.org/edit/2/"/> </entry> 14 That entry is full. And if we want to make changes to an entry, that's the one to make changes to. Once we've made those changes, how do we tell the server about those changes? We PUT the entry back to the edit URI. That is, we send an HTTP PUT request to the edit URI with the updated entry in the body of the request.

Update <entry xmlns="http://www.w3.org/2005/atom"> <title>atom Powered Robot False Alarm</title> <link href="http://example.org/2003/12/14/norobots"/> <id>urn:uuid:1225c695-cfb8-4ebbaaaa-80da344efa6a</id> <updated>2003-12-14t10:33:00z</updated> <summary>sorry about the false alarm.</summary> <link rel="edit" href="http://example.org/edit/2/"/> </entry> PUT http://example.org/feed/2/ 15 Here we've update the title of our entry and are PUTting it back to the edit URI.

Protocol Requirements Create Retrieve Update Delete 16 Now we're done, we've covered all four parts of the publishing protocol, well at least for text.

Media 17 But what about media, such as images, or sound, or video? How does the Atom Publishing Protocol handle those?

Media POST Slug: The Beach http://example.org/feed/ 18 Just like in the entry case, we do the simplest possible thing, we just POST the media to the URI of the collection feed. Along with the POST method we also add in a Slug: header, which is used to give a hint to the server about how to build the URI of the created resources. The POSTing of media to a collection actually creates TWO new resources.

Feed <feed xmlns="http://www.w3.org/2005/atom"> <title>example Feed</title> <link href="http://example.org/"/> <updated>2003-12-13t18:30:02z</updated> <author><name>john Doe</name></author> <id>urn:uuid:60a76c80-d399-11d9-b93c-0003939e0af6</id> <entry xmlns="http://www.w3.org/2005/atom"> <title>the Beach</title> <id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id> <updated>2005-10-07t17:17:08z</updated> <summary type="text" /> <content type="image/png" src="http://media.example.org/the_beach.png"/> <link rel="edit-media" href="http://media.example.org/edit/the_beach.png" /> <link rel="edit" href="http://example.org/media/edit/the_beach.atom" /> </entry>... </feed> 19 we can see those two resources when we look at the entry that gets added to the collection.

Feed <feed xmlns="http://www.w3.org/2005/atom"> <title>example Feed</title> <link href="http://example.org/"/> <updated>2003-12-13t18:30:02z</updated> <author><name>john Doe</name></author> <id>urn:uuid:60a76c80-d399-11d9-b93c-0003939e0af6</id> <entry xmlns="http://www.w3.org/2005/atom"> <title>the Beach</title> <id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id> <updated>2005-10-07t17:17:08z</updated> <summary type="text" /> <content type="image/png" src="http://media.example.org/the_beach.png"/> <link rel="edit-media" href="http://media.example.org/edit/the_beach.png" /> <link rel="edit" href="http://example.org/media/edit/the_beach.atom" /> </entry>... </feed> 20 The 'edit' link points to one of the created resources the Media Link Entry contains the meta-data for the image

Feed <feed xmlns="http://www.w3.org/2005/atom"> <title>example Feed</title> <link href="http://example.org/"/> <updated>2003-12-13t18:30:02z</updated> <author><name>john Doe</name></author> <id>urn:uuid:60a76c80-d399-11d9-b93c-0003939e0af6</id> <entry xmlns="http://www.w3.org/2005/atom"> <title>the Beach</title> <id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id> <updated>2005-10-07t17:17:08z</updated> <summary type="text" /> <content type="image/png" src="http://media.example.org/the_beach.png"/> <link rel="edit-media" href="http://media.example.org/edit/the_beach.png" /> <link rel="edit" href="http://example.org/media/edit/the_beach.atom" /> </entry>... </feed> 21 the edit-media link is the image supports GET/PUT

Update Media shark PUT http://media.example.org/edit/the_beach.png 22 PUT an new image to update

Update Media Link Entry <entry xmlns="http://www.w3.org/2005/atom"> <title>a Shark At The Beach</title> <id>urn:uuid:1225c695-cfb8-4ebb-80da344efa6a</id> <updated>2005-10-07t17:17:08z</updated> <summary type="text" /> <content type="image/png" src="http://media.example.org/the_beach.png"/> <link rel="edit-media" href="http://media.example.org/edit/the_beach.png" /> <link rel="edit" href="http://example.org/media/edit/the_beach.atom" /> </entry> PUT http://example.org/media/edit/the_beach.atom 23 PUT an updated MLE to update the metadata

Remove Media DELETE http://example.org/media/edit/the_beach.atom 24 you send a DELETE to the edit URI to remove both the meta-data and the media.

Corrections More than one collection 25 don't want all the entries intermingled with the media, or maybe a link log, etc. How to learn about all the feeds a service supports And the media they support?

Service Document <?xml version="1.0" encoding='utf-8'?> <service xmlns="http://www.w3.org/2007/app" xmlns:atom="http://www.w3.org/2005/atom"> <workspace> <atom:title>main Site</atom:title> <collection href="http://example.org/blog/main" > <atom:title>my Blog Entries</atom:title> </collection> <collection href="http://example.org/blog/pic" > <atom:title>pictures</atom:title> <accept>image/png</accept> <accept>image/jpeg</accept> <accept>image/gif</accept> </collection> </workspace> </service> 26 Contains information about the collections a service supports

Service Document <?xml version="1.0" encoding='utf-8'?> <service xmlns="http://www.w3.org/2007/app" xmlns:atom="http://www.w3.org/2005/atom"> <workspace> <atom:title>main Site</atom:title> <collection href="http://example.org/blog/main" > <atom:title>my Blog Entries</atom:title> </collection> <collection href="http://example.org/blog/pic" > <atom:title>pictures</atom:title> <accept>image/png</accept> <accept>image/jpeg</accept> <accept>image/gif</accept> </collection> </workspace> </service> 27 workspace = blog (or other grouping)

Service Document <?xml version="1.0" encoding='utf-8'?> <service xmlns="http://www.w3.org/2007/app" xmlns:atom="http://www.w3.org/2005/atom"> <workspace> <atom:title>main Site</atom:title> <collection href="http://example.org/blog/main" > <atom:title>my Blog Entries</atom:title> </collection> <collection href="http://example.org/blog/pic" > <atom:title>pictures</atom:title> <accept>image/png</accept> <accept>image/jpeg</accept> <accept>image/gif</accept> </collection> </workspace> </service> 28 collection == Collection

Service Document <?xml version="1.0" encoding='utf-8'?> <service xmlns="http://www.w3.org/2007/app" xmlns:atom="http://www.w3.org/2005/atom"> <workspace> <atom:title>main Site</atom:title> <collection href="http://example.org/blog/main" > <atom:title>my Blog Entries</atom:title> </collection> <collection href="http://example.org/blog/pic" > <atom:title>pictures</atom:title> <accept>image/png</accept> <accept>image/jpeg</accept> <accept>image/gif</accept> </collection> </workspace> </service> 29 the URI of the Collection Feed

Service Document <?xml version="1.0" encoding='utf-8'?> <service xmlns="http://www.w3.org/2007/app" xmlns:atom="http://www.w3.org/2005/atom"> <workspace> <atom:title>main Site</atom:title> <collection href="http://example.org/blog/main" > <atom:title>my Blog Entries</atom:title> </collection> <collection href="http://example.org/blog/pic" > <atom:title>pictures</atom:title> <accept>image/png</accept> <accept>image/jpeg</accept> <accept>image/gif</accept> </collection> </workspace> </service> 30 This media collection accepts only these image types

The End RFC 4287 RFC 5023 Jeff Fisher Intro to Google Data on YouTube http://code.google.com/apis/gdata/ 31 The standards the define Atom Pub The Google Data APIs are based on AtomPub Watch Jeff's video Visit site