Resource aa:attributes

Overview

The aa:attributes resource represents the attributes of an asset.

Properties

The aa:attributes resource has the following properties:

editRate

The edit rate of the asset. The value is a string containing a fraction. Example:

{
  "editRate": "30000/1001",
  ...
}

dropFrame

Boolean flag that defines if the asset has a drop-frame framerate. If the property is missing, then the asset doesn’t use a drop-frame format.

{
  "editRate": "30000/1001",
  "dropFrame": true,
  ...
}

attributes

An array of JSON objects. Each JSON object represents one asset attribute with it’s value. Each JSON object has the following sub properties:

  • name The name of the attribute

  • value The value of the attribute. The format of the value depends on the type. In case of multi-value attributes in MediaCentral Asset Management, the value will be an array.

  • type (Optional) The type of the attribute. If type is missing or empty, the attribute is a string attribute. See below for a list of available types.

  • value-labels (Optional) Display label for the value. This is used for types like list, thesaurus, and masterdata where the value is the ID, but the user should see a more useful text in a UI. The property contains a map of labels with the culture code as key. Example:

{
  "name": "lead_instrument",
  "type": "thesaurus",
  "list": "MUSICAL_INSTRUMENTS",
  "value": "4424ZU43",
  "value-labels": {
    "en": "Harp",
    "de": "Harfe"
  }
}
  • value-tooltips (Optional) Tooltips for the value. The property contains a map of tooltip texts with the culture code as key. Example:

{
  "name": "lead_instrument",
  "type": "thesaurus",
  "list": "MUSICAL_INSTRUMENTS",
  "value": "4424ZU43",
  "value-tooltips": {
    "en": "Harp",
    "de": "Harfe"
  }
}
  • unit (Optional, only for timecode and duration attributes) Returns "frames" if the value is a number of frames, "ms" if the value is a number of milliseconds or "SMPTE", a string showing a SMPTE timecode, if the field could neither be presented as framecount or ms ("SMPTE" can be used, if no editRate was given).

Table of supported types:

string

A string

int

An integer value

float

A floating point value

boolean

A boolean value

date

A date in format YYYY-DD-MM. Example: 2018-04-15

time

A time in 24h format HH:MM:SS. Example: 17:06:29

datetime

A date and time

timecode

A timecode attribute. If the asset has a valid edit rate (meaning: the property editRate is set), then the value is a number of frames.

MediaCentral Asset Management:

If the edit rate is not valid, timecode represents a number of milliseconds. The property unit tells the client which unit is used. The property value-labels contains a recommended display label for the value. Example:

{
  "name": "MY_TC_ATTRIBUTE",
  "type": "timecode",
  "value": 93079,
  "unit": "frames",
  "value-labels": {
    "en": "01:02:03.160"
  }
}

New in MC | Cloud UX 2023.7 Please note that starting with MC | AM 2023.7 the handling of SMPTE timecode strings around midnight has changed. See timecodes in MC | AM for details.

MediaCentral Production Management:

If the edit rate is not valid, value represents the raw value, gotten from the backend, usually, this is a string with a SMPTE timecode. With an invalid edit rate, the property unit will be set to the value SMPTE and the property value-labels will be missing. - The client is then meant to use value to display the attribute’s value, instead of value-labels. When an attribute is updated and a string is passed, it must be a valid SMPTE timecode. When an attribute is updated and an integral value is passed, it is assumed to represent a frame count; in this case a valid edit rate must be specified.

duration

A duration attribute. If the asset has a valid edit rate (meaning: the property editRate is set), then the value is a number of frames. Otherwise it is a number of milliseconds. The property unit tells the client which unit is used. The property value-labels contains a recommended display label for the value. Example:

MediaCentral Asset Management:

If the edit rate is not valid, duration represents a number of milliseconds. The property unit tells the client which unit is used. The property value-labels contains a recommended display label for the value.

{
  "name": "MY_DURATION_ATTRIBUTE",
  "type": "duration",
  "value": 93079,
  "unit": "frames",
  "value-labels": {
    "en": "01:02:03.160"
  }
}

New in MC | Cloud UX 2023.7 Please note that starting with MC | AM 2023.7 the handling of SMPTE timecode strings around midnight has changed. See timecodes in MC | AM for details.

