REST Meta Media API

e

Derivative definition

The following API methods provides the read/list access to the derivative definition which are defined in the Informatica Media Manager. The call result can be used to fetch the corresponding derivative of the desired media asset file, for more details please visit the page REST Media API.

Derivative definition is a predefined schema with which the master asset (original image) can be converted to a derivative for certain rules (e.g. extension, resolution).

Get single derivative definition

URL Pattern

/meta/media/derivativeDefinitions/{id}

Method

GET

Path Parameters

id: The id of the desired derivaitve definition, must be an integer value

Media types

application/xml, application/json

Result

Derivative definition as a MediaAssetDerivativeDefinition object

Content

The content has to be a JSON/XML object which includes the properties listed below.

MediaAssetDerivativeDefinition

Field

Required

Datatype

Parameter description

Example

id

yes

INTEGER

Unique id of the derivatrive definition

1

shortDescription

no

STRING

Short description of the derivatrive definition

JPEG 36dpi

longDescription

no

STRING

Long description of the derivatrive definition

Derivative with JPEG extension and 36 dpi resolution

volumeId

no

INTEGER

Id of the volumn which is defined in the Media Manager to indicate the file storage where the corresponding derivatives are stored

0

Get all derivative definitions

URL Pattern

/meta/media/derivativeDefinitions

Method

GET

Parameters

-

Media types

application/xml, application/json

Result

all derivative definitions as a List of MediaAssetDerivativeDefinition objects

Media Asset File Property field definition

The following API methods provides the read/list access to the media asset file property field definition which are defined in the Informatica Media Manager.

Property field definition is a schema which defines the corresponding settings for a media asset file property field, e.g. number, type, default value.

Get single property field definition for one supported language

URL Pattern

/meta/media/fields/{field-identifier}/{locale}

Method

GET

Path Parameters

field-identifier: field identifier for the property field definition which seems like 'F_IMGITEM.IMI_ITEM3'

locale: The locale for which the desired property field definition is defined in the Media Manager

Media types

text/html, application/xml, application/json

Result

The metadata of a field for property field definition. The returned metadata includes information like the identifier, locale, data type etc.

Content

The content has to be a HTML/JSON/XML object which includes the properties listed below.

Field properties for property field definition

Field

Required

Datatype

Parameter description

Example

identifier

yes

STRING

id of the corresponding property field definition

F_IMGITEM.IMI_ITEM3

locale

yes

STRING

locale for which the corresponding property field definition is defined

en_US

name

no

STRING

name of the property file definition

License Free

category

no

STRING

fix value as "General information(Media asset file attributes)"

General information(Media asset file attributes)

dataType

no

DataType

data type of the property field definition which is transfered from the original type in the Media Manager

STRING

lowerBound

no

INTEGER

Possible values are 0 or 1, where 0 means the property field is completely optional, and 1 indicates it defines a mandatory property field

0

upperBound

no

INTEGER

The value can be 1 or -1, where -1 means an unlimited amount of objects, and 1 exactly one child object. Currently only the "Multiple selection list" type property file definitoin has a -1 upperBound

1

maxLength

no

INTEGER

currently only available for the common "Text" type property field definition

3000

rangeMin

no

STRING

only available for "Integer" and "Dezimal number" type property field definition

-1.0

rangeMax

no

STRING

only available for "Integer" and "Dezimal number" type property field definition

9.9

scale

no

INTEGER

The precision of decimal data types. Defines the number of digits after the comma.

2

value

no

STRING

default value

"test"

searchable

no

BOOLEAN

True if the search functionalities can be used to search for this property field content, false if not

TRUE

readLevel

no

INTEGER

read access level which defined in the Media Manager

0

readWriteLevel

no

INTEGER

read/write access level which defined in the Media Manager

0

allowedValues

no

List of STRING

currently only available for "Selection list" and "Multiple selection list"

["One", "Two", "Three"]

regularExpression

no

STRING

only available for the common "Text" type property field definition(not for "Long text")

*

Following table indicates the mapping from the original property filed defintion type to the corresponding Product 360 DataType inclusive addtional notes

