XML - Rest API

REST API Overview

The REST API is the original EnterMedia API. The list of available calls is vast and inclusive. It can be used to build custom front ends and other applications on top the DAM. Please note that we have since updated to a more inclusive JSON API that is recommended..

Rest API Examples

List Catalogs

https://em10.entermediadb.org/media/services/rest/listcatalogs.xml

List  Attachments

https://em10.entermediadb.org/media/services/rest/attachments/listattachments.xml?catalogid=media/catalogs/public&parentsourcepath=By%20Type/photos/Orangestreetroof.jpg

Show List Values

https://em10.entermediadb.org/media/services/rest/search.xml?catalogid=media/catalogs/public&searchtype=fileformat&hitsperpage=100

Search for Assets

https://em10.entermediadb.org/media/services/rest/assetsearch.xml?catalogid=media/catalogs/public&field=description&operation=matches&description.value=*

Set Thumbnail of Asset

https://em10.entermediadb.org/media/services/rest/setthumbnail.xml?catalogid=media/catalogs/public&assetid=121&filename=test.png

View Asset Details

https://em10.entermediadb.org/media/services/rest/assetdetails.xml?catalogid=media/catalogs/public&id=116

Get Asset Versions

https://em10.entermediadb.org/media/services/rest/repository/getversions.xml?editPath=/WEB-INF/data/media/catalogs/public/originals/users/admin/2013/11/flower.jpg/flower.jpg

Get All Asset Versions

https://em10.entermediadb.org/media/services/rest/asset/getversions.xml?catalogid=media/catalogs/public&id=131

Restore Asset Version

https://em10.entermediadb.org/media/services/rest/repository/restoreversion.xml?editPath=/WEB-INF/data/media/catalogs/public/originals/users/admin/2013/11/test.jpg/test.jpg&assetid=10101&filename=test.jpg&version=1

Trigger Asset Preset Conversion

demo.entermediasoftware.com/media/services/rest/conversions/convertasset.xml?catalogid=media/catalogs/public&assetid=128&presetid=imagepreviewfpo

*Refer to convertpreset table for presetids (Settings > Data Manager > Choose Table: "convertpreset") Upload Asset Test Form You need to log into the https://em10.entermediadb.org/media/ before running this form:

 
catalogid
sourcepath
file
 

 

User API

  List Groups

https://em10.entermediadb.org/media/services/rest/search.xml?catalogid=system&searchtype=group&field=id&id.value=

Add Group

https://em10.entermediadb.org/media/services/rest/savedata.xml?catalogid=system&searchtype=group&field=name&name.value=TestGroup

Edit Group

https://em10.entermediadb.org/media/services/rest/savedata.xml?catalogid=system&searchtype=group&id=TestGroup&field=enabled&enabled.value=true

Search/List Users

https://em10.entermediadb.org/media/services/rest/users/users.xml?&field=id&id.value=

Add User

https://em10.entermediadb.org/media/services/rest/savedata.xml?catalogid=system&searchtype=user&field=email&email.value=test&field=id&id.value=10101&field=password&password.value=testing&field=groups&groups.value=TestGroup

Authenticate User

https://em10.entermediadb.org/media/services/rest/users/authenticate.xml?id=10101&password=testing

Edit User

https://em10.entermediadb.org/media/services/rest/savedata.xml?catalogid=system&searchtype=user&&id=10101&field=email&email.value=different

Delete User

https://em10.entermediadb.org/media/services/rest/deletedata.xml?catalogid=system&searchtype=user&id=10101

Delete Group

https://em10.entermediadb.org/media/services/rest/deletedata.xml?catalogid=system&searchtype=group&id=TestGroup

Change Settings Settings | Views | System | REST API Asset Details  

Note: 
For users that are not an Adminstrator, you need to validate the user to make REST API calls.

To do this you first need to get the key of the user, and then you need to pass it into the rest call as a parameter or in a cookie. The key is constant for the user, so you only need to get it once.

To get the user key:
demo.entermediasoftware.com/media/services/rest/login.xml?accountname=testuser&password=testpassword

Then, you can pass in the key to a rest call (specifying entermedia.key):
https://em10.entermediadb.org/media/services/rest/assetsearch.xml?entermedia.key=chrisrose708md5420b531795a0990917b700cb4d0b0b92408c0c50b2&catalogid=media/catalogs/public&field=description&operation=matches&description.value=*

Other API's There is a Java file that You can download a full test of uploading and other API Download API Includes examples for: assetdetails assetsearch createcatalog deleteassets downloadfiles getpage importassets listcatalogs listcategories listdatachanges login removeassetimages saveassetdetails savedata search setthumbnail uploadattachment upload