Get Information on Multiple Folders
/documents/api/1.1/folders/lists
Get folder information for a list of folders.
Request
- application/json
- application/xml
- idList
-
Type:
string
Required:true
A comma-separated list of globally unique identifiers (GUIDs) for folders. To reference the user's home folder, the value for
idList
can includeself
. There is a limit of 100 folder IDs
- accessToken
-
Type:
string
Applink access token authorizing the current user to access this folder. This parameter is mandatory if
appLinkID
is used. It can be used as accessToken or AccessToken. - appLinkID
-
Type:
string
Applink ID authorizing the current user to access this folder. Any time the parameter
appLinkID
is used, a parameteraccessToken
must be provided as well. It can be used as appLinkID or AppLinkID. - dAccessCode
-
Type:
string
Access code needed to use protected public links. It needs to be sent as part of a Cookie header in the following format:
dAccessCode-<linkID>=<passcodeValue>
- linkID
-
Type:
string
Public link ID of a public link authorizing the current user to access this folder. It can be used as linkID or LinkID.
Response
- application/json
- application/xml
The response body contains information about the specific folders.
object
- childFileCount
-
Type:
number
The number of files in the folder. - childFolderCount
-
Type:
number
The number of folders in the folder. - childItemsCount
-
Type:
number
The total number of files and folders in the folder. - errorCode
-
Type:
string
An error code of zero (0) indicates no errors.
-
Type:
object
FolderDefinitionAdditional Properties Allowed:Folder metadata information.
- childitemsCount
-
Type:
string
Number of items contained in the folder. - createdBy
-
Type:
object
UserAdditional Properties Allowed:User information - createdTime
-
Type:
string
Date the folder was created. - description
-
Type:
string
Folder description. - id
-
Type:
string
Globally unique identifier (GUID) for the folder. - modifiedBy
-
Type:
object
UserAdditional Properties Allowed:User information - modifiedTime
-
Type:
string
Date the folder was last modified. - name
-
Type:
string
Folder name. - ownedBy
-
Type:
object
UserAdditional Properties Allowed:User information - parentID
-
Type:
string
Globally unique identifier (GUID) for the parent folder. If the parent folder is the user's home folder, the value for
parentID
isself
. - size
-
Type:
string
Size of the folder in bytes, including all of the files and folders contained in the folder. - type
-
Type:
string
Item typefolder
.
- displayName
-
Type:
string
The display name for the user. - id
-
Type:
string
Globally unique identifier (GUID) for the user. - type
-
Type:
string
Item typeuser
.
Example application/json
{
"errorCode":"0",
"items":[
{
"type":"folder",
"childFileCount":"6",
"childFolderCount":"1",
"createdTime":"2017-06-09T15:21:32Z",
"createdBy":{
"displayName":"UserAA",
"id":"U5C4D5FCE14F2B44946FA74745B3E9DD6490",
"loginName":"UserAA",
"type":"user"
},
"id":"F7A9B089812185D3178AED0845B3E9DD6490EDC3EE22",
"name":"f1",
"size":"437207",
"modifiedTime":"2017-06-09T15:21:32Z",
"modifiedBy":{
"displayName":"UserAA",
"id":"U5C4D5FCE14F2B44946FA74745B3E9DD6490",
"loginName":"UserAA",
"type":"user"
},
"ownedBy":{
"displayName":"UserAA",
"id":"U5C4D5FCE14F2B44946FA74745B3E9DD6490",
"loginName":"UserAA",
"type":"user"
},
"parentID":"self",
"childItemsCount":"7"
}
]
}
The idList
parameter is missing or has more than 100 file IDs.
The user does not have access to one or more of the folder IDs.
One or more of the folder IDs do not exist.
Examples
The following example retrieves information about 3 distinct folders. The example uses an applink ID because these folders are under a folder structure not owned by or shared with the current user. The applink ID and access token are submitted in the request header.
GET .../folders/lists?idList=FAD7A87F0613A0CBDD4DA521B5D17B95F47087F4E518,F64529EF770DCF96F029ED82B5D17B95F47087F4E518,F62E96098A6F9186F94730C1B5D17B95F47087F4E518
Request Header
appLinkID: LF5Bxj4TPo_p4n4qWn0tbKTicR2cTUJKv7X_ng9E7ry93rRuDokPqS1d6-wKwhb_wtcGYFDsI_cNMxeKQ-HR-FXQhiVoGRTYM_MPZY8qpICfYU94mmnMjM_cvsRhKMzc0NJgvwEJfqqDwPsAVrhc8cmg== accessToken: 352FpiMmW66PeYI1Gh5b83I9CXRwZhLfYAu4TXdqpzD8uNKUBMZVVJ3ZvivUW8kQ
Request Body
None.
HTTP Status Code
HTTP_STATUS = 200
JSON Response
{ "errorCode": "0", "items": [ { "type": "folder", "childFileCount": "0", "childFolderCount": "1", "createdTime": "2017-06-14T20:49:08Z", "createdBy": { "displayName": "User AA", "id": "UEB6AD431E4357AE752CE3F2B5D17B95F470", "loginName": "userAALoginName", "type": "user" }, "description": "appLinkTest", "id": "FAD7A87F0613A0CBDD4DA521B5D17B95F47087F4E518", "name": "appLinkTest", "size": "0", "modifiedTime": "2017-06-16T17:16:28Z", "modifiedBy": { "displayName": "User BB", "id": "U5083EA1954687218BA6C3D9B5D17B95F470", "loginName": "U5083EA1954687218BA6C3D9B5D17B95F470", "type": "user" }, "ownedBy": { "displayName": "User AA", "id": "UEB6AD431E4357AE752CE3F2B5D17B95F470", "loginName": "userAALoginName", "type": "user" }, "childItemsCount": "1" }, { "type": "folder", "childFileCount": "0", "childFolderCount": "1", "createdTime": "2017-06-16T18:10:05Z", "createdBy": { "displayName": "User BB", "id": "U5083EA1954687218BA6C3D9B5D17B95F470", "loginName": "U5083EA1954687218BA6C3D9B5D17B95F470", "type": "user" }, "description": "subFolderTestByUserB CONTRIBUTOR applink - EDITED", "id": "F64529EF770DCF96F029ED82B5D17B95F47087F4E518", "name": "subFolderTestByUserB", "size": "0", "modifiedTime": "2017-06-19T20:11:33Z", "modifiedBy": { "displayName": "User BB", "id": "U5083EA1954687218BA6C3D9B5D17B95F470", "loginName": "U5083EA1954687218BA6C3D9B5D17B95F470", "type": "user" }, "ownedBy": { "displayName": "User AA", "id": "UEB6AD431E4357AE752CE3F2B5D17B95F470", "loginName": "userAALoginName", "type": "user" }, "parentID": "FAD7A87F0613A0CBDD4DA521B5D17B95F47087F4E518", "childItemsCount": "1" }, { "type": "folder", "childFileCount": "0", "childFolderCount": "0", "createdTime": "2017-06-16T20:37:03Z", "createdBy": { "displayName": "User BB", "id": "U5083EA1954687218BA6C3D9B5D17B95F470", "loginName": "U5083EA1954687218BA6C3D9B5D17B95F470", "type": "user" }, "description": "subFolderTestByUserB CONTRIBUTOR applink - EDITED", "id": "F62E96098A6F9186F94730C1B5D17B95F47087F4E518", "name": "subFolderTestByUserB(2)", "size": "0", "modifiedTime": "2017-06-16T20:45:01Z", "modifiedBy": { "displayName": "User BB", "id": "U5083EA1954687218BA6C3D9B5D17B95F470", "loginName": "U5083EA1954687218BA6C3D9B5D17B95F470", "type": "user" }, "ownedBy": { "displayName": "User AA", "id": "UEB6AD431E4357AE752CE3F2B5D17B95F470", "loginName": "userAALoginName", "type": "user" }, "parentID": "F64529EF770DCF96F029ED82B5D17B95F47087F4E518", "childItemsCount": "0" } ] }
Example 2
The following example returns information about the user's home folder.
GET ../folders/lists?idList=self
Request Header
None.
Request Body
None.
HTTP Status Code
HTTP_STATUS = 200
JSON Response
{ "errorCode": "0", "items": [ { "type": "folder", "childFileCount": "6", "childFolderCount": "2", "createdTime": "2017-06-09T08:11:27Z", "createdBy": { "displayName": "UserAA", "id": "U5C4D5FCE14F2B44946FA74745B3E9DD6490", "loginName": "userAALoginName", "type": "user" }, "description": "Personal Libraries for U5C4D5FCE14F2B44946FA74745B3E9DD6490", "id": "self", "name": "U5C4D5FCE14F2B44946FA74745B3E9DD6490", "size": "438361", "modifiedTime": "2017-06-09T08:11:27Z", "modifiedBy": { "displayName": "UserAA", "id": "U5C4D5FCE14F2B44946FA74745B3E9DD6490", "loginName": "userAALoginName", "type": "user" }, "ownedBy": { "displayName": "UserAA", "id": "U5C4D5FCE14F2B44946FA74745B3E9DD6490", "loginName": "userAALoginName", "type": "user" }, "childItemsCount": "8" } ] }
Example 3
The following example returns an error because one or more of the specified folder IDs do not exist. When there are multiple folder IDs, the first ID with an error is used in the error message.
GET ../folders/lists?idList=F7A9B089812185D3178AED0845B3E9DD6490EDC3EE22,F1A1C454FD92B47E9EB6883845B3E9DD6490EDC3EE22,FD2100FD6787FAA2AEBEBAFE45B3E9DD6490EDC3EE22
Request Header
None.
Request Body
None.
HTTP Status Code
HTTP_STATUS = 404
JSON Response
{ "errorCode": "-16", "errorKey": "!csSecurityValidationFailed!csFldDoesNotExist,F1A1C454FD92B47E9EB6883845B3E9DD6490EDC3EE22!csUnprivilegedSystemError", "errorMessage": "Security validation failed. 'F1A1C454FD92B47E9EB6883845B3E9DD6490EDC3EE22' does not exist. The error was caused by an internally generated issue. The error has been logged.", "errorType": "folder", "idList": "F7A9B089812185D3178AED0845B3E9DD6490EDC3EE22,F1A1C454FD92B47E9EB6883845B3E9DD6490EDC3EE22,FD2100FD6787FAA2AEBEBAFE45B3E9DD6490EDC3EE22", "title": "Security validation failed. 'F1A1C454FD92B47E9EB6883845B3E9DD6490EDC3EE22' does not exist. The error was caused by an internally generated issue. The error has been logged.", "type": "https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html" }
Example 4
The following example returns an error because the idList
parameter includes a file ID.
GET ../folders/lists?idList=DD416842F8CC892D981DA0C245B3E9DD6490EDC3EE22
Request Header
None.
Request Body
None.
HTTP Status Code
HTTP_STATUS = 404
JSON Response
{ "errorCode": "-16", "errorKey": "!csSecurityValidationFailed!csFldDoesNotExist,DD416842F8CC892D981DA0C245B3E9DD6490EDC3EE22!csUnprivilegedSystemError", "errorMessage": "Security validation failed. 'DD416842F8CC892D981DA0C245B3E9DD6490EDC3EE22' does not exist. The error was caused by an internally generated issue. The error has been logged.", "errorType": "folder", "idList": "DD416842F8CC892D981DA0C245B3E9DD6490EDC3EE22", "title": "Security validation failed. 'DD416842F8CC892D981DA0C245B3E9DD6490EDC3EE22' does not exist. The error was caused by an internally generated issue. The error has been logged.", "type": "https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html" }
Example 5
The following example returns an error because the required idList
parameter is missing from the request.
GET ../folders/lists/
Request Header
None.
Request Body
None.
HTTP Status Code
HTTP_STATUS = 400
JSON Response
{ "errorCode": "-97", "errorKey": "!csRequiredFieldMissing,idList", "errorMessage": "Required field 'idList' is missing.", "title": "Required field 'idList' is missing.", "type": "https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html" }
Example 6
The following example returns an error because the idList
parameter is limited to 100 IDs.
GET ../folders/lists?idList=F05C9C124A52628AF4FF24DB45B3E9DD6490EDC3EE22,FE3182CC4363FF47C44C332E45B3E9DD6490EDC3EE22,F1F63697F085FB635C25834B45B3E9DD6490EDC3EE22,F99F5C04E3662E1E12FE408745B3E9DD6490EDC3EE22,F981FAF229036D58D180E55245B3E9DD6490EDC3EE22,FF3E09E2F889BB64245BE9C345B3E9DD6490EDC3EE22,FF4BA3E1303EDEA1EFBB0DB245B3E9DD6490EDC3EE22,F5315C447DDD621D0642A0A645B3E9DD6490EDC3EE22,FEE5F888C62A7BB6CA1EFFA645B3E9DD6490EDC3EE22,FEA5564FF99FAE8FC9DDFCFC45B3E9DD6490EDC3EE22,FE07779FB84DF485AA13F2DD45B3E9DD6490EDC3EE22,F737FA28F887949CCCC4095A45B3E9DD6490EDC3EE22,F26FB8D03A25DCFB3AE5271745B3E9DD6490EDC3EE22,F7C926C52824D02B7599293145B3E9DD6490EDC3EE22,FFE5843ADFA22B46FAF2005D45B3E9DD6490EDC3EE22,F5120EF2A8A11C002B56834445B3E9DD6490EDC3EE22,FB2BF7EA4C7B75460A9BD0BB45B3E9DD6490EDC3EE22,F3B261BC38FEF0622AB1B06345B3E9DD6490EDC3EE22,F0FF89D4EBF9A6BEA7C9839A45B3E9DD6490EDC3EE22,FA1FFA86350BCA9C30986D1545B3E9DD6490EDC3EE22,FCC77D72E3AE808D7D11AF9C45B3E9DD6490EDC3EE22,F81E3570224FAD6AB64B36CC45B3E9DD6490EDC3EE22,F03A058095EEA565CA83293B45B3E9DD6490EDC3EE22,F3F4E68D1C9B60D5B81F8F6845B3E9DD6490EDC3EE22,FABF076311C19BB8E612C93B45B3E9DD6490EDC3EE22,F2482ED2B057390F91C0731B45B3E9DD6490EDC3EE22,F87F77AB7E317B30665C45C045B3E9DD6490EDC3EE22,F1BA928F6CD768B21206275045B3E9DD6490EDC3EE22,F2D519964E387D9CCFDED34445B3E9DD6490EDC3EE22,FD17DC008EB9B348F15E4E9045B3E9DD6490EDC3EE22,F8D486F9A5DF2B0AA02197B745B3E9DD6490EDC3EE22,F3E039F824A0C87E1A0E4B9E45B3E9DD6490EDC3EE22,F17E567FEEC3C27336C6D4DA45B3E9DD6490EDC3EE22,F0BC8ADF3C5FEFB4548618BC45B3E9DD6490EDC3EE22,FAF14C94535654C33006788845B3E9DD6490EDC3EE22,FA332F7A23FD5C71ED78AE3945B3E9DD6490EDC3EE22,FCD5546D05BF5AAC982F913045B3E9DD6490EDC3EE22,FB7FC0506E1EF83032414D3745B3E9DD6490EDC3EE22,F18A234612E6BA025A8302B245B3E9DD6490EDC3EE22,F7DFE97B89AD38B4FFBF3F5F45B3E9DD6490EDC3EE22,FA982A9FF6CF27D92682EDA245B3E9DD6490EDC3EE22,F1435A110F599896CB16C18245B3E9DD6490EDC3EE22,FAD69FBC57F39ADAEEAA7E5E45B3E9DD6490EDC3EE22,F1DF50D8C900C3D8B54B808D45B3E9DD6490EDC3EE22,FF097313D007A50B322A69F945B3E9DD6490EDC3EE22,F74E2DB8487337EC9213F7A745B3E9DD6490EDC3EE22,F6250880ED9ECF181E4CD8EE45B3E9DD6490EDC3EE22,F1953ED63C8DA4D69CBAFC6A45B3E9DD6490EDC3EE22,F2D79FEDB6855E8ABC03D95345B3E9DD6490EDC3EE22,FAFA56ED44A0FFC27D3171F345B3E9DD6490EDC3EE22,F6D2E87A9C8784CE353B78B145B3E9DD6490EDC3EE22,F3126FCC912A16EFAB16E5A145B3E9DD6490EDC3EE22,F62E85F6654304BDD1648E1845B3E9DD6490EDC3EE22,FA4A2AD6FF603FFD6B7CC27D45B3E9DD6490EDC3EE22,F9DB10F22EBD98E820E0F63A45B3E9DD6490EDC3EE22,FF7272B9A7FA087AE2460D4845B3E9DD6490EDC3EE22,FC9442A2B14930E564AA263845B3E9DD6490EDC3EE22,FADA9249B43AC0CDD19F51F845B3E9DD6490EDC3EE22,FBEBCB7FEBC0A6C967F6E23545B3E9DD6490EDC3EE22,F1F6DB4BB3FD46B2673C444E45B3E9DD6490EDC3EE22,FA7A4F6FBA4698771787EFC845B3E9DD6490EDC3EE22,F83B9E3F5E54921DD05E9CCF45B3E9DD6490EDC3EE22,FA19DEA0D1B35044510506D845B3E9DD6490EDC3EE22,F0ACA7D7FA1D69CF65BA08D245B3E9DD6490EDC3EE22,F308859D3A5B969FAC21920D45B3E9DD6490EDC3EE22,F2F023EE715A5382F0F71C4945B3E9DD6490EDC3EE22,FDD8BFBDDE524B095C00784C45B3E9DD6490EDC3EE22,FC0CA44E615520E7FA1EB94A45B3E9DD6490EDC3EE22,F41205055670D112B992A4F545B3E9DD6490EDC3EE22,F7A37292897B817A7AA7116645B3E9DD6490EDC3EE22,FCEED95F5061D25E451FE36845B3E9DD6490EDC3EE22,F96F8BD2DCED1686E812771345B3E9DD6490EDC3EE22,FF5D93AF3A9CE8D9A0968EAE45B3E9DD6490EDC3EE22,F1F8CD5A18C333754D3DE8A745B3E9DD6490EDC3EE22,F8A5C7A41A503F424BA4891F45B3E9DD6490EDC3EE22,F8A1A3F75D1241B1870116FA45B3E9DD6490EDC3EE22,FE2E508149ADBB2ED76EDBCE45B3E9DD6490EDC3EE22,FEAFFE80DD95EDE3DF7E22A045B3E9DD6490EDC3EE22,F8F0D08EDEA7302801FF274845B3E9DD6490EDC3EE22,F71C91673F9C3831691F202B45B3E9DD6490EDC3EE22,F941C5145B587BDF9D50E6C645B3E9DD6490EDC3EE22,F17DC0E78D90C85B9FA56DE145B3E9DD6490EDC3EE22,FB6AE4365C662DD60E4FE92845B3E9DD6490EDC3EE22,F3DB5A2E57E52E007B7A4DCC45B3E9DD6490EDC3EE22,F76A4FFCA089C37343042AF745B3E9DD6490EDC3EE22,FC701AB82B136D827591836645B3E9DD6490EDC3EE22,F6768F686FB31238053FD42F45B3E9DD6490EDC3EE22,F0D11D9DF6E96251D0B0049D45B3E9DD6490EDC3EE22,F20325E4F0F06FA4793AC25D45B3E9DD6490EDC3EE22,F249227ACE325CE630648BF145B3E9DD6490EDC3EE22,F74603D9D1ED6D06BC455E4E45B3E9DD6490EDC3EE22,FC7ABBF7D264662560A90D0245B3E9DD6490EDC3EE22,F90CA52D4E8D0C14088F36EE45B3E9DD6490EDC3EE22,FF82CAA0E93DD8DC26388CBD45B3E9DD6490EDC3EE22,FD010814437AE9EB1A6B4B0C45B3E9DD6490EDC3EE22,F1E5B4525BC8F085C5CD190F45B3E9DD6490EDC3EE22,FF18BC51E4A9B1857167818E45B3E9DD6490EDC3EE22,F50CEB2923F2BE8E3284DFF045B3E9DD6490EDC3EE22,F97D49850F83BF19847B153C45B3E9DD6490EDC3EE22,F1CF16215C4D7DB7655A6B8445B3E9DD6490EDC3EE22,F2AB5E6A6FAD4AF5CD8A738345B3E9DD6490EDC3EE22
Request Header
None.
Request Body
None.
HTTP Status Code
HTTP_STATUS = 400
JSON Response
{ "errorCode": "-96", "errorKey": "!csFieldHasTooManyValues,idList", "errorMessage": "Field 'idList' has too many values.", "title": "Field 'idList' has too many values.", "type": "https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html" }
Example 7
The following example returns an error because the folder is not owned by or shared with the user.
GET ../folders/lists?idList=F80D8BB2B2F8B549A9CEC22045B3E9DD6490EDC3EE22
Request Header
None.
Request Body
None.
HTTP Status Code
HTTP_STATUS = 403
JSON Response
{ "errorCode": "-20", "errorKey": "!csCloudItemInsufficientPrivileges,UserAA,fFolderGUID:F80D8BB2B2F8B549A9CEC22045B3E9DD6490EDC3EE22,FLD_INFO_REST_HELPER", "errorMessage": "User 'UserAA' has insufficient privilege to access fFolderGUID:F80D8BB2B2F8B549A9CEC22045B3E9DD6490EDC3EE22 with service FLD_INFO_REST_HELPER.", "errorType": "folder", "idList": "F80D8BB2B2F8B549A9CEC22045B3E9DD6490EDC3EE22", "title": "User 'UserAA' has insufficient privilege to access fFolderGUID:F80D8BB2B2F8B549A9CEC22045B3E9DD6490EDC3EE22 with service FLD_INFO_REST_HELPER.", "type": "https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html" }