Property field definiton type in Media Manager

DataType in Product 360

additional notes

Boolean

BOOLEAN

Date

DATE

Decimal number

DECIMAL

rangeMin: it is calculated from the "minimum value", "places" and "decimal places" which are defined in the Media Manager

rangeMax: it is calculated from the "maximum value", "places" and "decimal places" which are defined in the Media Manager

Integer

INTEGER

rangeMin: the "minimum value" defined in the Media Manager
rangeMax: the "maximum value" defined in the Media Manager

Multiple selection list

STRING

upperBound: -1

allowedValues is defined

Selection list

STRING

allowedValues is defined

Text

STRING

number: [1, 100]

Time

TIME

Long Text

STRING

nummer: [101, 110]

Get single property field definition for all supported languages

URL Pattern

/meta/media/fields/{field-identifier}

Method

GET

Parameters

field-identifier: field identifier for the property field definition which seems like 'F_IMGITEM.IMI_ITEM3'

Media types

text/html, application/xml, application/json

Result

All property field definitions as a List of fields grouped by one category. The returned structure
contains one category with all fields

Get all property field definitions for all supported languages

URL Pattern

/meta/media/fields

Method

GET

Parameters

-

Media types

text/html, application/xml, application/json

Result

All property field definitions as a List of fields grouped by one category. The returned structure contains one category with all fields

Examples

Retrieve single derivative definition with identifier

REST call for JSON

Rest Call for JSON
curl -u rest:heiler -H "Accept: application/json" -X GET http://localhost:1512/rest/V1.0/meta/media/derivativeDefinitions/1

A MediaAssetDerivtiveDefinition JSON object including id and other attributes of the desired derivative definition is returned:

Returned JSON object
{
"id": 1,
"shortDescription": "JPEG 36dpi",
"longDescription": "Derivative with JPEG extension and 36 dpi resolution",
"volumeId": 0
}

REST call for XML

Rest Call for XML
curl -u rest:heiler -H "Accept: application/xml" -X GET http://localhost:1512/rest/V1.0/meta/media/derivativeDefinitions/1

A MediaAssetDerivativeDefinition XML object including id and other attributes of the desired derivative definition is returned:

Returned XML object
<mediaAssetDerivativeDefinition>
<id>1</id>
<shortDescription>JPEG 36dpi</shortDescription>
<longDescription>Derivative with JPEG extension and 36 dpi resolution</longDescription>
<volumeId>0</volumeId>
</mediaAssetDerivativeDefinition>

REST Client Java

Rest Client Java Code
MetaMediaRequest metaMediaRequest = restClient.createMetaRequest().createMediaRequest();
MediaAssetDerivativeDefinition derivativeDefinition = metaMediaRequest.getDerivativeDefinition( 1 );

Retrieve all derivative definitions

REST call for JSON

Rest Call for JSON
curl -u rest:heiler -H "Accept: application/json" -X GET http://localhost:1512/rest/V1.0/meta/media/derivativeDefinitions

The following JSON objec is returned:

Returned JSON object
[
{
"id": 1,
"shortDescription": "JPEG 36dpi",
"longDescription": "Derivative with JPEG extension and 36 dpi resolution",
"volumeId": 0
},
{
"id": 2,
"shortDescription": "BMP 90dpi",
"longDescription": "Derivative with BMP extension and 90 dpi resolution",
"volumeId": 0
},
{
"id": 3,
"shortDescription": "PNG 48dpi",
"longDescription": "Derivative with PNG extension and 48 dpi resolution",
"volumeId": 0
},
...
 ]

REST call for XML

Rest Call for XML
curl -u rest:heiler -H "Accept: application/xml" -X GET http://localhost:1512/rest/V1.0/meta/media/derivativeDefinitions

The following XML objec is returned:

