JSON Rest API - Import Local File

Import Local File

Creates an asset on EnterMedia from a local file, Google Drive file or Amazon S3 Drive file






id: Unique string to identify your asset
importpath: Path to the file located on a hot folder or local path
    Use hot folder when you want to use that file as the original asset
    Use a local path when you want EnterMedia to create a copy of that file
keywords: Array of strings to represent the tags of the asset
longcaption: Caption of Asset
sourcepath: (optional) This is to specify the file's final location of the asset, you want to use this only if you want to control folder path inside EnterMedia


Sample Request

 curl -H "Content-Type: application/json" \ -X POST http://entermedia.org/mediadb/services/module/asset/create \ -b 'entermedia.key=adminxxxx' \ -d '{ "importpath": "/media/tempdata/york-360-orig.mp4" "sourcepath":"Clients/TEST11/${filename}", "keywords": [ "animals", "bird" ], "longcaption": "TEST" }' 


A succesful request returns the http 200 and status = "ok"

Sample Response

 { "response": { "status":"ok", "id":"101" } , "data":{ "id": "101" ,"datatype":{ "id":"original", "name": "" } ,"name": "cover2.jpg" ,"folderimportpath": "\/media\/tempdata\/cover2.jpg" ,"sourcepath": "MediaCenter\/cover2.jpg" ,"category-exact":[ { "id":"MediaCenter", "name": "" } ] ,"isfolder": "false" ,"assettype":{ "id":"article", "name": "" } ,"assetviews": "1" ,"creator": "billmoyers1" ,"fileformat":{ "id":"jpg", "name": "JPG" } ,"assetmodificationdate":"1969-12-31T19:00:00" ,"assetaddeddate":"2020-06-08T18:23:04" ,"owner":{ "id":"admin", "name": "The Administrator" } ,"importstatus":{ "id":"needsmetadata", "name": "Pending Metadata" } ,"previewstatus":{ "id":"0", "name": "Unknown" } ,"editstatus":{ "id":"6", "name": "Approved" } ,"longcaption": "TEST" ,"keywords":[ { "id":"animals", "name": "" } ,{ "id":"bird", "name": "" } ] ,"islocked": "false" ,"pushstatus":{ "id":"resend", "name": "Resend" } } }