MediaCentral Production Management:

If the edit rate is not valid, value represents the raw value, gotten from the backend, usually, this is a string with a SMPTE timecode. With an invalid edit rate, the property unit will be set to the value SMPTE and the property value-labels will be missing. - The client is then meant to use value to display the attribute’s value, instead of value-labels. When an attribute is updated and a string is passed, it must be a valid SMPTE timecode. When an attribute is updated and an integral value is passed, it is assumed to represent a frame count; in this case a valid edit rate must be specified.

list

A value from a pre-defined list of values. The value of the attribute is a string containing the ID of the list entry. The additional property list defines which value list is used for the attribute. Example:

{
  "name": "country",
  "type": "list",
  "list": "COUNTRIES",
  "value": "COJ-2832-323-XYP",
  "value-labels": {
    "en": "Germany",
    "de": "Deutschland"
  }
}

thesaurus

A value from a pre-defined thesaurus. A thesaurus is a set of values organized as a tree of terms. The value of the attribute is a string containing the ID of the thesaurus entry. The additional property thesaurus defines which thesaurus is used for the attribute. Example:

{
  "name": "lead_instrument",
  "type": "thesaurus",
  "list": "MUSICAL_INSTRUMENTS",
  "value": "4424ZU43",
  "value-labels": {
    "en": "Harp",
    "de": "Harfe"
  }
}

masterdata

A value from a pre-defined list of masterdata records. The value of the attribute is a string containing the ID of the masterdata record. The additional property masterdata defines which masterdata type is used for the attribute. Example:

{
  "name": "director",
  "type": "masterdata",
  "list": "PERSONS",
  "value": "3423-43243-4398-3135",
  "value-labels": {
    "en": "Alfred Hitchcock"
  }
}

compound

A value that is compound of different sub attributes. This is currently only used in connection with multi-value attributes. See Multi-Value Compound for details.

multi-value <basetype>

A multi-value attribute of one of the base types, for example "multi-value string" or "multi-value compound". See MediaCentral Asset Management Multi-Value Attributes for details.

aa:asset

Link to the asset that contains the attributes.

aa:update-attributes

Update the custom attributes of an asset.

aa:multi-value-attribute-by-attributeid

Get the rows of a given multi-value attribute.

aa:multi-value-attribute-range-by-attributeid

Get a range of the rows of a given multi-value attribute.

aa:update-multi-value-attribute-by-attributeid

Update the rows of a given multi-value attribute.

Description

The aa:attributes resource represents the attributes of an asset.

Examples

Example: MediaCentral Asset Management aa:attributes resource
 
{
  "attributes": [
    {
      "name": "MAINTITLE",
      "value": "Test object 2"
    },
    {
      "name": "SYSTEM_OBJECTOWNER",
      "value": "DEFAULT"
    },
    {
      "name": "REGISTRATION_DATE",
      "type": "date",
      "value": "2016-01-12"
    },
    {
      "name": "REGISTRATION_TIME",
      "type": "time",
      "value": "17:26:35"
    },
    {
      "name": "MODIFICATION_DATETIME",
      "type": "datetime",
      "value": "2016-01-12T17:26:35+01:00"
    },
    {
      "name": "MODIFICATION_USERLOGIN",
      "value": "admin"
    },
    {
      "name": "REGISTRATION_DATETIME",
      "type": "datetime",
      "value": "2016-01-12T17:26:35+01:00"
    },
    {
      "name": "REGISTRATION_USERLOGIN",
      "value": "admin"
    },
    {
      "name": "MODIFICATION_USERNAME",
      "value": "admin"
    },
    {
      "name": "REGISTRATION_USERNAME",
      "value": "admin"
    },
    {
      "name": "RIGHTS_INDICATOR",
      "type": "list",
      "list": "ma_rights_indicator",
      "value": 0,
      "value-labels": {
        "en": "free for use"
      }
    },
    {
      "name": "SYSTEM_SOC_TC",
      "value": "00:00:00.000"
    }
  ],
  "_links": {
    "curies": [
      {
        "href": "http://services.avid.com/apis/assets/{rel}",
        "name": "aa",
        "templated": true
      },
      {
        "href": "http://services.avid.com/apis/mam/assets/{rel}",
        "name": "ma",
        "templated": true
      }
    ],
    "self": {
      "href": "https://host/…​"
    },
    "aa:asset": {
      "href": "https://host/…​"
    },
    "aa:update-asset-attributes": {
      "href": "https://host/…​"
    }
  }
}
 

