Supported Operations

19.4.1.29 WriteAsset

DESCRIPTION:

This allows an authenticated user to create/update the key asset data (i.e. code, description, synopsis, type and station), artists' data (i.e. name, surname, etc.), genres data (i.e. description, group, etc.), flexible-metadata (e.g. performer, mood, etc.), EDL marks (i.e. visible segments, editing segments, etc.) and EDL flexi-metadata (e.g. origin, editor, etc.) of all assets matching given ID(s).

input forms described as Parameter: description - example

_user: Login name of the executor - user01

_pwd: Password of the executor - pass01

_xmlparams: A XML string that specifies the fields to be updated. There are some considerations:
.
1) The creation/update action depends on the value of the "idAsset" field:
· Blank: The asset is created, and its ID is returned.
· Exist: The asset is updated.
· Not exist: An error message is returned ("asset id not found").
.2) The "code", "type", and "coduser" can be blank; in that case, a default value will be used.
.3) If an <Asset>, <Genre>, < Artist>, <EDL_data>, <Asset_fleximetadata> and <EDL_fleximetadata> already exist, they are updated. Otherwise, they are created.
.4) Specify <Asset>, <Genre>, <Artist>, <EDL_data>, <Asset_fleximetadata> and <EDL_fleximetadata> so many as required.
.5) <Asset>, <Genre>, < Artist>, <EDL_data>, <Asset_fleximetadata>, and <EDL_fleximetadata> are not mandatory; you can specify only the ones to be created/modified. E.g. only <Genre> and < Artist>.
.6) <EDL_Row s> can be added only for EDL with a specified <EDL_Header>



Below are some examples:

Create a new asset:

<AssetData>
  <Asset idAsset="" code="C3806" description="Wonderw all unplugged" sinopsys="This song is a 90's hit..." type="TVSE" coduser="1"/>
</AssetData>


Update existing assets:

<AssetData>
    <Asset code="C3806" coduser="1" description="Wonderw all unplugged" idAsset="3806" sinopsys="This song is a 90's hit..." type="TVSE"/>
    <Genre code="4" description="pop" genretypedesc="Music" group="M" idAsset="3806"/>
    <Genre code="2" description="rock" genretypedesc="Music" group="M" idAsset="3806"/>
    <Artist description="Gallagher Noel" idAsset="3806" name="Noel" nationalitycode="044" surname="Gallagher"/>
    <Artist description="Oasis" idAsset="3806" name="" nationalitycode="044" surname=""/>
    <ASSET_fleximetadata>
        <ASSET_flexi idAsset="3806" item="0F.13.00.00.00.00.00.00" itemvalue="male singer"/>
        <ASSET_flexi idAsset="3806" item="0F.14.00.00.00.00.00.00" itemvalue="stage performance"/>
    </ASSET_fleximetadata>
    <EDL_Data>
        <EDL_Header description="1st EDL" eom="89999" idAsset="3806" som="0" version="7"/>
        <EDL_Row edltype="E" idAsset="3806" markin="45000" markout="55000" notes="notes" type="TVSE" version="7"/>
        <EDL_Row edltype="E" idAsset="3806" markin="60000" markout="70000" notes="notes" type="TVSE" version="7"/>
        <EDL_Row edltype="E" idAsset="3806" markin="75000" markout="85000" notes="notes" type="TVSE" version="7"/>
    </EDL_Data>
    <EDL_fleximetadata>
        <EDL_flexi idAsset="3806" item="0F.13.00.00.00.00.00.00" itemvalue="dubbed" markin="-1" markout="-1" version="9"/>
        <EDL_flexi idAsset="3806" item="0F.14.00.00.00.00.00.00" itemvalue="censored" markin="-1" markout="-1" version="9"/>
    </EDL_fleximetadata>
</AssetData>


input forms described as Parameter(type): description - example


