Product Documentation articleUpdate a draft: lq851
Added by IBM contributorXiang Yu Hao | Edited by IBM contributorJames A Riel on April 26, 2011 | Version 4
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

No abstract provided.

Overview



This is the specification for applications that update a Draft resource.


URL endpoints



Perform a PUT operation on one of the following URL formats:
URL
Description
    /library/{library-id}/draft/{draft-id}/entry
    Update the specified draft.



Authentication



This method requires authentication. The authenticated user must have 'Edit' authority on the specified resource.


Arguments



The following HTTP headers may be supported for this operation.
Header
Description
    Slug
    Contains path and label of the resource. Non-ASCII characters can appear in this header, but they must be properly encoded according to the RFC 2047.
    Content-Type
    Used to specify the Mime type for the content being sent to the server. POST and PUT operations will return HTTP response code 400 (Bad request) when this header is not present in the incoming request. If the collection does not support the specified content type, the server will return HTTP response code 415 (Unsupported media type).
Content-LanguageUsed to specify the language for the content being sent to the server. All content is handled via UTF-8 encoding on the server.
Content-LengthUsed to specify the content length when sending media content. This is required when sending media; otherwise HTTP response code 411 (Length required) will be returned.


Error Codes



Error Code
Description
    Unknown
    Returned when the cause of an error is unknown
    AccessDenied
    Returned when the cause of an error is due to a permission restriction
    ItemNotFound
    Returned when the cause of an error is related to a resource not being found
    InvalidTagCharacters
    Returned when the cause of an error is due to an invalid tag character
QuotaViolation Returned when the content being submitted exceeds the library quota



Example Request



POST http://hao.cn.ibm.com/dm/atom/library/_Pplace11_RMain.nsf/draft/_Pplace11_RMain.nsf_D4134D7116BFAF45A4825787600158705/entry
X-Method-Override: PUT

<entry xmlns="http://www.w3.org/2005/Atom" xml:lang="en" xmlns:td="urn:example.com/td">
<title type="text">drafttest5</title>
<summary type="text">new description</summary>
</entry>




Example Response



<entry xml:base="http://hao.cn.ibm.com/" xmlns="http://www.w3.org/2005/Atom" xmlns:td="urn:ibm.com/td" xmlns:snx="http://www.ibm.com/xmlns/prod/sn">
<id>urn:lsid:ibm.com:quickr:_Pplace11_RMain_D98208566D3A3133F48257876002B27F2</id>
<link href="http://hao.cn.ibm.com/dm/atom/library/_Pplace11_RMain/draft/_Pplace11_RMain_D98208566D3A3133F48257876002B27F2/entry" rel="self"/>
<link href="http://hao.cn.ibm.com/LotusQuickr/place11/Main.nsf/h_Toc/98208566D3A3133F48257876002B27F2?OpenDocument" rel="alternate"/>
<link href="http://hao.cn.ibm.com/dm/atom/library/_Pplace11_RMain/draft/_Pplace11_RMain_D98208566D3A3133F48257876002B27F2/entry" rel="edit"/>
<link href="http://hao.cn.ibm.com/dm/atom/library/_Pplace11_RMain/folder/_Pplace11_RMain" rel="parent"/>
<link href="http://hao.cn.ibm.com/dm/atom/library/_Pplace11_RMain/draft/_Pplace11_RMain_D98208566D3A3133F48257876002B27F2/feed" rel="current"></link>
<link href="http://hao.cn.ibm.com/dm/atom/library/_Pplace11_RMain/draft/_Pplace11_RMain_D98208566D3A3133F48257876002B27F2/media" rel="edit-media"/>
<link href="http://hao.cn.ibm.com/dm/atom/library/_Pplace11_RMain/draft/_Pplace11_RMain_D98208566D3A3133F48257876002B27F2/media" rel="enclosure" type="application/msword" title="drafttest5" hreflang="en" length="0"/>
<source xmlns:axis2ns417="http://www.w3.org/2007/app">
<collection href="http://hao.cn.ibm.com/dm/atom/library/_Pplace11_RMain/folder/_Pplace11_RMain/feed" xmlns="http://www.w3.org/2007/app">
<title type="text" xmlns:atom="http://www.w3.org/2005/Atom">drafttest5</title>
</collection>
</source>
<author>
<uri>CN=wpsadmin%2Fou=Users%2Fou=Westford%2Fou=Lotus%2Fo=Software%20Group%2Fdc=lotus%2Fdc=notesdev%2Fdc=ibm%2Fdc=com</uri>
<name>wpsadmin</name>
<email>wpsadmin@cn.ibm.com</email>
</author>
<td:modifier>
<td:uri>CN=wpsadmin%2Fou=Users%2Fou=Westford%2Fou=Lotus%2Fo=Software%20Group%2Fdc=lotus%2Fdc=notesdev%2Fdc=ibm%2Fdc=com</td:uri>
<td:name>wpsadmin</td:name>
<td:email>wpsadmin@cn.ibm.com</td:email>
</td:modifier>
<title type="text">drafttest5</title>
<updated>2011-04-18T07:51:59Z</updated>
<published>2011-04-18T03:55:08Z</published>
<summary type="html">
<![CDATA[new description]]>
</summary>
<category term="draft" scheme="tag:ibm.com,2006:td/type" label="draft"/>
</entry>