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

Want to learn more?

Sign up for our free beginner training. Boost your credentials through advanced courses and certification.
Register for Sitefinity training and certification.

Was this article helpful?