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
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