Update file metadata using a multipart PUT 

Replaces both the binary data and the file metadata for which you specify new values using passed parameters.

You must authenticate this request.

See Authenticating requests for information about how to authenticate the request.

Table 1. Atom API request details

Method URI Output representation Description
PUT 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

multipart put Updates the binary data and creates an updated version of the Atom document containing the metadata of a file in your library.


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 include the identifier=label parameter with the request.

You can use the following header.

Table 2. Input header

Parameter Description
X-Method-Override Tunnels a PUT request over the HTTP POST request.
X-Update-Nonce String. Represents a unique data string generated by the server upon request that you can provide to secure the request. See Getting a cryptographic key for information about how to request the data string.

You can include one or more of these parameters in the body of the request.

Table 3. Parameters

Parameter Description
commentNotification String. Specifies whether you want to get a notification when someone adds or updates a comment on a file. Options are on or off. The default is on.
createVersion Indicates whether to create a version of the document as it is saved. This parameter takes a Boolean value of either true or false. The default is false. Provide this parameter and set it to true to create a new version of the binary data and a new version of its associated metadata.
description Summary of the document in plain text.
file Contains the binary media of the updated file.
identifier Indicates how the document is identified in the {document-id} variable segment of the web address. By default, look up is performed with the expectation that the URL contains the value from the <td:uuid> element of a File Atom entry. Specify "label" if the URL instead contains the value from the <td:label> element of a File Atom entry.
label Label of the file being updated.
mediaNotification String. Specifies whether the person updating the file wants to get a notification when someone subsequently updates the file. Options are on or off. The default is on.
X-Update-Nonce String. Represents a unique data string generated by the server upon request that you can provide to secure the request. See Getting a cryptographic key for information about how to request the data string. If both are specified, the value in this parameter takes precedence over the value of X-Update-Nonce in the header.
recommendation Specifies whether the person updating the document recommends the document. This parameter takes a Boolean value of either on or off.
removeTag Removes the specified tag. Use it multiple times to remove multiple tags or set it equal to null to remove all tags.
sendNotification Specified whether notifications should be sent about this update. This parameter takes a Boolean value of either true or false.
sharePermission Defines the level of permission that the people listed in the sharedWith parameter should have to the file. Only applicable if the sharedWith parameter is passed. Permission level options are Edit or View.
shareSummary Text. Explanation of the share.
shareWith User ID of the user to share the content with. This parameter can be applied multiple times. Supports multivalue.
tag String. Keyword that helps to classify the file. This parameter can be applied multiple times if multiple tags are passed or you can specify more than one tag at a time by separating the tags with commas. If this parameter and the removeTag parameter pass the same value, the removeTag parameter gets precedence.
visibility String. Specifies who can see the file. Options are private or public. A public file is visible to all users and can be shared by all users.


Input

A multipart post in which the parameters define the values you want to update.


Output

An Atom entry document representing the updated file.

Returned HTTP headers

HTTP/1.1 200 OK

Error codes


Parent topic

Work with files


Related tasks


Getting a cryptographic key

Related reference
File content
Create a version


   

 

});

+

Search Tips   |   Advanced Search