Returned XML object
<mediaAssetDerivativeDefinitions>
<mediaAssetDerivativeDefinition>
<id>1</id>
<shortDescription>JPEG 36dpi</shortDescription>
<longDescription>Derivative with JPEG extension and 36 dpi resolution</longDescription>
<volumeId>0</volumeId>
</mediaAssetDerivativeDefinition>
<mediaAssetDerivativeDefinition>
<id>2</id>
<shortDescription>BMP 90dpi</shortDescription>
<longDescription>Derivative with BMP extension and 90 dpi resolution</longDescription>
<volumeId>0</volumeId>
</mediaAssetDerivativeDefinition>
<mediaAssetDerivativeDefinition>
<id>3</id>
<shortDescription>PNG 48dpi</shortDescription>
<longDescription>Derivative with PNG extension and 48 dpi resolution</longDescription>
<volumeId>0</volumeId>
</mediaAssetDerivativeDefinition>
...
</mediaAssetDerivativeDefinitions>

REST Client Java

Rest Client Java Code
MetaMediaRequest metaMediaRequest = restClient.createMetaRequest().createMediaRequest();
List< MediaAssetDerivativeDefinition > derivativeDefinitions = metaMediaRequest.getDerivativeDefinitions();

Retrieve single property field definition for one supported language

REST call for JSON

Rest Call for JSON
curl -u rest:heiler -H "Accept: application/json" -X GET http://localhost:1512/rest/V1.0/meta/media/fields/F_IMGITEM.IMI_ITEM3/en_US

A MediaAssetFilePropertyFieldDefinition JSON object including language id and a list of PropertyFieldSingleDefinition is returned:

Returned JSON object
{
"identifier": "F_IMGITEM.IMI_ITEM3",
"locale": "en_US",
"name": "Multiple selelction list english",
"category": "General information(Media asset file attributes)",
"dataType": "STRING",
"lowerBound": "0",
"upperBound": "-1",
"maxLength": "0",
"scale": "0",
"value": "",
"searchable": "false",
"readLevel": "0",
"readWriteLevel": "0",
"allowedValues": "[First, Second, Third]"
}

REST call for XML

Rest Call for XML
curl -u rest:heiler -H "Accept: application/xml" -X GET http://localhost:1512/rest/V1.0/meta/media/fields/F_IMGITEM.IMI_ITEM3/en_US

A MediaAssetFilePropertyFieldDefinition JSON object including language id and a list of PropertyFieldSingleDefinition is returned:

Returned XML object
<?xml version="1.0" encoding="UTF-8"?>
<field>
<identifier>F_IMGITEM.IMI_ITEM3</identifier>
<locale>en_US</locale>
<name>Multiple selelction list english</name>
<category>General information(Media asset file attributes)</category>
<dataType>STRING</dataType>
<lowerBound>0</lowerBound>
<upperBound>-1</upperBound>
<maxLength>0</maxLength>
<rangeMin></rangeMin>
<rangeMax></rangeMax>
<scale>0</scale>
<value></value>
<searchable>false</searchable>
<readLevel>0</readLevel>
<readWriteLevel>0</readWriteLevel>
<allowedValues>[First, Second, Third]</allowedValues>
<regularExpression></regularExpression>
</field>

REST Client Java

Rest Client Java Code
MetaMediaRequest metaMediaRequest = restClient.createMetaRequest().createMediaRequest();
PropertyFieldDefinitionField propertyFieldDefinition = metaMediaRequest.getPropertyFieldDefinition( "F_IMGITEM.IMI_ITEM3", "en_US" );

Retrieve single property field definition for all supported languages

REST call for JSON

Rest Call for JSON
curl -u rest:heiler -H "Accept: application/json" -X GET http://localhost:1512/rest/V1.0/meta/media/fields/F_IMGITEM.IMI_ITEM3

A List of MediaAssetFilePropertyFieldDefinition JSON object is returned:

Returned JSON object
{
"categories": [
{
"identifier": "media-asset-file-attributes-general",
"qualifiedName": "General information(Media asset file attributes)",
"fields": [
{
"identifier": "F_IMGITEM.IMI_ITEM3",
"qualifiedName": "Multiple selelction list english",
"description": "Property field definition 'F_IMGITEM.IMI_ITEM3' for the locale 'en_US'"
},
{
"identifier": "F_IMGITEM.IMI_ITEM3",
"qualifiedName": "MultiSelectList Deutsch",
"description": "Property field definition 'F_IMGITEM.IMI_ITEM3' for the locale 'de_DE'"
}
]
}
]
}

