Media search query for MediaAssetFile entity

This search with the parameter "mediaQuery" for MediaAssetFile entity is available since the Version 8.0.00.00.

The report "bySearch" for the entity MediaAssetFile provides searching and finally result listing of the data entity MediaAssetFile. Its specific parameter "mediaQuery" is used to search the result directly with the search fields defined in Media Manager, while the specific parameter "query" is for the usual search with the Field entity defined in PIM repository, just like other general objects in system.

This chapter introduces the report "bySearch" with the parameter "mediaQuery".

Currently it is only supported by PIM Core with Media Manager and the data access is not per PIM database, but per the connector API.

Syntax for mediaQuery

The value for the parameter mediaQuery contains three components: FIELD, OPERATOR, CONTENT.

Syntax
mediaQuery: <FIELD> <OPERATOR> <CONTENT>

The following table indicates all possible value for FIELD, OPERATOR and corresponding CONTENT.

FIELD

OPERATOR

CONTENT

Example search content

Corresponding PIM Desktop search fieldname (en)

*

contain

Character

My search value.

Quick search

F_IMGKOHI.IMHI_IHIE_ID

is

Category ID

03110000%

Category

F_IMGKOMP.PKOM_BEZ

is/contain/begin/empty

Character

My search value (If 'empty' operator is used no search value is needed)

Name

FULLTEXT

contains

Character

My search value

(Text search) Document

FILEName

is/contain/begin/empty

Character

My search value (If 'empty' operator is used no search value is needed)

File name

F_ATTRIBUT.ATTR_NAME

is/contain/begin/empty

Character

My custom defined state (If 'empty' operator is used no search value is needed)

State

F_IMGKOMP.PKOM_STATUS

is

-/s/a

s -> Locked

a -> Archived

- -> Free

Status

F_IMGKOMP.PKOM_TYPE

is

9 values

docus

images

videos

sounds

fonts

internet

profiles

common

drawings

Medias type

F_IMGKOMP.PKOM_FERTIG

is

True/False

false

Finished flag

F_IMGKOMP.PKOM_INARBEIT

is

True/False

true

In progress

F_IMGKOMP.PKOM_PSIZE

equal/less/greater

Number

10000000

Size in bytes

F_IMGKOMP.PKOM_RESOL

equal/less/greater

Number

96

Resolution

F_IMGKOMP.PKOM_COLS

equal/less/greater

Number

24

Color depth

F_IMGMEMO.PIMG_MEMO

contain/begin

Character

My search value (If 'empty' operator is used no search value is needed)

Memo

F_IMGKOMP.PIMG_FARBRAUM

is/contain/begin

Character

rgb

Color space

F_IMGKOMP.PIMG_VERS_NR

equal/less/greater

Number

2

Version number

F_IMGKOMP.PIMG_ANG_AM

is/before/after

Date

20.11.2008 (dd.MM.yyyy)

Media asset created

F_IMGKOMP.PIMG_LASTMOD_TIMESTAMP

is/before/after

Date

20.11.2008 (dd.MM.yyyy)

Media asset last modification date

F_IMGKOMP.PKOM_LASTDATE

is/before/after

Date

20.11.2008 (dd.MM.yyyy)

Last modification date of the source file of the media asset.

Last file modification date.

F_IMGKOMP.PKOM_PNR

is/contain/begin

Character

D030001315183

Id

F_IMGKOMP.PIMG_PREVIEW_STATE

equal/less

4 values

Special case only this 4 combinations are allowed:

No preview: OPERATOR 'less' with '5'

No read only preview: OPERATOR 'less' with '9'

Error creating preview: OPERATOR 'equal' with '0 or 6'

Preview generation queued: OPERATOR 'equal' with CONTENT '3 or 4 or 7 or 8'

Preview version

NUMBER_OF_GROUP_ASSIGNMENT

equal/greater

Number

1

Number of group assignments

F_IMGITEM.IMI_ITEMxx (text type property field)

is/contain/begin

Character

My search value

Itemfield type text

F_IMGITEM.IMI_ITEMxx (list type property field)

is

List values

My selected list value

Itemfield type list

F_IMGITEM.IMI_ITEMxx (bool type property field)

is

True/False

true

Itemfield type bool

F_IMGITEM.IMI_ITEMxx (date type property field)

equal/less/greater

Date

09.08.2013

Itemfield type date

F_IMGITEM.IMI_ITEMxx (int type property field)

equal/less/greater/lessequal/greaterequal

Number

4

Itemfield type int

F_IMGITEM.IMI_ITEMxx (real type property field)

equal/less/greater/lessequal/greaterequal

Number

3.5

Itemfield type real

F_IMGITEM.IMI_ITEMxx (multiselect list type property field)

contain

Listvalues

My selected list value

Itemfield type multiselect list

Examples

Search all media asset files whose filename contain "test"

Rest Call
curl -u rest:heiler -H "Accept: application/json" -X GET http://localhost:1512/rest/V1.0/list/MediaAssetFile/bySearch?mediaQuery= FILEName contain test &fields=MediaAssetFile.Identifier,MediaAssetFileAttribute.Filename

The following JSON object is returned:

{
"cacheId": "20150812_171149_0",
"entityIdentifier": "MediaAssetFile",
"totalSize": 79,
"startIndex": 0,
"pageSize": 100,
"rowCount": 79,
"columnCount": 0,
"columns": [],
"rows": [
{
"object": {
"id": "911000107072",
"label": "Media asset file 911000107072"
},
"values": [
"D11000107072",
"test2.png"
]
},
...
]
}