JSON rest api - Distribution Link

Create Distribution

Creates a Distribution Link for AssetID

Request (POST)

/assets/mediadb/services/distribution/create/create

Paramaters

Must include either file or importpath

assetid: (required)the asset's ID id: (optional)Distribution ID (used in the URL)

Sample request

{
    "assetid": "101",
    "id": "93caa502-139a-40c3-accb-5891076bb04a"
}'

Response

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

Sample Response

{
    "response": {
      "id": "93caa502-139a-40c3-accb-5891076bb04a",
      "status": "ok"
    },
    "data": {
      "id": "93caa502-139a-40c3-accb-5891076bb04a",
      "assetid": {
        "id": "101",
        "name": ""
      }
    },
    "urls": {
      "baseurl": "http://em10.entermediadb.net/assets/mediadb/services/distribution/published/93caa502-139a-40c3-accb-5891076bb04a/",
      "largeimage": "http://em10.entermediadb.net/assets/mediadb/services/distribution/published/93caa502-139a-40c3-accb-5891076bb04a/largeimage"
    }
  }
'

 

Search Distribution List

Search for Distribution matching query

Request (POST)

/assets/mediadb/services/distribution/search/search

Paramaters

Must include either file or importpath

value: (required)Query

Sample request

{
    "page": "1",
    "hitsperpage": "20",
    "query": {
      "terms": [
        {
          "field": "id",
          "operator": "matches",
          "value": "*"
        }
      ]
    }
  }'

Response

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

Sample Response


{
    "response": {
      "status": "ok",
      "totalhits": 1,
      "searchtype": "distribution",
      "hitsperpage": 20,
      "page": 1,
      "pages": 1,
      "hitsessionid": "hitsdistributionassets/catalog",
      "query": {
        "friendly": "GUID:*",
        "search": "id:(*)"
      }
    },
    "results": [
      {
        "id": "93caa502-139a-40c3-accb-5891076bb04a",
        "assetid": {
          "id": "101",
          "name": ""
        }
      }
    ]
}
'

 

Delete Distribution

Deletes a Distribution Link

Request (DELETE)

/assets/mediadb/services/distribution/delete/101

Paramaters

Must include either file or importpath

assitid: (required) Asset's Id

Sample request

/assets/mediadb/services/distribution/delete/93caa502-139a-40c3-accb-5891076bb04a

Response

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

Sample Response


{
    "response": {
      "status": "ok"
    }
}
'

 

Edit Distribution

Edit a Distribution Link

Request (POST)

/assets/mediadb/services/distribution/edit/edit

Paramaters

Must include either file or importpath

assitid: (required) Asset's Id

Sample request

{
    "id": "93caa502-139a-40c3-accb-5891076bb04a",
    "assetid": "102"
}'

Response

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

Sample Response

{
    "response": {
      "status": "ok",
      "id": "93caa502-139a-40c3-accb-5891076bb04a"
    },
    "data": {
      "id": "93caa502-139a-40c3-accb-5891076bb04a",
      "assetid": {
        "id": "102",
        "name": ""
      }
    }
  }
'