Files - Get Asset Details

This guide explains how to retrieve asset details in EnterMediaDB using:

  • JSON REST API
  • EnterMediaDB API UI

Both methods perform the same operation.


1. Overview

The Get Asset Details API allows you to retrieve detailed information about a specific asset.

This process returns metadata, status information, ownership details, and file preview/download links for the selected asset.


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

This endpoint:

  • Processes a request for asset information
  • Returns metadata and preview/download URLs for the specified asset

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 details should be returned.


4. Get Asset Details 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/assetdetails \
  -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

5. Get Asset Details Using EnterMediaDB API UI

You can rotate 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:
    FilesGet Asset Details

  3. In the request editor, enter:

{
  "assetid": "101"
}

4. Click Execute


6. Response

A successful request returns:

{
  "response": {
    "status": "ok",
    "id": "101"
  },
  "data": {
    "name": "sample.jpg",
    "assettitle": "image1024x768-100mp",
    "importstatus": {
      "id": "complete",
      "name": "Complete"
    },
    "editstatus": {
      "id": "1",
      "name": "Pending"
    },
    "owner": {
      "id": "admin",
      "name": "The Administrator"
    }
  },
  "thumb": "http://entermediadb.org/assets/catalog/downloads/preview/thumb/2020/06/d7/aa27c4894/thumb.jpg",
  "preview": "http://entermediadb.org/assets/catalog/downloads/preview/large/2020/06/d7/aa27c4894/image.jpg",
  "original": "http://entermediadb.org/assets/mediadb/services/module/asset/downloads/originals/2020/06/d7/aa27c4894/sample.jpg"
}

7. Accessing Asset Files

The response includes direct URLs for:

  • Thumbnail preview (thumb)
  • Large preview (preview)
  • Original file (original)

These URLs can be used to:

  • Display previews in applications
  • Download the original file
  • Integrate asset previews into workflows

8. Troubleshooting

1. 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. Preview or original URL does not work
  • Verify the asset still exists
  • Check file permissions
  • Ensure the asset was fully processed and imported