JSON Rest API - Upload URL

Upload Url

Uploads an asset through the api

Request (POST)

Paramaters

sourcepath: Destination path on entermedia server to be saved

Sample request

create file with json: 
cat source.json
{
    "sourcepath":"Clients/TK2/TK2024342/2020-6/"
}

curl -H "Content-Type: multipart/form-data" \
    --request POST http://entermediadb.org/assets/mediadb/services/module/asset/create \
    -b 'entermedia.keyassets=adminmdxxxx; JSESSIONID=xxx' \
    --form "json=<source.json;type=application/json" \ 
    --form "file=sample.jpg;type=multipart/form-data"

Response

A successful request returns http 200 and status = "ok"

Sample Response

{
  "response": {
    "status": "ok",
    "id": "AXLIZAeT6Khr_XFrhdhk"
  },
  "data": {
    "datatype": {
      "id": "original",
      "name": ""
    },
    "id": "AXLIZAeT6Khr_XFrhdhk",
    "name": "source.gif",
    "sourcepath": "Clients/TK2/TK2024342/2020-6",
    "foldersourcepath": "Clients/TK2/TK2024342",
    "category-exact": [
      {
        "id": "2020-6",
        "name": ""
      }
    ],
    "isfolder": "true",
    "category": [
      {
        "id": "AXLIZAdi6Khr_XFrhdhj",
        "name": "2020-6"
      },
      {
        "id": "index",
        "name": "Index"
      },
      {
        "id": "AXLIZAdK6Khr_XFrhdhi",
        "name": "TK2024342"
      },
      {
        "id": "AXLIZAcf6Khr_XFrhdhg",
        "name": "Clients"
      },
      {
        "id": "AXLIZAc26Khr_XFrhdhh",
        "name": "TK2"
      }
    ],
    "assettype": {
      "id": "photo",
      "name": "Photos"
    },
    "hasfulltext": "false",
    "pages": "1",
    "assetviews": "1",
    "assetvotes": "0",
    "colorprofiledescription": "Artifex Software sRGB ICC Profile",
    "length": "1.0",
    "duration": "1.2",
    "bitspersample": "8",
    "fileformat": {
      "id": "gif",
      "name": "GIF"
    },
    "detectedfileformat": "gif",
    "filesize": "348669",
    "width": "640",
    "height": "272",
    "assetmodificationdate": "2020-06-18T14:10:25",
    "assetaddeddate": "2020-06-18T13:04:58",
    "owner": {
      "id": "admin",
      "name": "The Administrator"
    },
    "primaryfile": "source.gif",
    "importstatus": {
      "id": "needsmetadata",
      "name": "Pending Metadata"
    },
    "previewstatus": {
      "id": "0",
      "name": "Unknown"
    },
    "editstatus": {
      "id": "1",
      "name": "Pending"
    },
    "publisheds3": "false",
    "md5hex": "2c188c23e602ded4885c4c33b67daa42",
    "duplicate": "false",
    "duplicatesourcepath": "false",
    "badge": [
      {
        "id": "asset_duplicatesourcepath_false",
        "name": ""
      },
      {
        "id": "asset_assetexpired_false",
        "name": ""
      },
      {
        "id": "asset_editstatus_1",
        "name": "Pending"
      },
      {
        "id": "asset_haschat_false",
        "name": ""
      },
      {
        "id": "asset_deleted_false",
        "name": ""
      },
      {
        "id": "asset_emiderror_false",
        "name": ""
      },
      {
        "id": "asset_duplicate_false",
        "name": ""
      },
      {
        "id": "asset_emidwritten_false",
        "name": ""
      },
      {
        "id": "asset_islocked_false",
        "name": ""
      }
    ],
    "assetexpired": "false",
    "haschat": "false",
    "islocked": "false",
    "deleted": "false",
    "emidwritten": "false",
    "emiderror": "false",
    "xmperror": "false",
    "missinggenerated": "false",
    "emrecordstatus": "{recorddeleted=false, mastereditclusterid=test-cluster, lastmodifiedclusterid=test-cluster, recordmodificationdate=Thu Jun 18 14:10:25 EDT 2020, masterrecordmodificationdate=Thu Jun 18 14:10:25 EDT 2020}",
    "googletagged": "false",
    "googletranscoded": "false",
    "pushstatus": {
      "id": "resend",
      "name": "Resend"
    },
    "existsonpush": "false",
    "fromviz": "false"
  }
}