POST search_metadata

Given some wine metadata, search against your collection and return all matching images.

Resource URL

https://wineengine.tineye.com/<company>/rest/search_metadata/

Notes

All IDs, names, types and tokens are combined using an AND operator and used to perform a metadata search again the whole collection. The collection images containing all these query words are returned.

Note that the miscellaneous wine info and the text tokens should be separated using commas.

Parameters

In addition to the Common parameters there are:

Key

Description

image_id (optional)

The image ID to search for.

variety_type (optional)

The wine variety to search for.

vintage_year (optional)

The wine vintage to search for.

color_type (optional)

The wine color to search for.

region_name (optional)

The wine region to search for.

country_name (optional)

The wine country to search for.

misc_info (optional)

The comma separated miscellaneous wine info to search for.

text_tokens (optional)

The comma separated text tokens to search for.

name_filter (optional)

Return only matches whose names match this filter (see Name Filtering for details).

path_filter (optional)

Return only matches whose paths match this filter (see Name Filtering for details).

offset (optional)

The offset of results from the start, defaults to 0.

limit (optional)

The maximum number of matches that should be returned, defaults to 10. A value of 0 indicates no limit.

Request examples

curl https://wineengine.tineye.com/<company>/rest/search_metadata/   \
     -F "variety_type=tempranillo"                                   \
     -F "vintage_year=2016"                                          \
     -F "misc_info=sparkling organic"

Response examples

JSON

{
    "method": "search_metadata",
    "status": "ok",
    "error": [],
    "result": [
        {
            "filepath": "image01.jpg"
        },
        {
            "filepath": "image02.jpg"
        },
        {
            "filepath": "image03.jpg"
        }
    ],
    "stats": {
        "total_results": 3,
        "total_filtered_results": 3,
        "total_returned_results": 3,
        "time_search_metadata": 4.7,
        "time_total": 5.04
    }
}

XML

<?xml version="1.0" encoding="utf-8"?>
<data>
    <method>search_metadata</method>
    <status>ok</status>
    <error/>
    <result>
        <item>
            <filepath>image01.jpg</filepath>
        </item>
        <item>
            <filepath>image02.jpg</filepath>
        </item>
        <item>
            <filepath>image03.jpg</filepath>
        </item>
    </result>
    <stats>
        <total_results>3</total_results>
        <total_filtered_results>3</total_filtered_results>
        <total_returned_results>3</total_returned_results>
        <time_search_metadata>4.7</time_search_metadata>
        <time_total>5.04</time_total>
    </stats>
</data>