Update blog posts
To update a blog post, send a replacement blog post entry document in Atom format to the existing blog post's edit web address.All existing blog post information will be replaced with the new data. To avoid deleting all existing data, retrieve any data you want to retain first, and send it back with this request. For example, if you want to add a new tag to a blog post, retrieve the existing tags, and send them all back with the new tag in the update request. See Retrieve a blog entry for more information.
See Authenticating requests for information about how to authenticate the request.
To update a blog post...
- Retrieve the Blogs service document. See Retrieve the Blogs service document.
- In the service document, find the workspace for the blog from which you want to retrieve the post, and then retrieve the web address of the "weblog Entries" collection in that workspace.
- Send a GET request to the weblog Entries collection.
- In the returned feed, find the entry and note down the value of the href attribute of its <link rel="edit" type="application/atom+xml" ... > element.
- Send a PUT request to the web address defined in the href attribute and pass in a new blog post entry document that includes your changes.
Table 1. Atom API request details
Method Resource URI Input representation PUT blog post Value of the href attribute of the <link rel="edit"> element of each entry in the weblog Entries feed. blog post
Input
Provide a blog post Atom entry document.Note: The content type of the Atom entry document must be application/atom+xml.
Output
None.Returned HTTP headers
HTTP/1.1 200 OK
Indicates that the blog post was successfully updated. If an error occurs, this header contains one of the error codes.
- HTTP/1.1 403 Forbidden: Authorization failed.
- HTTP/1.1 404 Not Found
Parent topic
Work with blog postsRelated reference
Retrieve blog posts
Blog posting content
});