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

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

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?