System-Specific Extensions

MediaCentral Asset Management Multi-Value Attributes

In MediaCentral Asset Management, an attribute can contain multiple values, or even a complete table of values with multiple rows, each containing sub attributes ("multi-value compound attribute"). For those attributes, the values are returned as JSON array.

Multi-Value Non-Compound

A multi-value non-compound attribute contains a list of values. In the aa:attributes resource, the values are returned as a JSON array of values. Each item in the array has an index value, which defines the order of the values and a value property with a value.

The type of the attribute is set to "multi-value", followed by the base type, e.g. "string".

Example: A multi-value non-compound attribute "TEST_MULTI" with three rows
 
{
  "attributes": [
    {
      "name": "TEST_MULTI",
      "type": "multi-value string",
      "value": [
        {
          "index": 0,
          "value": "New York"
        },
        {
          "index": 1,
          "value": "Paris"
        },
        {
          "index": 2,
          "value": "Tokyo"
        }
      ]
    }
  ],
  …​
}
 

Multi-Value Compound

A multi-value compound attribute contains multiple rows. Each row contains a number of sub attributes. It is similar to a table with multiple rows and columns.

The value of a multi-value compound attribute is a JSON array. Each item of the array represents one row. An array item contains:

  • an index which defines the order of the rows

  • a property attributes, containing a JSON array with the sub attributes. The format of the sub attributes is the same as for the attributes property of the aa:attributes resource. Sub attributes are always single-value attributes. You can’t have nested multi-value attributes.

The type of the multi-value compound attribute is "multi-value compound".

Example: A multi-value compound attribute "CONTRIBUTORS" with two rows
 
{
  "attributes": [
    {
      "name": "CONTRIBUTIONS",
      "type": "multi-value compound",
      "value": [
        {
          "index": 0,
          "attributes": [
            {
              "name": "ROLE",
              "value": "410"
            },
            {
              "name": "REAL_NAME",
              "value": "Alfred Hitchcock"
            }
          ]
        },
        {
          "index": 1,
          "attributes": [
            {
              "name": "ROLE",
              "value": "488"
            },
            {
              "name": "REAL_NAME",
              "value": "James Steward"
            }
          ]
        }
      ]
    }
  ],
  …​
}
 

MediaCentral | Production Management Attributes

For MediaCentral Production Management the http content-type header must be set to application/hal+json in the aa:update-asset-attributes-by-id request. Attribute types can be "string", "int", "boolean" or "datetime".

Example of a Media Central Production Management attribute:

{
    "attributes": [
        {
          "name": "com.avid.workgroup.Property.User.season",
          "type": "string",
          "value": "season001"
        }
    ]
}

MediaCentral | Newsroom Management Attributes

A MediaCentral Newsroom Management system has a fixed list of asset attributes.

Name Type Value Readonly Description

BODY_LOCKED

Boolean

True/ False

Yes

Whether the story body has been locked for editing.

FIELDS_LOCKED

Boolean

True/ False

Yes

Whether the story form has been locked for editing.

EASY_LOCKED

Boolean

True/ False

Yes

Whether the story has been locked by user.

KEY_LOCKED

Boolean

True/ False

Yes

Whether the story has been locked by user with password.

EDITED_BY_MONITOR

Boolean

True/ False

Yes

Whether the story was modified by monitor.

FLOATING

Boolean

True/ False

No

Whether the story is floating.

GROUP_UUID

String

UUIDv4

Yes

The story group UUID. Empty if story does not belong to a group.

HAS_MAIL_APPEND

Boolean

True/ False

Yes

Whether the story has mail append.

HAS_MCS_ERROR

Boolean

True/ False

Yes

Whether the story has error from MCS.

HAS_PROJECT

Boolean

True/ False

Yes

Whether the story has been assigned to project.

HOLDED

Boolean

True/ False

No

Whether the story was holded.

IS_BREAK

