Long running operations

Overview

Long running tasks are also called background tasks or, by their .NET implementation on the server, Scheduled tasks. Their logic runs on a separate thread, or threads, on the server and it usually take a long time to execute. One example of a long-running background task is the regeneration of an image library’s thumbnails.

Regenerate thumbnails

This operation applies to albums only. It triggering the regenerate thumbnails scheduled task.

To regenerate the thumbnails of albums, execute a GET request to the following endpoint:

{baseurl}/api/default/Default.ManageBackgroundTasks

Sample request

GET http://mysite.com/api/default/Default.ManageBackgroundTasks

Sample response

Change parent library

This operation applies to images, videos, and documents.

The operation of moving items to another library applies to libraries, folders, and media items. This way, you can move folders and media items with one request. This triggers a background task.

NOTE: You cannot move a library to the root. You can only move a library to an already existing root library or child folder. If a root library is moved into another root library the first root library will be converted into a folder and will inherit all properties, such a maximum library size from its new parent library.

To change the parent of a library, execute a POST request to the following endpoint:

{baseUrl}/api/default/{entity}/Default.Move()

Where{entity} is the entity of the module that you are working with. It is one of albums, videolibraries, or documentlibraries.

Sample request

POST http://mysite.com/api/default/images/Default.Move()

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.

Get started with Integration Hub | Sitefinity Cloud | Sitefinity SaaS

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.

Web Security for Sitefinity Administrators

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.

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?