Workflow operations

Overview

OData services are using the standard configuration for workflow.

PREREQUISITES: To make requests for workflow-related actions, you must have configured workflow in Sitefinity CMS.
For more information, see Define workflows.

Lock an item

It is important to lock an item before modifying it, because this way other users can see that this item is being edited by someone else and they will see a message that it is currently not available for modifications on their end.

To lock an item, execute a POST request to the following endpoint:

{baseurl}/api/default/{entity}({itemId}).Default.SaveTemp()

Where:

  • {entity} is the entity of the module that you are working with.
  • {itemId} is the ID of the item.

Sample request

POST http://mysite.com/api/default/newsitems(3b177186-8b09-497c-8def-58613183d670). Default.SaveTemp()

When you send an empty model, if the item is not already locked, it is locked.

Sample response

No response body

Unlock an item

After you have finished editing an item, you must unlock it.

To do this, execute a POST request to the following endpoint

{baseurl}/api/default/{entity}({itemId})/operation

Where:

  • {entity} is the entity of the module that you are working with.
  • {itemId} is the ID of the item.

Sample request

POST http://mysite.com/api/default/newsitems(3b177186-8b09-497c-8def-58613183d670)/operation

Sample response

No response body

Send an item for approval

To do this, execute a POST request to the following endpoint:

{baseurl}/api/default/{entity}({itemId})/operation

Where:

  • {entity} is the entity of the module that you are working with.
  • {itemId} is the ID of the item.

Sample request

POST http://mysite.com/api/default/newsitems(3b177186-8b09-497c-8def-58613183d670)/operation

Sample response

Send an item for publishing

To do this, execute a POST request to the following endpoint:

{baseurl}/api/default/{entity}({itemId})/operation

Where:

  • {entity} is the entity of the module that you are working with.
  • {itemId} is the ID of the item.

Sample request

POST http://mysite.com/api/default/newsitems(3b177186-8b09-497c-8def-58613183d670)/operation

Sample response

Reject an item

To do this, execute a POST request to the following endpoint:

{baseurl}/api/default/{entity}({itemId})/operation

Where:

  • {entity} is the entity of the module that you are working with.
  • {itemId} is the ID of the item.

Sample request

POST http://mysite.com/api/default/newsitems(3b177186-8b09-497c-8def-58613183d670)/operation

Sample response

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?