Tuesday, July 12, 2022

Sitecore Content Hub: Delete asset using REST API

 API URL : api/entities/{id}


Description: The delete Rest api can be used with the unique asset ID to delete the file that already exists in the repository.

Parameters

Name

Located in

Description

Required

Schema

Authorization

Headers

Access token which is generated in Oauth api call insert in the header.

Yes

String

id

url

To fetch the asset details using the asset ID.

Yes

sting

  

Responses: 

If the delete is successful, the return status code of 200 with value OK will be returned; if the delete is failed, error messages will be returned.

 

HTTP Status Code

Application Return Code

Description

Value

Schema

200

 

OK

-

String

304

 

Not Modified

-

String

400

 

Bad Request

-

String

403

 

Forbidden

-

String

404

 

Not Found

-

String

500

 

Internal Server Error

 

String

 

Reference Screenshot – API call from postman tool:



No comments:

Post a Comment

How to Create a Public Link Using the Sitecore Content Hub REST API

Creating a public link using the Sitecore Content Hub REST API is a straightforward process that enables you to share content externally whi...