This endpoint is one of Sitefinity’s OData web services custom methods. Custom methods are denoted by the Default.{MethodName} convention.
Default.{MethodName}
Custom methods are one of the following:
FoldersRecursiveSearch
The FoldersRecursiveSearch method can be executed for the following entity sets:
albums
videolibraries
documentlibraries
To run a recursive folder search, execute a GET request to the following endpoint:
GET
{baseUrl}/api/default/{entity}/Default.FoldersRecursiveSearch(parentId={itemId}
Where:
{entity}
{itemId}
null
The method has an optional query string parameter ?recursive=true. If you omit it, it defaults to false.
?recursive=true
false
recursive=false
This method returns a DTO with the following properties:
Breadcrumb: Array
ChildrenCount: Number
Description: String
FoldersCount: Number
Id: GUID
LastUploaded: Date
LastUploadedBy: Sting
MaxLibrarySizeInKb: Number
ParentId: GUID?
PreviewItems: Array
RootId: GUID?
RunningTask: GUID?
Storage: String
Title: String
TotalLibrarySizeInKb: Number
EXAMPLE: The following examples use the structure of Sitefinity CMS Document libray. There are two root libraries – Presentations and Samples. The Samples library has one child folder – Large documents. If the FoldersRecursiveSearch method is called recursively, without specifying a parent, it will return all of these items.
Sample request
GET http://mysite.com/api/default/documentlibraries/Default.FoldersRecursiveSearch(parentId=null)?recursive=true
Sample response
Alternatively, if the method is called without the ?recursive query parameter, it defaults to ?recursive=false. The result will not include the child folder Large documents.
?recursive
?recursive=false
GET http://mysite.com/api/default/documentlibraries/Default.FoldersRecursiveSearch(parentId=null)
When you call the FoldersRecursiveSearch method with a populated parentId parameter, the method returns the folders only of the targeted library. This example uses the ID of the Samples library from the previous example – 13f352fe-5bcc-4374-a234-0376f68bebc0.
parentId
13f352fe-5bcc-4374-a234-0376f68bebc0
GET http://mysite.com/api/default/documentlibraries/Default.FoldersRecursiveSearch(parentId=13f352fe-5bcc-4374-a234-0376f68bebc0)
Increase your Sitefinity skills by signing up for our free trainings. Get Sitefinity-certified at Progress Education Community to boost your credentials.
This free lesson teaches administrators, marketers, and other business professionals how to use the Integration hub service to create automated workflows between Sitefinity and other business systems.
This free lesson teaches administrators the basics about protecting yor Sitefinity instance and its sites from external threats. Configure HTTPS, SSL, allow lists for trusted sites, and cookie security, among others.
The free on-demand video course teaches developers how to use Sitefinity .NET Core and leverage its decoupled architecture and new way of coding against the platform.
To submit feedback, please update your cookie settings and allow the usage of Functional cookies.
Your feedback about this content is important