Updating file metadata using a multipart PUT
Added by IBM contributorIBM | Edited by Claudia R Elbourn on June 30, 2015
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

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

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 include one or more of these parameters in the body of the request.

Input
Method URI Description
PUT /files/{auth}/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: /{auth}/api/myuserlibrary/document/{document-id}/entry
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.
auth
enumerated No The authorization protocol being used by your application to access Connections Cloud.
Authorized values:
  • basic
  • oauth
Name Type Optional Description
commentNotification
enumerated Yes 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.
Authorized values:
  • on
  • off
createVersion
boolean Yes 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.
mediaNotification
enumerated Yes 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.
Authorized values:
  • on
  • off
recommendation
enumerated Yes Specifies whether the person updating the document recommends the document. This parameter takes a Boolean value of either on or off. The default is off.
Authorized values:
  • on
  • off
removeTag
string Yes Removes the specified tag. Use it multiple times to remove multiple tags or set it equal to null to remove all tags.
sendNotification
boolean Yes Specified whether notifications should be sent about this update. This parameter takes a Boolean value of either true or false.
sharePermission
enumerated Yes 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.
Authorized values:
  • Edit
  • View
shareSummary
string Yes Text. Explanation of the share.
shareWith
string Yes User ID of the user to share the content with. This parameter can be applied multiple times. Supports multivalue.
tag
string Yes String. Keyword that helps to classify the file. This parameter can be applied multiple times if multiple tags are passed. Supports multivalue. If this parameter and the removeTag parameter pass the same value, the removeTag parameter gets precedence.
visibility
enumerated Yes 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. Defaults to private.
Authorized values:
  • private
  • public
description
string Yes Summary of the document in plain text.
file
string Yes Contains the binary media of the updated file.
label
string Yes Label of the file being updated.
X-Update-Nonce
string Yes 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.
Name Type Optional Description
X-Method-Override
string Yes Tunnels a PUT request over the HTTP POST request.
Authorization
enumerated No The authentication mechanism selected by your application to access the API.
Basic is the Base64 encoding of the IBM Connections Cloud username and password: Base64(username:password). For example, Base64(twatson@us.ibm.com:password).
Bearer is the oauth 2.0 access token that is generated when the user grants your application access to IBM Connections Cloud services.
See the reference topic "OAuth 2.0 APIs for web server flow" for more information.
Authorized values:
  • bearer
  • basic
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.