To list third-party files and their containing folders, issue a GET request to the /ccadmin/v1/files endpoint on the administration server. This endpoint has a required query parameter, folder, that you use to specify the folder to return results for. For example:
GET /ccadmin/v1/files?folder=/thirdparty HTTP 1.1
Authorization: Bearer <access_token>You can use the assetType query parameter to specify whether to return a list of the files only (assetType=file), the folders only (assetType=folder), or both (assetType=all). The default is file, so if you omit this query parameter, a list of the files is returned.
The following example shows a sample call to the getFiles endpoint that returns both files and folders:
GET /ccadmin/v1/files?folder=/thirdparty&assetType=all HTTP 1.1
Authorization: Bearer <access_token>The following example shows sample output from this call:
{
"total": 2,
"totalResults": 2,
"offset": 0,
"limit": 250,
"links": [
{
"rel": "self",
"href":
"http://myserver.example.com:7002/ccadmin/v1/files?folder=%2Fthirdparty&assetType=all"
}
],
"sort": [
{
"property": "name",
"order": "asc"
}
],
"items": [
{
"path": "/thirdparty/myfolder",
"repositoryId": "folder10004",
"name": "myfolder",
"url": "http://myserver.example.com:7002/file/thirdparty/myfolder"
},
{
"path": "/thirdparty/myfolder/sampleFile.txt",
"extension": "txt",
"metadata": {},
"size": 916,
"repositoryId": "f10001",
"name": "sampleFile.txt",
"checksum": 6238228597895851000,
"lastModified": "2017-01-04T21:19:14.015Z",
"type": "file",
"url":
"http://myserver.example.com:7002/file/v1857419716804211141/thirdparty/myfolder/sampleFile.txt"
}
]
}The getFiles endpoint can also take a filter query parameter to limit the set of folders and files returned. The value of this parameter is a simple sequence of characters (no wild-card or regular expression elements) that is used to do substring matching on file or folder names. For example, the following call returns a list of the files in the /thirdparty folder whose names include the string “red”:
GET /ccadmin/v1/files?folder=/thirdparty&filter=red HTTP 1.1
Authorization: Bearer <access_token>
