Retrieve Assets

This endpoint enables you to retrieve a single asset.
    http://<publish-url>/public/api/assets/{assetId}
  
Table 1. Parameters
Parameter Parameter Type Data Type Mandatory Description
assetId path long Yes The ID of the Asset to be retrieved.
token query string Yes The account access token of which the asset belongs.

An example of a response for this call is shown below:

{
  "accountId": 0,
  "assetMetadata": {
    "contentMetadata": "string",
    "genericAttachments": [
      {
        "description": "string",
        "fileName": "string",
        "fileSize": 0,
        "fileUrl": {
          "authority": "string",
          "content": {},
          "defaultPort": 0,
          "file": "string",
          "host": "string",
          "path": "string",
          "port": 0,
          "protocol": "string",
          "query": "string",
          "ref": "string",
          "userInfo": "string"
        },
        "lastModified": "2016-11-01T15:29:14.472Z",
        "mimeType": "string",
        "version": 0
      }
    ],
    "imageAttachments": [
      {
        "description": "string",
        "href": {
          "authority": "string",
          "content": {},
          "defaultPort": 0,
          "file": "string",
          "host": "string",
          "path": "string",
          "port": 0,
          "protocol": "string",
          "query": "string",
          "ref": "string",
          "userInfo": "string"
        },
        "id": 0,
        "master": true,
        "mimeType": "string",
        "timecode": "string",
        "title": "string"
      }
    ]
  },
  "assetOrigin": "COPY",
  "description": "string",
  "href": {
    "authority": "string",
    "content": {},
    "defaultPort": 0,
    "file": "string",
    "host": "string",
    "path": "string",
    "port": 0,
    "protocol": "string",
    "query": "string",
    "ref": "string",
    "userInfo": "string"
  },
  "id": 0,
  "lastModified": "2016-11-01T15:29:14.472Z",
  "owner": "string",
  "parentId": 0,
  "players": [
    {
      "embedCode": "string",
      "href": {
        "authority": "string",
        "content": {},
        "defaultPort": 0,
        "file": "string",
        "host": "string",
        "path": "string",
        "port": 0,
        "protocol": "string",
        "query": "string",
        "ref": "string",
        "userInfo": "string"
      },
      "id": 0
    }
  ],
  "publishCount": 0,
  "subAccountId": 0,
  "title": "string",
  "variant": "string"
}       
        

An example of an API call and the response:

    http://10.13.1.85:18106/public/api/assets/13637?token=w8qZG3GJSR
{
  "type": "MediaAsset",
  "id": 13637,
  "title": "Sample3.mp4",
  "lastModified": "28-10-2016 08:15:26",
  "assetOrigin": "INGEST",
  "assetMetadata": {
    "genericAttachments": [],
    "imageAttachments": [],
    "contentMetadata": null
  },
  "players": [
    {
      "id": 13640,
      "embedCode": "<script type=\"text/javascript\" src=\"http://publishcdn.local.nativ.tv:19180/dev/flex-player/scripts/flexplayer-embed.js\"></script><div><img onLoad='embedMioPlayer(this, {src: \"http://localhost:18106//public/api/players/13640/embed?token=w8qZG3GJSR\",width: \"640\",height: \"391\"            });' src=\"http://publishcdn.local.nativ.tv:19180/dev/flex-player/images/pixel.png\"/></div>",
      "href": "http://localhost:18106//public/api/players/13640"
    }
  ],
  "owner": "ROGERIO ROSA",
  "accountId": 10103,
  "publishCount": 1,
  "href": "http://localhost:18106//public/api/assets/13637",
  "transcodes": [],
  "proxies": [],
  "copies": [],
  "assetContext": {
    "formatContext": {
      "format": "MP4",
      "bitRate": 3010057,
      "fileSize": 12109084,
      "duration": 32183000,
      "streamCount": 2,
      "audioStreamCount": 1,
      "videoStreamCount": 1
    },
    "videoStreamContexts": [
      {
        "language": "und",
        "bitRate": 2878349,
        "codec": "H264",
        "frameRate": 25,
        "pixelAspectRatio": 1.0666667,
        "width": 720,
        "height": 576
      }
    ],
    "audioStreamContexts": [
      {
        "language": "und",
        "bitRate": 128000,
        "codec": "AC3",
        "sampleRate": 44100,
        "bitsPerSample": 32,
        "channels": 2
      }
    ]
  },
  "assetType": "MEDIA",
  "media": "http://publishcdn.local.nativ.tv:19180/dev/assets/f2aa6aa2-383a-4d88-b6be-2afde808a0d7.mp4"
}
                

Was this article helpful?