List Assets

The list Assets API retrieves the Assets that match the criteria on the API that belong to the Account of the given token.

    http://<publish-url>/public/api/assets
Table 1. Parameters
Parameter Parameter Type Data Type Mandatory Description
offset query integer No Offset count indicating the position from which to return results
limit query integer No The number of results to return.
token query string Yes Shared token used for authentication purposes.
parentId query long No Search by assets with parent id.
title query string No Substring matching filter on asset title.
description query string No Substring matching filter on asset description.
referenceName query string No Case sensitive matching filter on asset reference name
assetOrigin query enum No The assetOrigin is equivalent to creation_context in the legacy API. The following options are supported: COPY, IMPORT, INGEST, NEW, PROXY, TRANSCODE, TRANSFORM, CLIP, RENDER_CLIP, RENDER_SEQUENCE.
assetType query string No The assetType is equivalent to asset_type in the legacy API. The following options are supported: GROUP, MEDIA, IMAGE, TEXT.
width query string No Single number or closed/open range separated by ':' e.g. '100' or '100:200' or '100:100'. Please note that the 5.3.0 API behaves slightly differently to the 5.1 series playout api. Please read the note below this table. User for media asset (video stream) or image asset.
height query string No Single number or closed/open range separated by ':' e.g. '100' or '100:200' or '100:100'. Please note that the 5.3.0 API behaves slightly differently to the 5.1 series playout api. Please read the note below this table. User for media asset (video stream) or image asset.
audioStreamCount query string No Single number or closed/open range separated by ':' e.g. '100' or '100:200' or '100:100'. Please note that the 5.3.0 API behaves slightly differently to the 5.1 series playout api. Please read the note below this table. User for media asset (video stream) or image asset.
videoStreamCount query string No Single number or closed/open range separated by ':' e.g. '100' or '100:200' or '100:100'. Please note that the 5.3.0 API behaves slightly differently to the 5.1 series playout api. Please read the note below this table. User for media asset (video stream) or image asset.
durationInSeconds query string No Single number or closed/open range separated by ':' e.g. '100' or '100:200' or '100:100'. Please note that the 5.3.0 API behaves slightly differently to the 5.1 series playout api. Please read the note below this table. User for media asset (video stream) or image asset.
language query string No Case insensitive match, user for media asset (audio or video stream)
format query string No The list of possible image and media asset formats. The list of available formats is shown in the formats table below.
audioCodec query string No Equivalent to audio_codec in Playout API. Match on audio codec. The list of possible codecs is shown in the codecs formats table.
videoCodec query string No Equivalent to video_codec in Playout API. Match on video codec. The list of possible codecs is shown in the codecs formats table.
frameRate query string No Single number or closed/open range separated by ':' e.g. '1.5' or '1.5:2.5' or '1.0:1.0'. Note, the new API behaves slightly different than the legacy playout api, please for details read the note below to this table.
modified query string No Filter on last modification date of an asset. Single date or closed/open range of dates separated by ‘-‘. Supported date formats: dd MMM yyyy hh:mm:ss dd MMM yyyy Note, the new API behaves slightly different than the legacy playout api, please for details read the note below to this table.
accountId query long No The account where the assets belong.
playerId query long No Search assets with the player id.
imageFileId query long No Search assets with the image file id.

Note: The 5.3 series API behaves a slightly differently to that of the 5.1 series. Example: In the 5.1 series Publish API, if you were to specify '100' , it would be equal to exactly 100. In the 5.3 series API, if you specify '100', it means that it is at least 100. To define exactly 100 in 5.3, you need to enter '100:100'.

Table 2. Supported Formats
Format  
AIFF Audio Interchange File Format
ASF Advanced Systems Format
ASX Advanced Systems Format XML Metafile
AU Sun Audio Format
AVI Audio Video Interleave
CAF Apple Core Audio Format
DV Raw DV Stream
F4V Flash MP4 File Format
FLV Flash Video Format
GXF General eXchange Format
MATROSKA Matroska Multimedia Container
MOV Quicktime File Format
MP4 MP4 File Formats
MPEG1SS MPEG-1 System Stream
MPEG2PS MPEG-2 Program Stream
MPEG2TS MPEG-2 Transport Stream
MXF Material eXchange Format
OGG Xiph.Org Foundation Ogg Format
RAW Raw Video or Audio
RF64 RF64 European Broadcasting Union BWF Format
RM Real Media Format
SMILQT Quicktime XML SMIL Metafile
SMILRM Real Media XML SMIL Metafile
SWF Adobe Flash Small Web Format
THREEGPP 3GPP MP4 File Format
THREEGPP2 3GPP2 MP4 File Format
W64 Sony Wave64 Format
WAV Waveform Audio File Format
WEBM Google WebM
WMV Windows Media Video

