POST update_metadata¶
Update the metadata for a list of images already present in your collection.
Resource URL¶
https://wineengine.tineye.com/<company>/rest/update_metadata/
Performance¶
The WineEngine API can perform one add, update or delete request at a time. Any extra requests submitted will be queued up for processing as slots become available.
Each request accepts maximum 10 filepaths.
Note that an image’s metadata can be completely cleared by setting its image_id to ‘{}’ string.
Parameters¶
Filepath¶
Key |
Description |
---|---|
filepath |
A filepath under which the image file was added to the collection. |
image_id (optional) |
An ID under which the image file will be stored in the collection. Any string or integer can be used as image ID, up to 255 characters. |
variety_type (optional) |
A wine variety to be stored along with the image. This overwrites the variety extracted automatically from the wine label. |
vintage_year (optional) |
A wine vintage to be stored along with the image. This overwrites the vintage extracted automatically from the wine label. |
color_type (optional) |
A wine color to be stored along with the image. This overwrites the color extracted automatically from the wine label. |
region_name (optional) |
A wine region to be stored along with the image. This overwrites the region extracted automatically from the wine label. |
country_name (optional) |
A wine country to be stored along with the image. This overwrites the country extracted automatically from the wine label. |
Filepaths¶
Key |
Description |
---|---|
filepaths[0] |
A filepath under which the first image file was added to the collection. |
image_ids[0] (optional) |
An ID under which the first image file will be stored in the collection. |
variety_types[0] (optional) |
A wine variety to be stored along with the first image. |
vintage_years[0] (optional) |
A wine vintage to be stored along with the first image. |
color_types[0] (optional) |
A wine color to be stored along with the first image. |
region_names[0] (optional) |
A wine region to be stored along with the first image. |
country_names[0] (optional) |
A wine country to be stored along with the first image. |
… |
… |
filepaths[n] (optional) |
A filepath under which the last image file was added to the collection. |
image_ids[n] (optional) |
An ID under which the last image file will be stored in the collection. |
variety_types[n] (optional) |
A wine variety to be stored along with the last image. |
vintage_years[n] (optional) |
A wine vintage to be stored along with the last image. |
color_types[n] (optional) |
A wine color to be stored along with the last image. |
region_names[n] (optional) |
A wine region to be stored along with the last image. |
country_names[n] (optional) |
A wine country to be stored along with the last image. |
Request example¶
curl https://wineengine.tineye.com/<company>/rest/update_metadata/ \
-F "filepath=path/folder/1.jpg" \
-F "image_id=dd8d-6dc8-bf3f" \
-F "variety_type=Chardonnay" \
-F "vintage_year=2024"
or
curl https://wineengine.tineye.com/<company>/rest/update_metadata/ \
-F "filepaths[0]=path/folder/1.jpg" \
-F "image_ids[0]=6558512785" \
-F "color_types[0]=Red Wine" \
-F "region_names[0]=Niagara" \
-F "country_names[0]=Canada" \
-F "filepaths[1]=path/folder/2.jpg" \
-F "image_ids[1]=9658451257" \
-F "color_types[1]=White Wine" \
-F "region_names[1]=Maipo Valley" \
-F "country_names[1]=Chile"
or
curl https://wineengine.tineye.com/<company>/rest/update_metadata/ \
-F "filepath=path/folder/1.jpg" \
-F "image_id={}"
Response examples¶
JSON¶
{
"method": "update_metadata",
"status": "ok",
"error": [],
"result": [],
"stats": {
"time_update": 6.01,
"time_total": 6.56
}
}
XML¶
<?xml version="1.0" encoding="utf-8"?>
<data>
<method>update_metadata</method>
<status>ok</status>
<error/>
<result/>
<stats>
<time_update>6.01</time_update>
<time_total>6.56</time_total>
</stats>
</data>