Link relation aa:create-asset

Overview

Create an asset.

HTTP method

POST

URL template parameters

-

Query parameters

queueId

Only for MediaCentral Newsroom Management

A mandatory query parameter that specifies the Queue where the asset will be created.

unlock

Only for MediaCentral Newsroom Management

Put false to preserve asset lock, default value is true.

qkey

Only for MediaCentral Newsroom Management

Password for key-locked queue.

Request body

An aa:asset resource.

The format of the request body depends on the system. The type property of the link contains the supported format.

HTTP response

201 Created

The asset was created successfully.

Response body

-

The link rel doesn’t return a response body, but sets the HTTP header Location to a URL that returns the created asset.

Available in

Description

MediaCentral Asset Management

The body is expected in the same format that is returned when getting the information about an asset.

  • Writable status properties are created (see Status).

  • Common attributes that are given in the request are set.

Example:
 
{
  "base": {
    "id": "934902-324-324-32-2342839",
    "type": "asset.VIDEO",
    "systemType": "interplay-mam",
    "systemID": "a80eaff4-a086-47b1-8775-9e22d3b2f8cb"
  },
  "common": {
    "name": "Parliament session"
  }
}
 

You can embed an aa:attributes resource to set custom attributes. The same restrictions apply as in aa:update-attributes.

Example:
 
{
  "base": {
    "id": "934902-324-324-32-2342839",
    "type": "asset.VIDEO",
    "systemType": "interplay-mam",
    "systemID": "a80eaff4-a086-47b1-8775-9e22d3b2f8cb"
  },
  "common": {
    "name": "Parliament session"
  },
  "_embedded": {
    "aa:attributes": {
      "attributes": [
        {
          "name": "REGISTRATION_DATETIME",
          "value": "2017-02-10 23:10:12"
        },
        {
          "name": "CONTRIBUTIONS",
          "type": "multi-value compound",
          "value": [
            {
              "index": 0,
              "attributes": [
                {
                  "name": "ROLE",
                  "value": "288"
                },
                {
                  "name": "REAL_NAME",
                  "value": "John Doe"
                }
              ]
            },
            {
              "index": 1,
              "attributes": [
                {
                  "name": "ROLE",
                  "value": "221"
                },
                {
                  "name": "REAL_NAME",
                  "value": "John Smith"
                }
              ]
            }
          ]
        },
        {
          "name": "KEYWORDS",
          "type": "multi-value string",
          "value": [
            {
              "index": 0,
              "value": "Germany"
            },
            {
              "index": 1,
              "value": "Berlin"
            },
            {
               "value": "Politics"
            }
          ]
        }
      ]
    }
  }
}
 

MediaCentral Production Management

The body is expected in the same format that is returned when getting the information about an asset.

  • Writable status properties that are given are set (see Status).

  • Common attributes cannot be set.

  • Custom attributes to be set must be contained as embedded aa:attributes resource of the asset.

Only modifiable (i.e. those not having the system model’s readOnly flag) custom attributes that are given in the embedded aa:attributes are set. All custom attributes specified in the request must be modifiable for the request to succeed.

  • Passing timecode in SMPTE notation, it’ll just be written as string.

  • Passing timecode as integral value, it is assumed to represent a frame count. In this case, the property editRate must be specified as well, i.e. embedded aa:attributes must have the property editRate with a valid value. Also aa:attributes' property dropFrame is considered, when dealing with a frame count. If dropFrame is not specified, it defaults to false.

MediaCentral Newsroom Management

The body is expected in NSML format. Content-Type must be set to application/vnd.com.avid.inews.nsml+xml.

Example request body:
 
<nsml version="4.1">
<head>
    <meta words="4" rate="180" wordlength="6" version="2"/>
    <formname>DEFAULT-FORM</formname>
    <storyid>0ba0af50:0000a8b9:56bc92a9</storyid>
</head>
<fields>
    <string id="title">Weather forecast</string>
    <date id="create-date">1453717480</date>
    <date id="modify-date">1455198889</date>
    <string id="modify-by">avstar</string>
</fields>
<body>
    <p>The weather is fine.</p>
</body>
</nsml>
 

You can also use ia:create-asset-with-position and ia:create-asset-with-position-and-lock to create an asset with NSML as body.