Community articleView/folder entries PUT8.5.3 UP1
Added by IBM contributorIBM on October 25, 2013
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

Updates the contents of a folder.
Input
Method URI Description
PUT /{database}/api/data/collections/unid/{unid} Updates the contents of a folder. Use this URI to specify the folder by UNID.
PUT /{database}/api/data/collections/name/{name} Updates the contents of a folder. Use this URI to specify the folder by name.
Content Type: application/json
Use the table below that represents the expected fields:
Name Type Optional Description
add
string Yes Array of universal IDs of documents to add to the folder.
remove
string Yes Array of universal IDs of documents to remove from the folder.
Name Type Optional Description
database
string No Path name of a database on the server relative to the data directory.
unid
string No Universal ID of a folder in the database.
name
string No Name or alias of a folder in the database.
Name Type Optional Description
Content-Type
string No Must be application/json.
Output
Code Description
200
OK. Indicates that the request was handled successfully.
400
Status code 400 (Bad request) indicates something went wrong. The response body may include a message like this: "Error(s) performing 1 of 4 folder operation(s)". The error applies to only the bad operations. Good operations in the request are applied.
Examples
This request adds two documents to a folder name Folder1.
PUT /XPagesExt.nsf/api/data/collections/name/Folder1
Content-Type: application/json

{"add": ["D73CD922E372C494852578B600584F03", "D1D1114365B55618852578B700499AFD"]}


This request removes a document from a folder named Folder1.
PUT /XPagesExt.nsf/api/data/collections/name/Folder1
Content-Type: application/json

{"remove": ["D73CD922E372C494852578B600584F03"]}