Item CRUD operations

Create an item

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

{baseurl}/api/default/{entity}

Where {entity} is the entity of the module that you are working with.

You must specify all the properties of the item in JSON format inside the request body.

Sample request

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

Sample response

Create a draft item

To create a new item in draft state, you must execute a POST request to the following endpoint:

{baseurl}/sf/system/{entity}

Where {entity} is the entity of the module that you are working with.

You must specify all the properties of the item in JSON format inside the request body.

Sample request

POST http://mysite.com/sf/system/newsitems

Sample response

Get a collection of items

To get all items from a specific module, you must execute a GET request to the following endpoint:

{baseurl}/api/default/{entity}

Where {entity} is the entity of the module that you are working with.

Sample request

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

Sample response

Get an item

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

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

Where:

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

Sample request

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

Sample response

Update an item

To update an item, you must execute a PATCH request to the following endpoint:

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

Where:

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

You must specify all the properties that you want to update in JSON format inside the request body.

Sample request

PATCH http://mysite.com/api/default/newsitems(f1aef86e-c13f-459b-a318-23bf8c507fe9)

Sample response

No response body

Delete an item

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

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

Where:

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

Sample request

DELETE http://mysite.com/api/default/newsitems(f1aef86e-c13f-459b-a318-23bf8c507fe9)

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?