<Asset>
IDAsset (integer): Asset's unique identification number in Etere. If blank, a new asset will be created to hold data. - 3806
Code (string): Asset's identification code string - CLIP3806
Description (string): Brief description of the asset - Wornderwall
Sinopsys (string): Detailed description of the asset - This song...
Type (string): Type of the asset (e.g. Clip, Tv series, Film, etc.) - Clip
CodUser (integer): Number of the station (e.g. Channel 01) - 1
<Genre>
IDAsset (integer): Asset's unique identification number in Etere - 3806
Code (string): Asset's identification code string - CLIP3806
Description (string): Genre's name - Indie rock
Group (string): Genre's group ID - M
GenreTypeDesc (string): Genre's group name (e.g. music, films, etc.) - M Music
<Artist>
IDAsset (integer): Asset's unique identification number in Etere - 3806
Description (string): Asset's identification code string - CLIP3806
Name (string): Artist's name - Noel
Surname (string): Artist's surname - Gallagher
NationalityCode (string): International country code related to Artist - 044
<ASSET_fleximetadata>
asset (integer): Asset's unique identification number in Etere - 3806
item (string): Code of the flexi-metadata item - 0F.14.00.00.00.00.00.00
item value (string): Value assigned to the flexi-metadata - male singer
<EDL_Data> <EDL_Header>
IDAsset (integer): Asset's unique identification number in Etere - 3806
Version (integer): EDL number (between 1 and 9) - 7
Description (string): EDL's brief description - Censorship
SOM (integer): Starting timecode of the EDL (in frames) - 0
EOM (integer): Ending timecode of the EDL (in frames) - 89999
<EDL_Data> <EDL_Row>
IDAsset (integer): Asset's unique identification number in Etere - 3806
Notes (string): Brief text describing the segment - Contains...
Type (string): Type of the segment (e.g. Clip, Tv series, Film, etc.) - TVSE
NB: Type is used only for V, E or B segments.
Mark_In (integer): Starting timecode of the segment (in frames) - 45000
NB: This field is an offset of the asset's inf_digit.
Mark_Out (integer): Ending timecode of the segment(in frames) - 55000
NB: This field is an offset of the asset's inf_digit.
Version (integer): EDL number (between 1 and 9) - 7
EDLtype (string):
The type of EDL can be:
§ V : Visible segment
§ E: Editing segment
§ I: Insertion point
§ B: Video fault
NB: EDL type must be the same for all segments.
- E
<EDL_fleximetadata>
asset (integer): Asset's unique identification number in Etere - 3806
version (integer): EDL number (between 1 and 9) - 7
markin¹ (integer): Starting timecode of the segment - "-1"
markout¹ (integer): Ending timecode of the segment - "-1"
item (string): Code of the flexi-metadata item - 0F.14.00.00.00.00.00.00
item value (string): Value assigned to the flexi-metadata - censored

.¹: The markin and markout values identify the segment assigning flexi-metadata. If you want to assign a flexi-metadata for all segments in the EDL, just set the markin and markout to -1.


output forms described as Parameter(type): description - example

<Result> (for assets)
IDAsset (integer): Asset's unique identification number in Etere - 3806
Code (string): Asset's identification code string CLIP3806
Description (string): "Succeeded operation" or "Asset ID not found" - Success

<Result> (for genres)
IDAsset (integer): Asset's unique identification number in Etere - 3806
Code (string): Asset's identification code string - CLIP3806
Genre (string): Genre's name - Indie
Description (string): "Success" or "Error" - Success

<Result> (for artists)
IDAsset (integer): Asset's unique identification number in Etere - 3806
Code (string): Asset's identification code string - CLIP3806
Artist (string): Artist's name - Oasis
Description (string): "Success" or "Error" - Success

<Result> (for asset flexi-metadata)
ID Asset (integer): Asset's unique identification number in Etere - 38063806
item (string): Code of the flexi-metadata item - 0F.14.00.00.00.00.00.00
Description (string):
"Success" or "Error", in the latter case:
§ <Error = 10100> : Flexi item not in a dictionary
§ <Error = 10200> : Invalid flexi item value format
§ <Error = 10300> : Error during insert flexi item
value

- Success

<Result> (for edl headers)
IDAsset (integer): Asset's unique identification number in Etere - 3806
EDL_version (integer): EDL number (between 1 and 9) - 7
Description (string):
"Success" or "Error", in the latter case:
§ <Error = 10000> : Unable to add EDL header
§ <Error = 10003> : Invalid EDL version

 -Success

<Result> (for all rows)
IDAsset (integer): Asset's unique identification number in Etere 3806
Version (integer): EDL number (between 1 and 9) - 7
Mark_In (integer): Starting timecode of the mark - 45000
Mark_Out (integer): Ending timecode of the mark - 55000
Description (integer):
"Success" or "Error", in the latter case:
§ <Error = 10001> : Invalid EDL version or missing
EDL header
§ <Error = 10002> : Unknow n EDL type

- Success

