Files - Delete Asset

This guide explains how to delete an asset in EnterMediaDB using:

  • JSON REST API
  • EnterMediaDB API UI

Both methods perform the same operation.


1. Overview

The delete asset API allows you to permanently remove an asset from EnterMediaDB.

This process deletes the specified asset using its asset ID.


2. API Endpoint

The API endpoint is the URL used to run this operation via the REST API.

Endpoint:

POST /assets/mediadb/services/module/asset/deleteassets

This endpoint:

  • Processes a delete request
  • Removes the specified asset from EnterMediaDB

3. Required Parameters

The following parameters must be included in the request body:

  • assetid: ID of the asset to rotate

This value specifies which asset should be removed.


4. Delete Asset Using JSON REST API

Step 1: Prepare Your Data

Example:

{
  "assetid": "101",
}

Step 2: Send the Request
curl -H "Content-Type: application/json" \
  -X POST http://entermedia.org/assets/mediadb/services/module/asset/deleteassets \
  -b "entermedia.key=YOUR_SESSION_KEY" \
  -d '{
    "assetid": "101"
  }'
Notes
  • Replace YOUR_SESSION_KEY with your actual entermedia.key
  • Ensure your API session is initialized (see Authentication section)
  • Use -L if your server redirects to HTTPS
  • Deleting an asset cannot be easily undone.

5. Delete Asset Using EnterMediaDB API UI

You can delete an asset directly in the EnterMediaDB interface.

Steps
  1. Open the EnterMediaDB API UI

    Example:
    https://emedialibrary.org/mediadb

  2. In the left sidebar, navigate to:
    FilesDelete Asset

  3. In the request editor, enter:

{
  "assetid": "101",
}

4. Click Execute


6. Response

A successful request returns:

{
  "response": {
    "status": "ok",
    "rowsedited": "1"
  }
}

7. What Happens After Deletion

After a successful request:

  • The specified asset is removed from EnterMediaDB
  • The asset will no longer appear in search results
  • Related asset operations (download, conversion, metadata updates) will no longer be available.

8. Troubleshooting

1. Delete request fails
  • Check that assetid is valid
  • Ensure the asset exists.
  • Verify API permissions are enabled

2. Unauthorized request
  • Ensure entermedia.key is included
  • Ensure session is initialized
  • Verify permissions

3. No visible change
  • Refresh the interface
  • Verify the correct asset ID was used
  • Check whether the asset is catched in the browser or search results