Updating a folder
Added by IBM contributorIBM | Edited by IBM contributorElizabeth Bowling on November 6, 2015
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 file folder. This method replaces the existing Atom document for the file folder. For information about how to first retrieve the Atom document for the folder that you want to update, see Retrieving a file folder.
Note: {collection-id} is the value of the <td:uuid> element in the collection's Atom entry document.

You can use this input header in a POST request instead of using the PUT request.

Authentication

This method requires authentication.

Input
Method URI Description
PUT /files/{auth}/api/collection/{collection-id}/entry Updates the Atom document for the file folder.
Content Type: application/atom+xml
Name Type Optional Description
collection-id
string No {collection-id} is the value of the <td:uuid> element in the collection's Atom entry document.
auth
enumerated No The authorization protocol being used by your application to access Connections Cloud.
Authorized values:
  • basic
  • oauth
Name Type Optional Description
label
string No String that uniquely identifies the collection. String must be a valid cross platform file name
title
string Yes
summary
string Yes
visibility
enumerated Yes String. Specify the visibility of the collection.
Authorized values:
  • public
  • private
  • null
makeUnique
enumerated Yes String. If there is a label conflict, and if you specify true, then numbers (for example, "_1,_2...") will be automatically appended.
Default value is false.
Authorized values:
  • true
  • false
filesAddedNotification
enumerated Yes String.
Authorized values:
  • off
  • on
favorite
enumerated Yes String. Flag to indicate if this collection will be added into or removed from favorite.
Default value is false.
Authorized values:
  • true
  • false
includeAncestors
enumerated Yes String. Specify if return ancestors of the collection after editing.
Default value is false.
Authorized values:
  • true
  • false
Name Type Optional Description
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
X-HTTP-Method-Override
string Yes Tunnels a PUT request over HTTP POST. For example:
POST /files/basic/api/collection/14ee4958-ad64-4a64-949b-4202b66f5689/entry HTTP/1.1
X-HTTP-Method-Override: PUT
Output
Content Type: application/atom+xml
Code Description
200
OK. Indicates that the file collection entry was successfully updated. If an error occurs, this header will contain one of the error codes below.
401
Unauthorized.
404
Not Found.
500
Internal server error. The server encountered an unexpected condition that prevented it from fulfilling the request.
403
Forbidden. The server refuses to fulfill a request, typically because the request was for an object that you don't have permission to access.
400
Bad Request. Returned when no matching user record can be found.
Examples
PUT /files/basic/api/collection/14ee4958-ad64-4a64-949b-4202b66f5689/entry?title=example-title&label=example-label HTTP/1.1