Table 3. Media Codecs
Format  
H264 H.264, MPEG-4 Part 10, or AVC
VP6 On2 VP6
VP6A On2 VP6 alpha channel
FLV Spark Codec
FLASHSV Flash screen video
VP3 On2 VP3
VP5 On2 VP5
VP6F VP6 with scaling
MPG1 MPEG-1 Video
MPG2 MPEG-2 Video
WMV1 Windows Media Video V7
WMV2 Windows Media Video V8
WMV3 Windows Media Video V9
WVC1 SMPTE VC1
DIVX DivX MPEG-4 Video
XVID XviD MPEG-4 Video
DVSD DV Standard Definition (and DVCPro 25 NTSC)
DV25 DVCPro 25 (PAL)
DV50 DVCPro 50
RV10 Real Video V5
RV20 Real Video G2/SVT V6/7
RV30 Real Video V8
RV40 Real Video V9
H263 ITU H.263 Video
MPG4 MPEG-4 Video
MJPEGA Motion JPEG A
MJPEGB Motion JPEG B
PHOTOJPEG Photo JPEG
SORENSON1 Sorenson video 
SORENSON3  Sorenson video 3
RAW Raw Video
QT_ANIMATION Quicktime Animation (RLE)
PRORES_422_PROXY Apple ProRes 422 Proxy
PRORES_422_LT Apple ProRes 422 LT
PRORES_422_SD Apple ProRes 422 SD
PRORES_422_HQ Apple ProRes 422 HQ
PRORES_4444 Apple ProRes 4444
DNXHD SMPTE VC3/DNxHD
JPEG_2000 JPEG 2000
DIRAC Dirac video
THEORA Theora video
CINEFORM CineForm HD / 4K / 3D Intermediate
VP8 Google VP8
CAVS Chinese AVS Video (AVS1-P2, JiZhun profile)
Table 4. Audio Codecs
   
DTSCA DTS (Coherent Acoustics)
AMRNB Adaptive Multi-Rate (AMR) Narrow-Band
AMRWB Adaptive Multi-Rate (AMR) Wide-Band
AAC MPEG-4 Advanced Audio Coding
MP3 MPEG-1/2 Layer 3 Audio
NELLYMOSER8 Nelly Moser 8kHz Mono
NELLYMOSER Nelly Moser
MP2 MPEG-1/2 Layer 2 Audio
MP1 MPEG-1 Layer 1 Audio
AC3 Dolby AC-3 (ATSC A/52A)
WMA1 Windows Media Audio V7
WMA2 Windows Media Audio V8/V9
WMA3 Windows Media Audio V9 Pro
WMA4 Windows Media Audio V9 Lossless
WMA5 Windows Media Audio V9 Voice
ATRC Real Audio Sony ATRAC3 V8
COOK Real Audio G2/Cook V6
RA14 Early Real Audio 14.4kbps
RA28 Early Real Audio 28.8kbps
SIPR Real Audio Sipro Lab Telecom ACELP-NET V4/5
QDM2 QDesign Music Codec 2
SBE_PCM Signed Big Endian Pulse Code Modulation Audio
SLE_PCM Signed Little Endian Pulse Code Modulation Audio
UBE_PCM Unsigned Big Endian Pulse Code Modulation Audio
ULE_PCM Unsigned Little Endian Pulse Code Modulation Audio
ULAW_PCM u-Law Logarithmic Pulse Code Modulation Audio
ALAW_PCM a-Law Logarithmic Pulse Code Modulation Audio
FLV_IMA Flash IMA ADPCM
QT_IMA Quicktime IMA ADPCM
MS_IMA Microsoft IMA ADPCM
ALAC Apple Lossless Audio
VORBIS Vorbis audio
FLAC Free Lossless Audio Codec
EAC3 Dolby E-AC-3 (ATSC A/52B)
DC_PCM Digital Cinema Pulse Code Modulation Audio
DVD_PCM DVD Pulse Code Modulation Audio
BLU_RAY_PCM Blu-ray Pulse Code Modulation Audio
FBE_PCM Floating Point Big Endian Pulse Code Modulation Audio
FLE_PCM Floating Point Little Endian Pulse Code Modulation Audio
GSM GSM Speech Codec
QCELP QCELP - Qualcomm PureVoice
SPEEX Speex CELP Speech Codec

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

