Community articleUpdating file metadata
Added by IBM contributorIBM on December 12, 2014
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

Update the Atom document representation of the metadata for a file from your library.



Update the a file from your library.

When using the application/atom+xml content type, this method replaces the content of the elements in the Atom document with the values you specify in the Atom document you provide as input. This operation updates the metadata of the file; if you want to update the file and the metadata itself, see Updating a file or Updating a file using a multipart post.

When using any other content type, the content of the file itself is updated.


You must authenticate this request.

Note: {document-id} is the value of the <td:uuid> or <td:label> elements in the file's Atom entry document. If you identify the document using the value of the <td:label>, then you must include the identifier=label parameter with the request.

You can use the following header.

Input

An Atom entry document containing the updated Atom document for the file. The content type must be specified as application/atom+xml.

Output

An updated Atom entry document.

Input
Method URI Description
PUT /files/basic/api/myuserlibrary/document/{document-id}/entry You can determine the URI in either of the following ways:
Value of the href attribute of the <link rel="edit"> element in the file's Document Atom entries.
Construct the URI using the following syntax: /basic/api/myuserlibrary/document/{document-id}/entry
Note: Atom elements take precedence over HTTP parameters.
Content Type: application/atom+xml
Name Type Optional Description
document-id
string No {document-id} is the value of the <td:uuid> or <td:label> elements in the file's Atom entry document. If you identify the document using the value of the <td:label>, then you must include the identifier=label parameter with the request.
Name Type Optional Description
propagate
boolean Yes Indicates if users that are shared with can share this document. The default value is true.
sendEmail
boolean Yes Indicates if an email notification is sent when sharing with the specified user. The default value is true.
Name Type Optional Description
X-Method-Override
string Yes Tunnels a PUT request over the HTTP POST request.
Output
Content Type: application/atom+xml
Code Description
200
Indicates that the file entry was successfully updated. If an error occurs, this header contains one of the error codes.
401
Unauthorized.
403
Forbidden.
404
Not Found.
References