Response returned by the server
<?xml version="1.0" encoding="UTF-8"?>
<entry xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:snx="http://www.ibm.com/xmlns/prod/sn" xmlns:td="urn:ibm.com/td" xmlns="http://www.w3.org/2005/Atom">
  <id>urn:lsid:ibm.com:td:14ee4958-ad64-4a64-949b-4202b66f5689</id>
  <td:uuid>14ee4958-ad64-4a64-949b-4202b66f5689</td:uuid>
  <td:label>example-label</td:label>
  <snx:rank scheme="http://www.ibm.com/xmlns/prod/sn/item">0</snx:rank>
  <snx:rank scheme="http://www.ibm.com/xmlns/prod/sn/collections">2</snx:rank>
  <snx:rank scheme="http://www.ibm.com/xmlns/prod/sn/user">0</snx:rank>
  <snx:rank scheme="http://www.ibm.com/xmlns/prod/sn/group">0</snx:rank>
  <link href="https://localhost/files/basic/api/collection/14ee4958-ad64-4a64-949b-4202b66f5689/entry" rel="self"/>
  <link href="https://localhost/files/app/folder/14ee4958-ad64-4a64-949b-4202b66f5689/" rel="alternate" type="text/html"/>
  <link href="https://localhost/files/basic/api/collection/14ee4958-ad64-4a64-949b-4202b66f5689/entry" rel="edit"/>
  <link href="https://localhost/files/basic/api/collection/14ee4958-ad64-4a64-949b-4202b66f5689/feed" rel="files"/>
  <category term="collection" scheme="tag:ibm.com,2006:td/type" label="collection"/>
  <td:parent xmlns:td="urn:ibm.com/td">
      <id>urn:lsid:ibm.com:td:92e59f54-1c6c-46ac-a763-8c460547f157</id>
      <td:uuid xmlns:td="urn:ibm.com/td">92e59f54-1c6c-46ac-a763-8c460547f157</td:uuid>
      <td:title xmlns:td="urn:ibm.com/td">updatedTitle_1_edit_3_1435571259847</td:title>
      <td:label xmlns:td="urn:ibm.com/td">testCreateGetEditCollection_ancestors_1_1435571257780</td:label>
      <link href="https://filesvm004.cn.ibm.com:9443/files/basic/api/collection/92e59f54-1c6c-46ac-a763-8c460547f157/entry" rel="self"></link>
      <link href="https://filesvm004.cn.ibm.com:9443/files/app/folder/92e59f54-1c6c-46ac-a763-8c460547f157/" rel="alternate" type="text/html"></link>
      <link href="https://filesvm004.cn.ibm.com:9443/files/basic/api/collection/92e59f54-1c6c-46ac-a763-8c460547f157/entry" rel="edit"></link>
      <link href="https://filesvm004.cn.ibm.com:9443/files/basic/api/collection/92e59f54-1c6c-46ac-a763-8c460547f157/feed" rel="files"></link>
   </td:parent>
   <td:ancestors xmlns:td="urn:ibm.com/td">
      <td:item xmlns:td="urn:ibm.com/td">
         <id>urn:lsid:ibm.com:td:efdd6c6e-454f-4187-93a8-5d906896ff52</id>
         <td:uuid xmlns:td="urn:ibm.com/td">efdd6c6e-454f-4187-93a8-5d906896ff52</td:uuid>
         <td:title xmlns:td="urn:ibm.com/td">updatedTitle_1_edit_3_1435571257192</td:title>
         <td:label xmlns:td="urn:ibm.com/td">testCreateGetEditCollection_ancestors_1_1435571054292</td:label>
         <link href="https://filesvm004.cn.ibm.com:9443/files/basic/api/collection/efdd6c6e-454f-4187-93a8-5d906896ff52/entry" rel="self"></link>
         <link href="https://filesvm004.cn.ibm.com:9443/files/app/folder/efdd6c6e-454f-4187-93a8-5d906896ff52/" rel="alternate" type="text/html"></link>
         <link href="https://filesvm004.cn.ibm.com:9443/files/basic/api/collection/efdd6c6e-454f-4187-93a8-5d906896ff52/entry" rel="edit"></link>
         <link href="https://filesvm004.cn.ibm.com:9443/files/basic/api/collection/efdd6c6e-454f-4187-93a8-5d906896ff52/feed" rel="files"></link>
      </td:item>
      <td:item xmlns:td="urn:ibm.com/td">
         <id>urn:lsid:ibm.com:td:92e59f54-1c6c-46ac-a763-8c460547f157</id>
         <td:uuid xmlns:td="urn:ibm.com/td">92e59f54-1c6c-46ac-a763-8c460547f157</td:uuid>
         <td:title xmlns:td="urn:ibm.com/td">updatedTitle_1_edit_3_1435571259847</td:title>
         <td:label xmlns:td="urn:ibm.com/td">testCreateGetEditCollection_ancestors_1_1435571257780</td:label>
         <link href="https://filesvm004.cn.ibm.com:9443/files/basic/api/collection/92e59f54-1c6c-46ac-a763-8c460547f157/entry" rel="self"></link>
         <link href="https://filesvm004.cn.ibm.com:9443/files/app/folder/92e59f54-1c6c-46ac-a763-8c460547f157/" rel="alternate" type="text/html"></link>
         <link href="https://filesvm004.cn.ibm.com:9443/files/basic/api/collection/92e59f54-1c6c-46ac-a763-8c460547f157/entry" rel="edit"></link>
         <link href="https://filesvm004.cn.ibm.com:9443/files/basic/api/collection/92e59f54-1c6c-46ac-a763-8c460547f157/feed" rel="files"></link>
      </td:item>
   </td:ancestors>

   <author>
    <name>Liz Schonfeld</name>
    <snx:userid>lschonfeld</snx:userid>
    <email>lschonfeld@renovations.com</email>
    <snx:userState>active</snx:userState>
  </author>
  <td:modifier>
    <name>Liz Schonfeld</name>
    <snx:userid>lschonfeld</snx:userid>
    <email>lschonfeld@renovations.com</email>
    <snx:userState>active</snx:userState>
  </td:modifier>
  <title type="text">example-title</title>
  <published>2015-05-11T12:37:49.912Z</published>
  <updated>2015-05-11T12:38:08.186Z</updated>
  <td:created>2015-05-11T12:37:49.912Z</td:created>
  <td:modified>2015-05-11T12:37:49.912Z</td:modified>
  <summary type="text">testUpdateCollection_SubFolder_top_1431347864517_Summary</summary>
  <td:visibility>public</td:visibility>
  <td:type>personal</td:type>
  <content type="application/atom+xml" src="https://localhost/files/basic/api/collection/14ee4958-ad64-4a64-949b-4202b66f5689/feed"/>
  <snx:isExternal>false</snx:isExternal>
  <td:allowSetFavorite>true</td:allowSetFavorite>
  <td:allowFollowing>true</td:allowFollowing>