Boolean

True/ False

No

Whether the story is break story.

IS_MAIL

Boolean

True/ False

Yes

Whether the story is mail story.

IS_NSML

Boolean

True/ False

Yes

Whether the story is NSML story.

IS_WIRE

Boolean

True/ False

Yes

Whether the story is wire story.

MAIL_UNREAD

Boolean

True/ False

No

Whether the story has not been read.

MONITOR_PENDING

Boolean

True/ False

No

Whether monitor has pending action

ORDERED

Boolean

True/ False

No

Whether the story was ordered.

READONLY

Boolean

True/ False

Yes

Whether the story is read-only.

READ_RATE

Int

0..65535

No

Read rate value. Used in duration calculation.

STORY_FORM

String

0..63

No

Name of the form that applied to story.

TIMED

Boolean

True/False

No

Whether the story has assigned audio run time.

UUID

String

UUIDv4

Yes

The story UUID.

UUID_ORIGIN

String

UUIDv4

Yes

The original story UUID.

VERSION

Int

0..65535

Yes

Current story version number.

WIRE_PRIORITY

Int

0..65535

No

Priority code, only for wires stories.

WORD_COUNT

Int

0..65535

Yes

Number of words in story body. Calculated on server side, depends on WORD_LENGTH value

WORD_LENGTH

Int

0..65535

Yes

Number of characters in the word. Used to calculate WORD_COUNT value.

Example: MediaCentral Newsroom Management aa:attributes resource
 
{
  "attributes": [
    {
      "name": "BODY_LOCKED",
      "value": false,
      "readonly": true
    },
    {
      "name": "EASY_LOCKED",
      "value": false,
      "readonly": true
    },
    {
      "name": "EDITED_BY_MONITOR",
      "value": true,
      "readonly": true
    },
    {
      "name": "FIELDS_LOCKED",
      "value": false,
      "readonly": true
    },
    {
      "name": "FLOATING",
      "value": true
    },
    {
      "name": "GROUP_UUID",
      "value": "",
      "readonly": true
    },
    {
      "name": "HAS_MAIL_APPEND",
      "value": false
    },
    {
      "name": "HAS_MCS_ERROR",
      "value": false
    },
    {
      "name": "HAS_PROJECT",
      "value": true,
      "readonly": true
    },
    {
      "name": "HOLDED",
      "value": false
    },
    {
      "name": "IS_BREAK",
      "value": true
    },
    {
      "name": "IS_MAIL",
      "value": false
    },
    {
      "name": "IS_NSML",
      "value": true
    },
    {
      "name": "IS_WIRE",
      "value": false
    },
    {
      "name": "KEY_LOCKED",
      "value": false,
      "readonly": true
    },
    {
      "name": "MAIL_UNREAD",
      "value": false
    },
    {
      "name": "MONITOR_PENDING",
      "value": false
    },
    {
      "name": "ORDERED",
      "value": true
    },
    {
      "name": "READONLY",
      "value": false
    },
    {
      "name": "READ_RATE",
      "value": 180
    },
    {
      "name": "STORY_FORM",
      "value": "DEFAULT-FORM"
    },
    {
      "name": "TIMED",
      "value": false
    },
    {
      "name": "UUID",
      "value": "aa05b897-f138-40a4-b456-3f9ff51910d9",
      "readonly": true
    },
    {
      "name": "UUID_ORIGIN",
      "value": "4a03f4e2-759d-404c-899f-50b47ea63908",
      "readonly": true
    },
    {
      "name": "VERSION",
      "value": 1,
      "readonly": true
    },
    {
      "name": "WIRE_PRIORITY",
      "value": 0
    },
    {
      "name": "WORD_COUNT",
      "value": 4,
      "readonly": true
    },
    {
      "name": "WORD_LENGTH",
      "value": 6
    }
  ],
  "_links": {
    "curies": [
      {
        "name": "aa",
        "href": "http://services.avid.com/apis/assets/{rel}",
        "templated": true
      }
    ],
    "aa:asset": {
      "href": "https://host/…​"
    },
    "aa:update-attributes": {
      "href": "https://host/…​",
      "templated": true
    },
    "self": {
      "href": "https://host/…​"
    }
  }
}