{
  "asset": {
    "accountId": 0,
    "assetContext": {},
    "assetMetadata": {
      "businessMetadata": "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.478Z",
          "mimeType": "string",
          "referenceCount": 0,
          "version": 0
        }
      ],
      "imageAttachments": [
        {
          "description": "string",
          "filePath": "string",
          "fileUri": {
            "absolute": true,
            "authority": "string",
            "fragment": "string",
            "host": "string",
            "opaque": true,
            "path": "string",
            "port": 0,
            "query": "string",
            "rawAuthority": "string",
            "rawFragment": "string",
            "rawPath": "string",
            "rawQuery": "string",
            "rawSchemeSpecificPart": "string",
            "rawUserInfo": "string",
            "scheme": "string",
            "schemeSpecificPart": "string",
            "userInfo": "string"
          },
          "id": 0,
          "imageFormat": "PNG",
          "master": true,
          "referenceCount": 0,
          "timecode": "string",
          "title": "string"
        }
      ]
    },
    "description": "string",
    "id": 0,
    "lastModified": "2016-11-01T15:29:14.478Z",
    "owner": "string",
    "parentId": 0,
    "players": [
      {
        "definition": {
          "definition": "string",
          "id": 0,
          "instance": "string",
          "name": "string",
          "playerOption": "string"
        },
        "embedCode": "string",
        "playerConfiguration": {
          "id": 0,
          "playerDefinition": "string",
          "playerInstance": "string",
          "playerOption": "string",
          "playerPlugins": "string"
        },
        "playerDefinitionTemplateId": 0,
        "playerId": 0,
        "sources": [
          {
            "assetId": 0,
            "id": 0,
            "media": {
              "authority": "string",
              "content": {},
              "defaultPort": 0,
              "file": "string",
              "host": "string",
              "path": "string",
              "port": 0,
              "protocol": "string",
              "query": "string",
              "ref": "string",
              "userInfo": "string"
            },
            "mimeType": "string"
          }
        ]
      }
    ],
    "publishCount": 0,
    "subAccountId": 0,
    "title": "string",
    "variant": "string"
  },
  "limit": 0,
  "message": "string",
  "offset": 0,
  "resources": [
    {
      "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.478Z",
            "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.478Z",
      "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"
    }
  ],
  "totalCount": 0
}

An example of an API call and the response:

    http://10.13.1.85:18106/public/api/assets?token=w8qZG3GJSR&limit=2
  
{
  "resources": [
    {
      "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"
    },
    {
      "type": "MediaAsset",
      "id": 13646,
      "title": "Audi Q10.mp4",
      "lastModified": "28-10-2016 09:15:59",
      "assetOrigin": "INGEST",
      "assetMetadata": {
        "genericAttachments": [],
        "imageAttachments": [],
        "contentMetadata": null
      },
      "players": [
        {
          "id": 13649,
          "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/13649/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/13649"
        }
      ],
      "owner": "ROGERIO ROSA",
      "accountId": 10103,
      "publishCount": 1,
      "href": "http://localhost:18106//public/api/assets/13646",
      "transcodes": [],
      "proxies": [],
      "copies": [],
      "assetContext": {
        "formatContext": {
          "format": "MP4",
          "bitRate": 5183322,
          "fileSize": 19281961,
          "duration": 29760000,
          "streamCount": 2,
          "audioStreamCount": 1,
          "videoStreamCount": 1
        },
        "videoStreamContexts": [
          {
            "language": "eng",
            "bitRate": 4997772,
            "codec": "H264",
            "frameRate": 25,
            "pixelAspectRatio": 1,
            "width": 1024,
            "height": 576
          }
        ],
        "audioStreamContexts": [
          {
            "language": "eng",
            "bitRate": 189341,
            "codec": "AAC",
            "sampleRate": 48000,
            "bitsPerSample": 32,
            "channels": 2
          }
        ]
      },
      "assetType": "MEDIA",
      "media": "http://publishcdn.local.nativ.tv:19180/dev/assets/94045f3f-5cfe-4a60-a385-69e71010b7d8.mp4"
    }
  ],
  "totalCount": 2,
  "offset": 0,
  "limit": 2
}                
         
     

Was this article helpful?