REST call for XML

Rest Call for XML
curl -u rest:heiler -H "Accept: application/xml" -X GET http://localhost:1512/rest/V1.0/meta/media/fields/F_IMGITEM.IMI_ITEM3

The following XML objec is returned:

Returned XML object
<?xml version="1.0" encoding="UTF-8"?>
<fieldsByCategory>
<categories>
<category>
<identifier>media-asset-file-attributes-general</identifier>
<qualifiedName>General information(Media asset file attributes)</qualifiedName>
<fields>
<field>
<identifier>F_IMGITEM.IMI_ITEM3</identifier>
<qualifiedName>Multiple selelction list test</qualifiedName>
<description>Property field definition 'F_IMGITEM.IMI_ITEM3' for the locale 'en_US'</description>
</field>
<field>
<identifier>F_IMGITEM.IMI_ITEM3</identifier>
<qualifiedName>MultiSelectList DE</qualifiedName>
<description>Property field definition 'F_IMGITEM.IMI_ITEM3' for the locale 'de_DE'</description>
</field>
</fields>
</category>
</categories>

REST Client Java

Rest Client Java Code
MetaMediaRequest metaMediaRequest = restClient.createMetaRequest().createMediaRequest();
RepositoryCategories categories = metaMediaRequest.getPropertyFieldDefinitions( "F_IMGITEM.IMI_ITEM3" );
RepositoryCategory generalAttributeCategory = categories.getCategories()
.get( 0 );
List< RepositoryField > propertyFieldDefinitions = generalAttributeCategory.getFields();

Retrieve property field definitions for all supported languages

REST call for JSON

Rest Call for JSON
curl -u rest:heiler -H "Accept: application/json" -X GET http://localhost:1512/rest/V1.0/meta/media/fields

A List of MediaAssetFilePropertyFieldDefinition JSON object is returned:

Returned JSON object
{
"categories": [
{
"identifier": "media-asset-file-attributes-general",
"qualifiedName": "General information(Media asset file attributes)",
"fields": [
{
"identifier": "F_IMGITEM.IMI_ITEM1",
"qualifiedName": "Licensefree",
"description": "Property field definition 'F_IMGITEM.IMI_ITEM1' for the locale 'en_US'"
},
...
{
"identifier": "F_IMGITEM.IMI_ITEM1",
"qualifiedName": "Lizenzfrei",
"description": "Property field definition 'F_IMGITEM.IMI_ITEM1' for the locale 'de_DE'"
},
...
]
}
]
}

REST call for XML

Rest Call for XML
curl -u rest:heiler -H "Accept: application/xml" -X GET http://localhost:1512/rest/V1.0/meta/media/fields

The following XML objec is returned:

Returned XML object
<?xml version="1.0" encoding="UTF-8"?>
<fieldsByCategory>
<categories>
<category>
<identifier>media-asset-file-attributes-general</identifier>
<qualifiedName>General information(Media asset file attributes)</qualifiedName>
<fields>
<field>
<identifier>F_IMGITEM.IMI_ITEM1</identifier>
<qualifiedName>Licensefree</qualifiedName>
<description>Property field definition 'F_IMGITEM.IMI_ITEM1' for the locale 'en_US'</description>
</field>
...
<field>
<identifier>F_IMGITEM.IMI_ITEM1</identifier>
<qualifiedName>Lizenzfrei</qualifiedName>
<description>Property field definition 'F_IMGITEM.IMI_ITEM1' for the locale 'de_DE'</description>
</field>
...
</fields>
</category>
</categories>

REST Client Java

Rest Client Java Code
MetaMediaRequest metaMediaRequest = restClient.createMetaRequest().createMediaRequest();
RepositoryCategories categories = metaMediaRequest.getAllPropertyFieldDefinitions();
RepositoryCategory generalAttributeCategory = categories.getCategories().get( 0 );
List< RepositoryField > allPropertyFieldDefinitions = generalAttributeCategory.getFields();