<Result> (for edl flexi-metadata)
IDAsset (integer): Asset's unique identification number in Etere - 3806
EDL_version (integer): EDL number (between 1 and 9) - 7
item (string): Code of the flexi-metadata item - 0F.14.00.00.00.00.00.00
Description (string):
"Success" or "Error", in the latter case:
§ <Error = 10100> : Flexi item not in a dictionary
§ <Error = 10200> : Invalid flexi item value format
§ <Error = 10300> : Error during insert flexi item
value

- Success


Sample XML response:
<Result IDAsset="3806" Code="60" Description="Succeeded operation"/>
<
Result IDAsset="3806" Code="0" genre="pop" Description="Success"/>
<
Result IDAsset="3806" Code="0" genre="rock" Description="Success"/>
<
Result IDAsset="3806" Code="0" artist="Gallagher Noel" Description="Success"/>
<
Result IDAsset="3806" Code="0" artist="Oasis" Description="Success"/>
<
Result IDAsset="3806" item="0F.13.00.00.00.00.00.00" Description="Success"/>
<
Result IDAsset="3806" item="0F.14.00.00.00.00.00.00" Description="Success"/>
<
Result IDAsset="3806" EDL_Version="6" Description="Success"/>
<
Result IDAsset="3806" Version="6" Mark_In="45000" Mark_Out="55000" Description="Success"/>
<
Result IDAsset="3806" Version="6" Mark_In="60000" Mark_Out="70000" Description="Success"/>
<
Result IDAsset="3806" Version="6" Mark_In="75000" Mark_Out="85000" Description="Success"/>
<
Result IDAsset="3806" EDL_Version="6" item="0F.13.00.00.00.00.00.00" Description="Success"/>
<
Result IDAsset="3806" EDL_Version="6" item="0F.14.00.00.00.00.00.00" Description="Success"/>



XSD (XML Schema Definition)
<?xml version="1.0" encoding="utf-8"?>
<
xs:schema id="AssetData" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<
xs:element name="AssetData" msdata:IsDataSet="true" msdata:Locale="en-US">
<
xs:complexType>
<
xs:choice minOccurs="0" maxOccurs="unbounded">
<
xs:element name="Asset">
<
xs:complexType>
<
xs:attribute name="idAsset" type="xs:string" />
<
xs:attribute name="code" type="xs:string" />
<
xs:attribute name="description" type="xs:string" />
<
xs:attribute name="sinopsys" type="xs:string" />
<
xs:attribute name="type" type="xs:string" />
<
xs:attribute name="coduser" type="xs:string" />
</
xs:complexType>
</
xs: element>
<
xs:element name="Genre">
<
xs:complexType>
<
xs:attribute name="idAsset" type="xs:string" />
<
xs:attribute name="code" type="xs:string" />
<
xs:attribute name="description" type="xs:string" />
<
xs:attribute name="group" type="xs:string" />
<
xs:attribute name="genretypedesc" type="xs:string" />
</
xs:complexType>
</
xs:element>
<
xs:element name="Artist">
<
xs:complexType>
<
xs:attribute name="idAsset" type="xs:string" />
<
xs:attribute name="description" type="xs:string" />
<
xs:attribute name="name" type="xs:string" />
<
xs:attribute name="surname" type="xs:string" />
<
xs:attribute name="nationalitycode" type="xs:string" />
</
xs:complexType>
</
xs:element>
<
xs:element name="EDL_Data">
<
xs:complexType>
<
xs:sequence>
<
xs:element name="EDL_Header" minOccurs="0" maxOccurs="unbounded">
<
xs:complexType>
<
xs:attribute name="idAsset" type="xs:string" />
<
xs:attribute name="version" type="xs:string" />
<
xs:attribute name="description" type="xs:string" />
<
xs:attribute name="som" type="xs:string" />
<
xs:attribute name="eom" type="xs:string" />
</
xs:complexType>
</
xs:element>
<
xs:element name="EDL_Row" minOccurs="0" maxOccurs="unbounded">
<
xs:complexType>
<
xs:attribute name="idAsset" type="xs:string" />
<
xs:attribute name="notes" type="xs:string" />
<
xs:attribute name="type" type="xs:string" />
<
xs:attribute name="markin" type="xs:string" />
<
xs:attribute name="markout" type="xs:string" />
<
xs:attribute name="version" type="xs:string" />
<
xs:attribute name="edltype" type="xs:string" />
</
xs:complexType>
</
xs:element>
</
xs:sequence>
</
xs:complexType>
</
xs:element>
</
xs:choice>
</
xs:complexType>
</
xs:element>
</
xs:schema>