Folders operations

Get a collection of folders

To get all folders, you must execute a GET request to the following endpoint:

{baseurl}/api/default/folders

Sample request

GET http://mysite.com/api/default/folders

Sample response

NOTE: This endpoint serves all folders that are not root level libraries, regardless of whether the folder is nested inside an image album, video library, or a document library.

Get a folder

To get a single folder, you must execute a GET request to the following endpoint:

{baseurl}/api/default/folders({id})

Where id is the ID of the folder that you want to get, for example – 43d06f6a-513f-4014-a707-f2da1b10844f.

Sample request

GET http://mysite.com/api/default/folders(43d06f6a-513f-4014-a707-f2da1b10844f)

Sample response

Create a folder

To create a folder, you must execute a POST request to the following endpoint:

{baseurl}/api/default/folders

The minimal requirements to create a folder are the Title and the RootId. The UrlName is not required by the API. If left unpopulated, it will be generated by the server as a random GUID.

Sample request

POST http://mysite.com/api/default/videolibraries

Sample response

Partially update a folder

Updating a folder can be done in two ways – with a PATCH or with a PUT request. The difference between the two verbs is that PATCH allows for a partial update, whereas PUT requires all fields to be present in the request’s body.

To partially update a folder, you must execute a PATCH request to the following endpoint:

{baseurl}/api/default/folders({id})

Where id is the ID of the folder that you want to get, for example – 43d06f6a-513f-4014-a707-f2da1b10844f.

Sample request

PATCH http://mysite.com/api/default/videolibraries(288eff11-6e67-48ae-aefc-45b1c97e898b)

Sample response

No response body

Fully update a folder

Updating a folder can be done in two ways – with a PATCH or with a PUT request. The difference between the two verbs is that PATCH allows for a partial update, whereas PUT requires all fields to be present in the request’s body.

To partially update a folder, you must execute a PUT request to the following endpoint:

{baseurl}/api/default/folders({id})

Where id is the ID of the folder that you want to get, for example – 43d06f6a-513f-4014-a707-f2da1b10844f.

Sample request

PUT http://mysite.com/api/default/videolibraries(288eff11-6e67-48ae-aefc-45b1c97e898b)

Sample response

No response body

Delete folder

To delete a folder, you must execute a DELETE request to the following endpoint:

{baseurl}/api/default/folders({id})

Where id is the ID of the folder that you want to get, for example – 43d06f6a-513f-4014-a707-f2da1b10844f.

Sample request

DELETE http://mysite.com/api/default/videolibraries(288eff11-6e67-48ae-aefc-45b1c97e898b)

Sample response

No response body

Increase your Sitefinity skills by signing up for our free trainings. Get Sitefinity-certified at Progress Education Community to boost your credentials.

Web Security for Sitefinity Administrators

The free standalone Web Security lesson teaches administrators how to protect your websites and Sitefinity instance from external threats. Learn to configure HTTPS, SSL, allow lists for trusted sites, and cookie security, among others.

Foundations of Sitefinity ASP.NET Core Development

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.

Was this article helpful?