List contents of a Content Library Folder
get
/rest/api/v1.3/clFolders/{folderPath}
Request
Supported Media Types
- application/x-www-form-urlencoded
Path Parameters
-
folderPath: string
The complete path of the folder starting with /contentlibrary.
Query Parameters
-
type: string
Specify what content of a folder needs to be listed. Allowed values are 'all', 'folders', 'docs' or 'items'. Defaults to 'all'
Response
Default Response
Root Schema : List Content Library Folders Response
Type:
object
Title:
Show Source
List Content Library Folders Response
-
documents(optional):
array documents
Content Library Documents within the Content Library Folder
-
folders(optional):
array folders
Folders within the Content Library Folder
-
items(optional):
array items
Media files within the Content Library Folder
Nested Schema : documents
Type:
array
Content Library Documents within the Content Library Folder
Show Source
Nested Schema : items
Type:
Show Source
object
-
content(optional):
string
Document content
-
documentPath(optional):
string
Full path of the Content Library Document
Nested Schema : items
Type:
Show Source
object
-
folderPath(optional):
string
Full path of the Content Library folder
Nested Schema : items
Type:
Show Source
object
-
itemData(optional):
string(byte)
Base64 encoded binary string of the media file content.
-
itemPath(optional):
string
Full path of the Content Library media file
Examples
This interface is used to list the contents of a content library folder. To get the objects at the root level (that is, for the entire account), replace the folderPath parameter with the value "contentlibrary".
A successful request requires the following headers:
FIELDS | DESCRIPTION |
---|---|
Authorization | <AUTH_TOKEN> |
FIELDS | DESCRIPTION |
---|---|
type | Determines what content of a folder needs to be listed. Allowed values are "all", "folders", "docs" or "items". Value defaults to "all", so all contents of a folder need to be listed. |
Sample Request URL:
/rest/api/v1.3/clFolders/contentlibrary/f1
Sample Response:Success
{ "folders": [ { "folderPath": "/contentlibrary/f1/sublevel-1", "links": [ { "rel": "listContentLibraryFolders", "href": "/rest/api/v1.3/clFolders/contentlibrary/f1/sublevel-1", "method": "GET" }, { "rel": "deleteContentLibraryFolder", "href": "/rest/api/v1.3/clFolders/contentlibrary/f1/sublevel-1", "method": "DELETE" }, { "rel": "createContentLibraryFolder", "href": "/rest/api/v1.3/clFolders", "method": "POST" } ] }wsrest_clwsrest_clwsrest_clwsrest_clwsrest_clwsrest_cl ], "documents": [ { "documentPath": "/contentlibrary/f1/doc2.htm", "content": null, "links": [ { "rel": "deleteDocument", "href": "/rest/api/v1.3/clDocs/contentlibrary/f1/doc2.htm", "method": "DELETE" }, { "rel": "createDocument", "href": "/rest/api/v1.3/clDocs", "method": "POST" }, { "rel": "setDocumentContent", "href": "/rest/api/v1.3/clDocs/contentlibrary/f1/doc2.htm", "method": "POST" }, { "rel": "getDocumentContent", "href": "/rest/api/v1.3/clDocs/contentlibrary/f1/doc2.htm", "method": "GET" } ] }wsrest_clwsrest_clwsrest_clwsrest_clwsrest_clwsrest_clwsrest_clwsrest_cl ], "items": [ { "itemPath": "/contentlibrary/f1/testcreate2050.png", "itemData": null, "links": [ { "rel": "getContentLibraryItem", "href": "/rest/api/v1.3/clItems/contentlibrary/f1/testcreate2050.png", "method": "GET" }, { "rel": "setContentLibraryItem", "href": "/rest/api/v1.3/clItems/contentlibrary/f1/testcreate2050.png", "method": "POST" }, { "rel": "deleteContentLibraryItem", "href": "/rest/api/v1.3/clItems/contentlibrary/f1/testcreate2050.png", "method": "DELETE" }, { "rel": "createContentLibraryItem", "href": "/rest/api/v1.3/clItems", "method": "POST" } ] } ], "links": [ { "rel": "self", "href": "/rest/api/v1.3/clFolders/contentlibrary/f1", "method": "GET" }, { "rel": "deleteContentLibraryFolder", "href": "/rest/api/v1.3/clFolders/contentlibrary/f1", "method": "DELETE" } ] }
Sample Response:Failure
{ "type": "", "title": "Invalid request parameters", "errorCode": "INVALID_PARAMETER", "detail": "Type should be either folders, items or docs", "errorDetails": [] }