</entry>
PUT /files/basic/api/collection/aacc42f1-7491-4964-a6d4-3d276e5d0008/entry?title=Edited Title Sample HTTP/1.1
Host: example.com

Response returned by the server
<id>urn:lsid:ibm.com:td:aacc42f1-7491-4964-a6d4-3d276e5d0008</id>
   <td:uuid xmlns:td="urn:ibm.com/td">aacc42f1-7491-4964-a6d4-3d276e5d0008</td:uuid>
   <td:label xmlns:td="urn:ibm.com/td">Test Add Media to Collection Title Entry 1229626326875_LABEL</td:label>
   <link href="http://example.com:9080/dm/atom/collection/aacc42f1-7491-4964-a6d4-3d276e5d0008/entry" rel="self">
   </link>
   <link href="http://example.com:9080/files/app/collection/60a326d9-33bf-436c-8cca-ce3bf9858dc5" rel="alternate">
   </link>
   <link href="http://example.com:9080/dm/atom/collection/aacc42f1-7491-4964-a6d4-3d276e5d0008/entry" rel="edit">
   </link>
   <category term="collection" scheme="tag:ibm.com,2006:td/type" label="collection">
   </category>
   <author>
      <name>Monifa Shani</name>
      <snx:userid xmlns:snx="http://www.ibm.com/xmlns/prod/sn">mshani</snx:userid>
      <email>mshani@renovations.com</email>
   </author>
   <td:modifier xmlns:td="urn:ibm.com/td">
      <snx:userid xmlns:snx="http://www.ibm.com/xmlns/prod/sn">mshani</snx:userid>
      <td:name xmlns:td="urn:ibm.com/td">Monifa Shani</td:name>
      <email>mshani@renovations.com</email>
   </td:modifier>
   <title type="text">Edited Title Sample</title>
   <published>2008-12-18T18:52:06.890Z</published>
   <updated>2008-12-18T18:52:06.921Z</updated>
   <td:created xmlns:td="urn:ibm.com/td">2008-12-18T18:52:06.890Z</td:created>
   <td:modified xmlns:td="urn:ibm.com/td">2008-12-18T18:52:06.890Z</td:modified>
   <td:itemCount xmlns:td="urn:ibm.com/td">1</td:itemCount>
   <summary type="text">Test Add Media to Collection Title Entry 1229626326875_Summary</summary>
   <td:type xmlns:td="urn:ibm.com/td">personal</td:type>
   <td:visibility xmlns:td="urn:ibm.com/td">PUBLIC</td:visibility>
   <td:notifications>
      <td:filesAdded>on</td:filesAdded>
   </td:notifications>
   <content type="text">http://example.com:9080/dm/atom/collection/aacc42f1-7491-4964-a6d4-3d276e5d0008/feed</content>
</entry>