Filters in Specific Fields - Examples


AssetType


Values: Image, Video, Audio, Adobe, Document, Other


    GET GET /assets?filters=AsseType+EQ+Image
    will return all the assets that are images


Attribute Value


The "attributeId" in the given example is the id of the attribute you're filtering by. You can get this information by making a request to GET /attributes and caching the results on your end.


    GET /assets?filters=(Attributes/ANY(a: a EQ '{"Key":"attributeId","Value":"true"}'))
    will return only the assets that have the boolean custom attribute set to true


    Full example of what the request should look like with string escaped:

    GET /assets?filters=(Attributes%2FANY(a:+a+EQ+%27%7B%22Key%22:%22bc0b
    da55-b74e-4776-9a7e-9b33fe1d469f%22,%22Value%22:%22true%22%7D%27))


AverageRating


The possible values for average rating are: 1, 2, 3, 4, 5 and 0 (for none)

    GET /assets?filters=AverageRating+EQ+4
    will return the assets with an average rating of 4


CognitiveColor


The possible values for cognitive colors are: red, orange, yellow, green, blue, teal, purple, pink, brown, grey, black, and white.

    GET /assets?filters=CognitiveColor+EQ+Teal
    will return the assets whose cognitive color is teal


CreatedBy


The userId in the given example is the id of the user you're filtering by. You can get this information by making a request to GET /users and caching the results on your end.


    GET /assets?filters=(CreatedBy+EQ+'userId')
    will return only the assets that were uploaded by that user


Full example of what the request should look like with string escaped:

    GET /assets?filters=(CreatedBy+EQ+%27b723be45-b497-4e4b-80d7-62abc
    38824db%27)


DateApproved


    GET /assets?filters=(DateApproved+GT+2019-04-04T00:00:54.964Z+
    AND+Status+EQ+0)

    will return all the assets that were approved since the specified date and are still
    approved


DateCheckedOut


    GET /assets?filters=(DateCheckedOut+GT+2019-04-01T19:11:24.323Z+AND+
    Status+EQ+9)

    will return all the assets that were checked out since the date given


    GET /assets?filters=((DateCheckedOut+GT+2019-04-01T19:11:24.323Z+AND+
    Status+EQ+9)+AND+CheckedOutByUserId+EQ+%274c1e70fd-d466-43d4-8afb-
    a52487d2463f%27)

    will return all the assets that were checked out since the date given by the user with
    user id '4c1e70fd-d466-43d4-8afb-a52487d2463f'


DatePendingApproval


    GET /assets?filters=(DatePendingApproval+GT+2018-04-05T00:07:33.854Z+AND+
    Status+EQ+2)

    will return all the assets that have pending status since the date given


DateRejected


    GET /assets?filters=(DateRejected+GE+2019-04-01T00:00:00.000Z+AND+
    DateRejected+LE+2019-04-04T23:59:59.000Z)

    will return all the assets that were rejected between the two dates given


DateUploaded


    GET /assets?filters=(DateUploaded+GE+2019-04-01T00:00:00.000Z+AND+
    DateUploaded+LE+2019-04-05T23:59:59.000Z)

    will return all the assets that were uploaded between the two dates given


File Extension


    GET /assets?filters=(FileExtension+EQ+%27BMP%27)
    will return all the assets that have file extension 'BMP'


Status


The possible values are: 0 (approved), 2 (pending), 5 (rejected), 7 (expired), 9 (checked out)

    GET /assets?filters=(Status+EQ+7)
    will return all the assets that are expired


Text in Images


    GET /assets?count=25&filters=(ISMATCH(%27mediavalet%27,
    %27cognitiveTextInImage%27))

    will return all the assets that are found with 'mediavalet' in cognitive text in images