List contents of a content library folder
Use this interface to list the contents of a content library folder.
Service URL:
/rest/api/v1.3/clFolders/{folderPath}?type=<objecttype>
Required Path Parameter:
-
folderPath - specify the path to the folder.
To get the objects at the root level (that is, for the entire account), replace the folderPath parameter with the value contentlibrary.
Request Method:
GET
Request Header:
Authorization=<AUTH_TOKEN>
Request Parameters:
- 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.
Request Body:
None
Sample Response in case of success:
For the requested folder at /contentlibrary/jmptest, where the type was either ‘all’ or not specified, the following response was returned. The response lists the paths for all of the folders, documents, and images contained in the requested folder, and it returns links for the APIs applicable for each object.
{
"folders": [
{
"folderPath": "/contentlibrary/jmptest/images",
"links": [
{
"rel": "createContentLibraryFolder",
"href": "/rest/api/v1.1/clFolders",
"method": "POST"
},
{
"rel": "deleteContentLibraryFolder",
"href": "/rest/api/v1.1/clFolders/contentlibrary/jmptest/images",
"method": "DELETE"
},
{
"rel": "listContentLibraryFolders",
"href": "/rest/api/v1.1/clFolders/contentlibrary/jmptest/images",
"method": "GET"
}
]
},
{
"folderPath": "/contentlibrary/jmptest/testdocs",
"links": [
{
"rel": "createContentLibraryFolder",
"href": "/rest/api/v1.1/clFolders",
"method": "POST"
},
{
"rel": "deleteContentLibraryFolder",
"href": "/rest/api/v1.1/clFolders/contentlibrary/jmptest/testdocs",
"method": "DELETE"
},
{
"rel": "listContentLibraryFolders",
"href": "/rest/api/v1.1/clFolders/contentlibrary/jmptest/testdocs",
"method": "GET"
}
]
}
],
"documents": [
{
"documentPath": "/contentlibrary/jmptest/newsletter.htm",
"content": null,
"links": [
{
"rel": "createDocument",
"href": "/rest/api/v1.1/clDocs",
"method": "POST"
},
{
"rel": "getDocumentContent",
"href": "/rest/api/v1.1/clDocs/contentlibrary/jmptest/newsletter.htm",
"method": "GET"
},
{
"rel": "deleteDocument",
"href": "/rest/api/v1.1/clDocs/contentlibrary/jmptest/newsletter.htm",
"method": "DELETE"
},
{
"rel": "setDocumentContent",
"href": "/rest/api/v1.1/clDocs/contentlibrary/jmptest/newsletter.htm",
"method": "POST"
}
]
},
{
"documentPath": "/contentlibrary/jmptest/testwithimage.htm",
"content": null,
"links": [
{
"rel": "createDocument",
"href": "/rest/api/v1.1/clDocs",
"method": "POST"
},
{
"rel": "getDocumentContent",
"href": "/rest/api/v1.1/clDocs/contentlibrary/jmptest/testwithimage.htm",
"method": "GET"
},
{
"rel": "deleteDocument",
"href": "/rest/api/v1.1/clDocs/contentlibrary/jmptest/testwithimage.htm",
"method": "DELETE"
},
{
"rel": "setDocumentContent",
"href": "/rest/api/v1.1/clDocs/contentlibrary/jmptest/testwithimage.htm",
"method": "POST"
}
]
}
],
"items": [
{
"itemPath": "/contentlibrary/jmptest/dinosmall.jpg",
"itemData": null,
"links": [
{
"rel": "getContentLibraryItem",
"href": "/rest/api/v1.1/clItems/contentlibrary/jmptest/dinosmall.jpg",
"method": "GET"
},
{
"rel": "setContentLibraryItem",
"href": "/rest/api/v1.1/clItems/contentlibrary/jmptest/dinosmall.jpg",
"method": "POST"
},
{
"rel": "createContentLibraryItem",
"href": "/rest/api/v1.1/clItems",
"method": "POST"
},
{
"rel": "deleteContentLibraryItem",
"href": "/rest/api/v1.1/clItems/contentlibrary/jmptest/dinosmall.jpg",
"method": "DELETE"
}
]
}
],
"links": [
{
"rel": "self",
"href": "/rest/api/v1.1/clFolders/contentlibrary/jmptest",
"method": "GET"
},
{
"rel": "deleteContentLibraryFolder",
"href": "/rest/api/v1.1/clFolders/contentlibrary/jmptest",
"method": "DELETE"
}
]
}
Sample Response in case of failure:
{
"type": "",
"title": "Invalid request parameters",
"errorCode": "INVALID_PARAMETER",
"detail": "Type should be either folders, items or docs",
"errorDetails": []
}