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
http://demo.entermediasoftware.com/media/services/rest/listcatalogs.xml
List  Attachments
http://demo.entermediasoftware.com/media/services/rest/attachments/listattachments.xml?catalogid=media/catalogs/public&parentsourcepath=By%20Type/photos/Orangestreetroof.jpg
Show List Values
http://demo.entermediasoftware.com/media/services/rest/search.xml?catalogid=media/catalogs/public&searchtype=fileformat&hitsperpage=100
Search for Assets
http://demo.entermediasoftware.com/media/services/rest/assetsearch.xml?catalogid=media/catalogs/public&field=description&operation=matches&description.value=*
Set Thumbnail of Asset
http://demo.entermediasoftware.com/media/services/rest/setthumbnail.xml?catalogid=media/catalogs/public&assetid=121&filename=test.png
View Asset Details
http://demo.entermediasoftware.com/media/services/rest/assetdetails.xml?catalogid=media/catalogs/public&id=116
Get Asset Versions
http://demo.entermediasoftware.com/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
http://demo.entermediasoftware.com/media/services/rest/asset/getversions.xml?catalogid=media/catalogs/public&id=131
Restore Asset Version
http://demo.entermediasoftware.com/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 http://demo.entermediasoftware.com/media/ before running this form:
<form action="http://demo.entermediasoftware.com/media/services/rest/upload.xml" enctype="multipart/form-data" method="post"> catalogid <input name="catalogid" type="text" value="media/catalogs/public" /><br /> sourcepath <input name="sourcepath" type="text" value="users/admin/" /><br /> file <input name="file" type="file" /><br /> <input type="submit" /> </form> 
 

User API

  List Groups
http://demo.entermediasoftware.com/media/services/rest/search.xml?catalogid=system&searchtype=group&field=id&id.value=
Add Group
http://demo.entermediasoftware.com/media/services/rest/savedata.xml?catalogid=system&searchtype=group&field=name&name.value=TestGroup
Edit Group
http://demo.entermediasoftware.com/media/services/rest/savedata.xml?catalogid=system&searchtype=group&id=TestGroup&field=enabled&enabled.value=true
Search/List Users
http://demo.entermediasoftware.com/media/services/rest/users/users.xml?&field=id&id.value=
Add User
http://demo.entermediasoftware.com/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
http://demo.entermediasoftware.com/media/services/rest/users/authenticate.xml?id=10101&password=testing
Edit User
http://demo.entermediasoftware.com/media/services/rest/savedata.xml?catalogid=system&searchtype=user&&id=10101&field=email&email.value=different
Delete User
http://demo.entermediasoftware.com/media/services/rest/deletedata.xml?catalogid=system&searchtype=user&id=10101
Delete Group
http://demo.entermediasoftware.com/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): http://demo.entermediasoftware.com/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