Skip to end of metadata
Go to start of metadata

Asset API

Get asset information

Method

Method Name

Returns

getasset

Record set

Input Parameter

Parameter

Description

Type

Required

Sample Input

api_key

A valid API key

String

yes

54592180-7060-4D4B-BC74-2566F4B2F943

assetid

The id of the asset or a list of id's (delimited with a ",")

String

yes

108
or 108,109,etc.

assettype

Type of asset

String

yes

doc = Documents
img = Images
vid = Videos
aud = Audios

Output Value

Name

Description

Sample Output

Response

A result code with the status. If the result is 0 the method was successful.

0

totalassetcountNumbers of records found8

calledwith

The folderid you passed to this method

108

assets

For each asset an asset node is returned with information of the asset

see sample output

Since Razuna 1.4.6 the return also contains the "RAW" metadata fields of each asset in the node <metadata>. If you want to retrieve single metadata field you can use the dedicated getmetadata() method, also.
As of Razuna 1.5.5 (hosted edition since 16.12.2012) the search also returns the collection id(s) the file might be in in the column "colid".

REST: Sample Request

Sample Output

Output format

Remember you can adjust the output dynamically. The API returns JSON by default. For record sets it defaults to a ROW based set, if you need COLUMNS simply append "&__BDQUERYFORMAT=column" to your call. In case, you need JSONP you want to append "&__BDRETURNFORMAT=jsonp&callback=?". In order to retrieve XML (WDDX) you simply need to append "&__BDRETURNFORMAT=wddx".

 

Get renditions of asset

Method

Method Name

Returns

getrenditions

Record set

Input Parameter

Parameter

Description

Type

Required

Sample Input

Version

api_key

A valid API key

String

yes

54592180-7060-4D4B-BC74-2566F4B2F943

 

assetid

The id of the asset or a list of id's (delimited with a ",")

String

yes

108
or 108,109,etc.

 

assettype

Type of asset

String

yes

aud = Audios
img = Images
vid = Videos
doc = Documents* 

*There are no "renditions" for documents. If you have added "additional renditions" then these will be listed!

deprecated as of 1.6.2

Output Value

Name

Description

Sample Output

fields with values

fields with values

see sample output

REST: Sample Request

Sample Output

Output format

Remember you can adjust the output dynamically. The API returns JSON by default. For record sets it defaults to a ROW based set, if you need COLUMNS simply append "&__BDQUERYFORMAT=column" to your call. In case, you need JSONP you want to append "&__BDRETURNFORMAT=jsonp&callback=?". In order to retrieve XML (WDDX) you simply need to append "&__BDRETURNFORMAT=wddx".

Get Metadata of asset

The getasset() method already returns the description and the keyword value for each asset, thus this method only returns the associated XMP metadata values!

Only PDF documents and images contain additional metadata. Obviously this method only works for "doc" and "img"!

Method

Method Name

Returns

getmetadata

Record set

Input Parameter

Parameter

Description

Type

Required

Sample Input

api_key

A valid API key

String

yes

54592180-7060-4D4B-BC74-2566F4B2F943

assetid

The id of the asset or a list of id's (delimited with a ",")

String

yes

108
or 108,109,etc.

assettype

Type of asset

String

yes

doc = Documents (PDF)
img = Images

assetmetadata

Name of metadata field to query

String

yes

headline,city,rights
See the metadata field list below!

Metadata parameters

Documents

Metadata fields

author

rights

authorsposition

captionwriter

webstatement

rightsmarked

Images

Metadata fields

asset_type

subjectcode

creator

title

authorsposition

captionwriter

ciadrextadr

category

supplementalcategories

urgency

description

ciadrcity

ciadrctry

location

ciadrpcode

ciemailwork

ciurlwork

citelwork

intellectualgenre

instructions

source

usageterms

copyrightstatus

transmissionreference

webstatement

headline

datecreated

city

ciadrregion

country

countrycode

scene

state

credit

rights

Output Value

Name

Description

Sample Output

metadata

Your passed fields with values

"values"

REST: Sample Request

Sample Output

Output format

