A query to the media database for a list of media assets. The query returns an XML-document with short descriptions of media assets in the whole database or a certain folder. Graphic templates have the mime_type
field with the value 10
.
GET http://<IP_ADDR>:7901/storage/<NAME>[/<FOLDER>[/<FOLDER>...]][?format=val[&datetime=val...][&mimetype=val...]]
An example of a server response to a media database query in StoredTree mode:
<StoredTree query_root=""> <Folder name=""> <Clip link_id="0" finalized="true"> <Attr name="bps">16</Attr> <Attr name="channels">2</Attr> <Attr name="derived_from">CityViews2 HD</Attr> <Attr name="frame_time">0.0400000000</Attr> <Attr name="frames">3425</Attr> <Attr name="height">1080</Attr> <Attr name="orig_name">CityViews2 HD</Attr> <Attr name="orig_type">3</Attr> <Attr name="sample_rate">48000</Attr> <Attr name="width">1920</Attr> <Attr name="first_frame">0</Attr> <Attr name="last_frame">3425</Attr> <Attr name="title">CityViews3</Attr> <Attr name="create_time">2018-03-27T10:26:30</Attr> <Attr name="rec_time">2016-12-17T16:15:14</Attr> </Clip> <Clip link_id="3" finalized="true"> <Attr name="bps">16</Attr> <Attr name="channels">2</Attr> <Attr name="derived_from">Hockey</Attr> <Attr name="frame_time">0.0400000000</Attr> <Attr name="frames">1501</Attr> <Attr name="height">1080</Attr> <Attr name="orig_name">Hockey</Attr> <Attr name="orig_type">3</Attr> <Attr name="sample_rate">48000</Attr> <Attr name="width">1920</Attr> <Attr name="first_frame">0</Attr> <Attr name="last_frame">1501</Attr> <Attr name="title">Hockey</Attr> <Attr name="create_time">2018-03-27T14:13:15</Attr> <Attr name="rec_time">2016-12-18T01:14:24</Attr> </Clip> <Folder name="New Folder"/> <Folder name="New Folder 1"/> </Folder> </StoredTree> </xml>
An example of a server response to a media database query in the MAM mode:
<mam> <asset> <id>CityViews3</id> <dir/> <length>00:02:17</length> <hires> $(video_path)/media/CityViews2_HD-NID0-3/CityViews2_HD.avi </hires> <proxy> $(video_path)/proxy/CityViews2_HD-NID0-19/CityViews2_HD_lrv.avi </proxy> </asset> <asset> <id>Hockey</id> <dir/> <length>00:01:00.04</length> <hires>$(video_path)/media/Hockey-NID3-51/Hockey.avi</hires> </asset> </mam>
An example of a server response to a media database query in the Folderlist mode:
<StoredTree query_root=""> <Folder name=""> <Folder name="New Folder"/> <Folder name="New Folder 1"/> </Folder> </StoredTree>
Query examples:
A query to retrieve detailed information on the object (including names of parameters for graphic templates). The query returns an XML-document.
GET http://<IP_ADDR>:7901/storage/<NAME>@<TITLE|NS:ID>
Since version 2.9.69, TITLE for all quieries can be replaced by a namespace:id
pair, where namespace
is the key field name, and id
is a unique value. For example:
GET http://<IP_ADDR>:7901/storage/<NAME>@house_number:H12345
GET http://<IP_ADDR>:7901/storage/<NAME>@<TITLE|NS:ID>
An example of server response to a request to the media database for detailed information on an object:
<Clip folder="clips" hires="$(video_path)/media/CityViews2_HD-NID0-3/CityViews2_HD.avi" proxy="$(video_path)/proxy/CityViews2_HD-NID0-19/CityViews2_HD_lrv.avi" archive="" link_id="0" finalized="true"> <Marker uid="1" pos="1929"> <Attr name="user"/> <Attr name="title"/> <Attr name="comment">111222333</Attr> <Attr name="track">General</Attr> <Attr name="keywords"/> <Attr name="rating">0</Attr> </Marker> <Segment seg_num="1" seg_name="Seg1" start_frame="0" duration="150"> <title>Seg1</title> <title>333222111</title> <track>Segments</track> <rating>0</rating> </Segment> <Attr name="bps">16</Attr> <Attr name="channels">2</Attr> <Attr name="derived_from">CityViews2 HD</Attr> <Attr name="frame_time">0.0400000000</Attr> <Attr name="frames">3425</Attr> <Attr name="height">1080</Attr> <Attr name="orig_name">CityViews2 HD</Attr> <Attr name="orig_type">3</Attr> <Attr name="sample_rate">48000</Attr> <Attr name="width">1920</Attr> <Attr name="first_frame">0</Attr> <Attr name="last_frame">3425</Attr> <Attr name="title">CityViews3</Attr> <Attr name="create_time">2018-03-27T10:26:30</Attr> <Attr name="rec_time">2016-12-17T16:15:14</Attr> </Clip>
A certain XML field value may be retrieved in a following way:
GET http://<IP_ADDR>:7901/storage/<NAME>@<TITLE|NS:ID>/GETUSERFIELDS[?field=ns:name]
NS
is the key field name and ID
is a unique value set in the field.ns:name
format (set in the metadata schema).The request returns media data (MP4 or HLS).
GET http://<IP_ADDR>:7901/storage/<NAME>@<TITLE|NS:ID>[/PVW]/<WPN>
NS
is the key field name and ID
is a unique value set in the field.HTTP ERROR 500
. If a WebProxy copy with a specified profile has not been created earlier for this asset, it will be generated in real time. This process may take some time.Retrieving the web proxy version (download by the link):
GET http://<IP_ADDR>:7901/storage/<NAME>@<TITLE|NS:ID>/WP1
Viewing the web proxy version (the link opens the file in a browser):
The <video controls=“true”></video>
tag is used for displaying.
GET http://<IP_ADDR>:7901/storage/<NAME>@<TITLE|NS:ID>/PVW/WP1
DELETE http://<IP_ADDR>:7901/storage/<NAME>@<TITLE|NS:ID>
Detailed description of the function of XMP metadata batch load to MAM via Metadata Connectors. Added in version 2.0.60.
PUT http://<IP_ADDR>:7901/storage/<NAME>?connector=<CONNECTOR_NAME>
POST http://<IP_ADDR>:7901/storage/<NAME>@<TITLE|NS:ID>?command=<COMMAND_NAME>[¶m=val...]
NS
is the key field name and ID
is a unique value set in the field.http://localhost:7901/storage/Storage_2_MAM@$(title)?command=BV_EXPORT_VERSION
. Added in version 2.8.0. Export of versions with an ISARCHIVED attribute is implemented by a simple REST call of BV_EXPORT_VERSION. When exporting via the On Delete flag trigger, note that On Delete is called when the clip is already deleted from the folder and an attempt to access it using a normal title search will result in an “Object not found” error. While the trigger is running, it keeps the clip “open” and the clip is not deleted yet. Thus, you can access such a clip by using the “handle” name space and “Open handle” as an identifier - the variable available in the trigger that is the identifier of the opened file. An example of a REST request: http://127.0.0.1:7901/storage/Storage_1@$(title)?command=BV_EXPORT_VERSION&ns=handle&id=$(handle)
A request to retrieve a PNG thumbnail of the media asset (including parametrised graphics templates) for any specified frame. The request returns a PNG image. Added in version 2.3.63.
GET http://<IP_ADDR>:7901/storage/<NAME>@<TITLE>/GETICON[?[pos=FRM][&dur=FRM][&w=PX][&h=PX][¶m=NAME:VAL[¶m=NAME:VAL]]]
All parameters and values must be encoded to URL Encode if they contain any of the following special characters: ! * ‘ ( ) ; : @ & = + $ , / ? % # [ ]
.
Use the %0a character to create a new line:
http://127.0.0.1:7901/storage/Storage_1@g1/GETICON?param=Text:This%20is%20sample%20text%0anew%20line%20here
Use the “\\” и “\/“ escape sequence to pass a «\» or«/» character as a part of a clip title or folder name:
http://127.0.0.1:7901/storage/Storage_1@g%5c%2f1/GETICON?param=Text:This%20is%20sample%20text%0anew%20line%20here http://127.0.0.1:7901/storage/Storage_1/qq%5c%2faa