Open source media management and distribution platform
This call gives a list back with all of the available assets that the actual search parameters enabled.
/asset [GET]
|
Parameter |
Type |
Description |
Method |
Obligatory/Optional |
|
limit |
numeric |
maximum number of getting items. The limit has to be <= 200 |
GET |
obligatory |
|
offset |
numeric |
<limit> number items from <offset> |
GET |
optional |
|
cql |
string |
A CQL search instruction is a complex search method. This field is exclusive to all other search and order_ * parameters. OR CQL is set to the search and order_ * parameters. If both are set there an error will be returned. For more information about the operation of CQL, see document below TO, TO CQL.doc or chapter in this document "CQL - Contextual Query Language" |
GET |
optional |
|
order_by |
string |
Sort the list on a field e.g.: order_by=changed Possible sorting fields: group_id, owner_id, provider_id, reference_id, changed, numofviews, and the dublin core fields and the qualified dublin core fields (see this document), and the metadata_tags (see this document) |
GET |
optional |
|
order_direction |
string |
Ascending ('asc') descending ('desc') sorting. Example: order_direction=desc |
GET |
optional |
|
granted |
bool |
The symbol is a switch which granted access to the results determined. By setting a false, only the assets returned to the user has access. When the value "true" all assets are always returned, regardless of whether the user has access or not. In asset information in the result is an additional field called "granted", it contains each asset or the user had access. In both settings, this 'granted' field returned. The default value for granted is 'true'. |
GET |
optional |
|
is_public_list |
bool |
"is_public_list" determine whether the list for everyone to see. This setting has to do with the setting of an asset isprivate. If an asset isprivate true (TRUE), and there is a setting of "is_public_list '= true, then the asset does not come back with the results. Even though the user the owner of the asset which isprivate = 'TRUE', will not return to 'is_public_list' = true. In the 'false' setting of 'is_public_list' is the value of 'isprivate' ignored. |
GET |
optional (default is false) |
|
hide_empty_assets |
bool |
"hide_empty_assets" determine whether the result contain assets withouot mediafile or not. With the value 'true' all the assets without mediafile will be skipped. |
GET |
optional |
|
asset_id, group_id, owner_id, provider_id, reference_id, mediafile_duration, mediafile_container_type, filename, mime_type |
string |
All of these fields can be in the searches. example: owner_id=test&group_id=test2 owner_id[]=test&owner_id[]=t2 |
GET |
optional |
|
search in the dublin core fields: type, language, title, creator, description, date, format, publisher, subject, contributor, identifier, source, relation, coverage_temporal, coverage_spatial, rights |
string |
All of these fields can be in a search. example:
|
|
optional |
|
search in the qualified dublin core fields: isreferencedby, title_alternative, description_abstract, created, issued, hasformat, isformatof, format_medium, format_extent, license, rightsholder |
string |
All of these fields can be in a search. |
|
optional |
|
... |
string |
any metadata tags added in the asset |
GET |
optional |
|
<field name>_match |
string |
By default, all search matches "contains", but these can be adjusted using <fieldname> _match = <type>. Choice of: 'exact', 'contains' and 'begin' Example: title=test&title_match=exact |
GET |
optional |
|
operator |
operator |
Enter your search with "and" or "or". Example: operator=or |
GET |
optional; standard value = 'and' |
|
videotimestamp, videotimestampmodified
(the search syntax for all of the fields: date (dc) created (qdc) issued (qdc) changed (asset) ) |
ISO 8601 datum/time period |
This makes it possible within a time period to search. The format for datetime is YYYY-MM-DD HH: MM: SS. Where only the year is required. If you want to see results from 2006-2008, were you created assets, you can use: videotimestamp=2007-04-01 00:00:00|2007-05 This example shows all results of April in 2007. The same result is reached with |
GET |
optional |
|
coll_id, coll_id[] |
alphanumeric |
Gives back assets just for these collection(s). You can gives more collections with more coll_id using [] (e.g. coll_id[]=121&coll_id[]=122). |
GET |
optional |
|
user_id, aut_user_id |
string |
The current user is used for authorization. The aut_ * fields affect the [granted] field in the output, and the parameter "granted" was given the number of records. |
GET |
optional |
|
aut_group_id, aut_group_id[] |
string |
The group(s) where the current user is in, is used for authorization. |
GET |
optional |
|
aut_domain |
string |
De domain of the user for authorisation. |
GET |
optional |
|
aut_realm |
string |
The realm of the user for authorisation. |
GET |
optional |
|
is_app_admin |
boolean |
Indicates whether the rest call is called by admin. This flag ensures that the administrator can see "not appropriate content". |
GET |
optional; default=’false’ |
|
fav_user_id |
string |
If fav_user_id will be passed, then only this favorites of the user will be searched. If there were no search parameters are set, this function will return all assets that favorite of this user. |
GET |
optional |
/asset?limit=200&order_by=created&order_direction=desc&title[]=test
/asset?limit=2&offset=3
<items>
<item id="1">
<asset_id>10061</asset_id>
<app_id>1</app_id>
<provider_id></provider_id>
<owner_id>av-user-naa</owner_id>
<group_id>beeldengeluid</group_id>
<videotimestamp>2004-09-10 22:22:08</videotimestamp>
<videotimestampmodified>2004-09-10 22:22:08</videotimestampmodified>
<play_restriction_start></play_restriction_start>
<play_restriction_end></play_restriction_end>
<locked>FALSE</locked>
<reference_id></reference_id>
<isprivate>FALSE</isprivate>
<is_protected>FALSE</is_protected>
<dublin_core>
<type>Video</type>
<language>EN</language>
<title>kurkentrekker.mpg</title>
<creator>naa</creator>
<publisher>naa</publisher>
<description>this kurkentrekker.mpg of naa was n/naa/mpeg/kurkentrekker.mpg</description>
<date>2004-09-10 22:22:08</date>
<format></format>
<subject></subject>
<contributor></contributor>
<identifier></identifier>
<source></source>
<relation></relation>
<coverage_temporal></coverage_temporal>
<coverage_spatial></coverage_spatial>
<rights></rights>
</dublin_core>
<qualified_dublin_core>
<title_alternative></title_alternative>
<description_abstract></description_abstract>
<created></created>
<issued></issued>
<hasformat></hasformat>
<isformatof></isformatof>
<format_medium></format_medium>
<format_extent></format_extent>
<license></license>
<rightsholder></rightsholder>
<isreferencedby></isreferencedby>
</qualified_dublin_core>
</item>
<item id="2">
<asset_id>10062</asset_id>
<app_id>1</app_id>
<provider_id></provider_id>
<owner_id>av-user-naa</owner_id>
<group_id>beeldengeluid</group_id>
<videotimestamp>2004-09-10 22:22:08</videotimestamp>
<videotimestampmodified></videotimestampmodified>
<play_restriction_start></play_restriction_start>
<play_restriction_end></play_restriction_end>
<locked>FALSE</locked>
<reference_id></reference_id>
<isprivate>FALSE</isprivate>
<is_protected>FALSE</is_protected>
<created>2008-04-07 09:53:44</created>
<changed>2008-04-17 23:44:44</changed>
<dublin_core>
<type>Video</type>
<language>EN</language>
<title>interculturele-mpeg1-vhs.mpg</title>
<creator>naa</creator>
<publisher>naa</publisher>
<description>this interculturele-mpeg1-vhs.mpg of naa was n/naa/mpeg/interculturele-mpeg1-vhs.mpg</description>
<date>2004-09-10 22:22:08</date>
<format></format>
<subject></subject>
<contributor></contributor>
<identifier></identifier>
<source></source>
<relation></relation>
<coverage_temporal></coverage_temporal>
<coverage_spatial></coverage_spatial>
<rights></rights>
</dublin_core>
<qualified_dublin_core>
<title_alternative></title_alternative>
<description_abstract></description_abstract>
<created></created>
<issued></issued>
<hasformat></hasformat>
<isformatof></isformatof>
<format_medium></format_medium>
<format_extent></format_extent>
<license></license>
<rightsholder></rightsholder>
<isreferencedby></isreferencedby>
</qualified_dublin_core>
</item>
</items> |
Field |
Description |
|
items |
Full description of the asset including the metadata in XML-format |
Comments
CQL AND/OR precedence
Fri, 01/15/2010 - 12:12 — BoyNote that while the CQL spec says: "Boolean operators all have the same precedence; they are evaluated left-to-right." <http://www.loc.gov/standards/sru/specs/cql.html> MediaMosa DOES give higher precedence to the AND operator, so:
(title = 'x' OR description = 'X' AND vpx.owner_id = 'Y')
will be interpreted as:
(title = 'x' OR (description = 'X' AND vpx.owner_id = 'Y'))
NOT as:
((title = 'x' OR description = 'X') AND vpx.owner_id = 'Y')