Remember you can adjust the output dynamically. The API returns JSON by default. For record sets it defaults to a ROW based set, if you need COLUMNS simply append "&__BDQUERYFORMAT=column" to your call. In case, you need JSONP you want to append "&__BDRETURNFORMAT=jsonp&callback=?". In order to retrieve XML (WDDX) you simply need to append "&__BDRETURNFORMAT=wddx".

Modify metadata of asset

Method

Method Name

Returns

setmetadata

String

Input Parameter

Parameter

Description

Type

Required

Sample Input

api_key

A valid API key

String

yes

54592180-7060-4D4B-BC74-2566F4B2F943

assetid

The id of the asset or a list of id's (delimited with a ",")

String

yes

108
or a list like 108,109,etc.

assettype

Type of asset

String

yes

doc = Documents
img = Images
vid = Videos
aud = Audios

assetmetadata

 

String

yes

JSON structure of metadata
See the metadata field list below

Metadata parameters

You can pass all or any of the metadata fields in the assetmetadata field as a JSON structure. A example of passing the metadata for images would be (you need to serialize your array in order to pass it in a URL):

Mandatory field

The only mandatory field you need to include is the "lang_id_r" one.

Videos

Metadata fields

 

vid_keywords

 

vid_description

 

lang_id_r

 
file_nameRazuna 1.5.5 (hosted since 11.11.2012)

Documents

Metadata fields

 

file_keywords

 

file_desc

 

lang_id_r

 
file_nameRazuna 1.5.5 (hosted since 11.11.2012)

Audios

Metadata fields

 

aud_keywords

 

aud_description

 

lang_id_r

 
file_nameRazuna 1.5.5 (hosted since 11.11.2012)

Images

Metadata fields

 

img_keywords

 

img_description

 

lang_id_r

 
file_nameRazuna 1.5.5 (hosted since 11.11.2012)

For images you additionally have the option to define the XMP metadata values. The following fields can be used:

Metadata fields

asset_type

subjectcode

creator

title

authorsposition

captionwriter

ciadrextadr

category

supplementalcategories

urgency

description

ciadrcity

ciadrctry

location

ciadrpcode

ciemailwork

ciurlwork

citelwork

intellectualgenre

instructions

source

usageterms

copyrightstatus

transmissionreference

webstatement

headline

datecreated

city

ciadrregion

country

countrycode

scene

state

credit

rights

Output Value

Name

Description

Sample Output

Response

A result code with the status. If the result is 0 the method was successful.

0

MessageStatus MessageMetadata successfully stored

REST: Sample Request

Sample Output

Remove Asset

This method can also be used to remove renditions. Simply pass in the id of the rendition in the assetid parameter.

Method

Method Name

Returns

remove

String

Input Parameter

Parameter

Description

Type

Required

Sample Input

api_key

A valid API key

String

yes

54592180-7060-4D4B-BC74-2566F4B2F943

assetid

The id of the asset or a list of id's (delimited with a ",")

String

yes

108
or a list like 108,109,etc.

Output Value

Name

Description

Sample Output

Response

A result code with the status. If the result is 0 the method was successful.

0

message

Message of the result

see sample output

REST: Sample Request

Sample Output

Move Asset(s)

Availability

The "move" method is available as of Razuna 1.5.5 and on the hosted platform as of February 13th 2013.

Method

Method Name

Returns

move

String

Input Parameter

Parameter

Description

Type

Required

Sample Input

api_key

A valid API key

String

yes

54592180-7060-4D4B-BC74-2566F4B2F943

assetid

The id of the asset or a list of id's (delimited with a ",") or with the keyword "all"

String

yes

108 or a list like 108,109,etc.
If you want to move ALL files in the folder you can use the keyword "all"! 

source_folderThe folder ID where the current files are inStringno
required if you set assetid to "all" 
2566F4B2F943
destination_folderThe folder ID the files should be moved toStringyes54592180

Output Value

Name

Description

Sample Output

Response

A result code with the status. If the result is 0 the method was successful.

0

message

Message of the result

see sample output

REST: Sample Request

Sample Output

Create renditions

Method

Method Name

Returns

createrenditions

String

Input Parameter

Parameter

Description

Type

Required

Sample Input

api_key

A valid API key

String

yes

54592180-7060-4D4B-BC74-2566F4B2F943

