Node - media

Purpose

The media node represents a single file or link stored in media services.

Examples

1
2
3
4
5
6
7
8
{
  "type": "media",
  "attrs": {
    "type" : "file",
    "id": "6e7c7f2c-dd7a-499c-bceb-6f32bfbf30b5",
    "collection" : "my project files"
  }
}

Content

media is an immutable node that can not be modified.

Marks

media does not support any marks.

Siblings / parents / children

media is a node that can only occur within the following nodes:

Notes and recommendations

  • Media id (represented as attrs.id) is immutable in Media API.
  • Consumers of the document should always fetch fresh metadata, for media with given ID, from Media API

Fields

NameMandatoryTypeValueNotes
typestring"media"
attrsobject
attrs.widthintegerField will not be shown if not provied within mediaSingle
attrs.heightintegerField will not be shown if not provied within mediaSingle
attrs.idstringMedia services IDUsed for querying media services API to retrieve metadata (e.g. filename)
attrs.typestring"file"
attrs.collectionstringMedia Services Collection name
attrs.occurrenceKeystringNon empty stringAn occurrence key needs to be present in order to enable deletion of files from a collection