Logo Help Center

Elvis 5 SOAP API - search

Elvis 5 SOAP API - search

Below is an example request and response.

Note: The wrapping SOAP envelope and authentication header have been omitted to make the samples easier to read. Detailed documentation about each of the elements and their possible values is provided in the WSDL.

Search request body

<e:searchRequest xmlns:e="http://www.elvisdam.com/xmlns/elvis/webservice/1.0"
    xmlns:q="http://www.elvisdam.com/xmlns/elvis/query/1.0">
    <e:query>
        <!--
            Any of the supported query types can be used here
        -->
        <q:boolQuery>
            <q:should>
                <q:queryStringQuery>example</q:queryStringQuery>
            </q:should>
            <q:must>
                <q:termQuery>
                    <q:field>assetDomain</q:field>
                    <q:value>video</q:value>
                </q:termQuery>
            </q:must>
            <q:mustNot>
                <!--
                    Supported formats for date searches 
                    (example below uses yyyy-MM-dd HH:mm:ss Z):
                    yyyy-MM-dd'T'HH:mm:ssZ
                    yyyy-MM-dd'T'HH:mm:ss
                    HH:mm:ss
                    EEE MMM dd HH:mm:ss z yyyy
                    Nr of milliseconds since 1970-01-01
                -->
                <q:betweenQuery>
                    <q:field>assetCreated</q:field>
                    <q:lowValue>2008-05-01 00:00:00+0100</q:lowValue>
                    <q:highValue>2008-11-02 00:00:00+0100</q:highValue>
                </q:betweenQuery>
            </q:mustNot>
        </q:boolQuery>
    </e:query>
    <!--
        Optional, when not specified default sorting by score is applied
    -->
    <e:sorting>
        <e:sort descending="true">
            <e:field>score</e:field>
        </e:sort>
    </e:sorting>
    <!--
        First result to return, default value is 0 (first).
    -->
    <e:firstResult>0</e:firstResult>
    <!--
        Max results to return, set to 0 to return all results (take care, 
        this may take some time and slow down the server if your search 
        finds millions of results).
    -->
    <e:maxResultHits>100</e:maxResultHits>
    <!--
        Fields to be returned, do not specify to return all available metadata.
        Note that only metadata stored in the index can be returned in a search response.
        Other metadata has to be retrieved using a separate webservice retrieveRequest.
    -->
    <e:metadataToReturn>
        <e:field>created</e:field>
        <e:field>fileSize</e:field>
        <e:field>folderPath</e:field>
        <e:field>tags</e:field>
    </e:metadataToReturn>
</e:searchRequest>

Search response body

<e:searchResponse 
    xmlns:e="http://www.elvisdam.com/xmlns/elvis/webservice/1.0" 
    firstResult="0" maxResultHits="100" totalHits="2">
    <e:hit>
        <e:id>5GWo83VRK8x95MeAw0rYZL</e:id>
        <e:name>demoMovie.mp4</e:name>
        <e:filename>demoMovie.mp4</e:filename>
        <e:assetPath>/Demo Zone/Video/Movie trailers/
                                  demoMovie.mp4</e:assetPath>
        <e:assetDomain>video</e:assetDomain>
        <e:assetType>mp4</e:assetType>
        <e:thumbnailUrl>http://...</e:thumbnailUrl>
        <e:previewUrl>http://...</e:previewUrl>
        <e:originalUrl>http://...</e:originalUrl>
        <e:originalUncPath>\\server\share\Demo Zone\Video\
                           Movie trailers\ demoMovie.mp4</e:originalUncPath>
        <e:permissions>VPUMECD</e:permissions>
        <e:metadata>
            <e:field name="extension">
                <e:value>mp4</e:value>
            </e:field>
            <e:field name="fileSize">
                <e:value>10973908</e:value>
            </e:field>
            <e:field name="tags">
                <e:value>demo</e:value>
                <e:value>movie</e:value>
            </e:field>
            <e:field name="folderPath">
                <e:value>/Demo Zone/Video/Movie trailers</e:value>
            </e:field>
            <e:field name="created">
                <e:value>2008-09-30 14:39:14</e:value>
            </e:field>
        </e:metadata>
    </e:hit>
    <e:hit>
        <e:id>5GWo83VRK8x95MeAw0rYZL</e:id>
        <e:name>demoMovie-script.txt</e:name>
        <e:assetPath>/Demo Zone/Documents/demoMovie-script.txt</e:assetPath>
        <e:assetDomain>text</e:assetDomain>
        <e:assetType>txt</e:assetType>
        <e:previewUrl>http://...</e:previewUrl>
        <e:originalUrl>http://...</e:originalUrl>
        <e:originalUncPath>\\server\share\Demo Zone\Documents\
                           demoMovie-script.txt</e:originalUncPath>
        <e:highlightedText>velent aciniam corper sim et dolore
                           &lt;b&gt;flower&lt;b&gt; amet commy
                           non ulla facincipit ver irit</e:highlightedText>
        <e:permissions>VPUMECD</e:permissions>
        <e:metadata>
            <e:field name="extension">
                <e:value>mp4</e:value>
            </e:field>
            <e:field name="fileSize">
                <e:value>52350</e:value>
            </e:field>
            <e:field name="folderPath">
                <e:value>/Demo Zone/Documents</e:value>
            </e:field>
            <e:field name="created">
                <e:value>2008-08-15 16:23:18</e:value>
            </e:field>
        </e:metadata>
    </e:hit>
</e:searchResponse>

Document history

  • 19 April 2017: Removed date/time examples that don't use 'T' from Search request body.
Was this article helpful?
0 out of 0 found this helpful / Created: / Updated:
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.