assetid

The id of the asset

String

yes

108 

assettype

Type of asset

String

yes

img = Images
vid = Videos
aud = Audios

Note: There are no "renditions" for documents

convertdata

JSON structure of parameters for converting

String

yes

convertdata=[[["convert_to","jpg"],["convert_width_jpg","500"],["convert_height_jpg","374"],["convert_dpi_jpg",""],["convert_wm_jpg",""]]]

colorspace

Colorspace of asset

Images only

Stringno

Examples of Colorspace : HCL, YUV, Gray, Luv etc 

Reference for setting Colorspace values for an asset: 
http://www.imagemagick.org/script/command-line-options.php#colorspace

Note: If in the DAM administration under 'Settings' the 'Image Colorspace' is 'Set to RGB' then it will override this value. Set it back to default if you want this to take precedence.

Parameters for converting

You can pass all or any of the metadata fields in the assetmetadata field as a JSON structure. A example of passing the metadata for images would be (you need to serialize your array in order to pass it in a URL):

The following parameters are valid: (You need to replace the (format) with the format you want to convert to)!

Parameter

Description

Type

Required

Application for

Comment

convert_to

Format to convert to

String

yes

Images, Videos, Audios

All formats are supported that you can find in the Razuna interface!

convert_width_(format)

Width

Number

yes

Images, Video

For no value, just leave empty

convert_height_(format)

Type Height

Number

yes

Images, Video

For no value, just leave empty

convert_dpi_(format)

DPI

Number

yes

Images

For no value, just leave empty

convert_wm_(format)

The ID of the Watermark templateStringyesImagesFor no value, just leave empty

convert_bitrate_(format)

Bitrate of Audio fileNumeryesAudiosAll bitrates are supported as displayed in the Razuna interface.
Note: For FLAC and WMV; Just pass an empty value!

Example: Converting to a JPG

Example: Converting with DPI only

Example: Converting with a Watermark

Example: Converting to many formats

Converting to many formats in one API call is simple. Just include them in the JSON structure, like (we've separated them in the code below for better reading):

Example: Converting with Colorspace

Sample Output

Regenerate asset metadata

Method

Method Name

Returns

regeneratemetadata

Record set

Input Parameter

Parameter

Description

Type

Required

Sample Input

api_key

A valid API key

String

yes

54592180-7060-4D4B-BC74-2566F4B2F943

assetid

The id of the asset or a list of id's (delimited with a ",")

String

yes

108
or 108,109,etc.

assettype

Type of asset

String

yes

doc = Documents
img = Images
vid = Videos
aud = Audios

Output Value

Name

Description

Sample Output

Response

A result code with the status. If the result is 0 the method was successful.

0

Message

Success or error message if error occurred

Metadata successfully stored

 

REST: Sample Request

Sample Output

Get PDF Images Information

Availability

This API method is available in release 1.6.1 and above. Not available for Amazon Web Services(AWS) as PDF images are not generated for AWS.

Method

Method Name

Returns

getpdfimages

Record set

Input Parameter

Parameter

Description

Type

Required

Sample Input

api_key

A valid API key

String

yes

49286DAD4B464CFBB60B3742AF193758

assetid

The id of the asset. Must be a PDF document.

String

yes

EEE8CC192B264D65A85C08990E5E57A1

Output Value

Name

Description

Sample Output

assetid

The original assetid passed

EEE8CC192B264D65A85C08990E5E57A1

name

PDF image name, corresponds to a page in the PDF

Happiness-1.jpg

local_directoryDirectory on machine where images are stored

/Users/scott/razuna_tomcat_1_6_RC_2/tomcat/webapps/razuna/assets/1/0031D211A15B42598580B84B035EBA8C/doc/EEE8CC192B264D65A85C08990E5E57A1/razuna_pdf_images

sizeSize of image in bytes81448
local_url_orgURL to access the image

http://localhost:8080/razuna/assets/1/0031D211A15B42598580B84B035EBA8C/doc/EEE8CC192B264D65A85C08990E5E57A1/razuna_pdf_images/Happiness-1.jpg

REST: Sample Request

Sample Output (No Errors)

Sample Output (If Errors)

  • No labels