Host: pci01.picalike.corpex-kunden.de
Port: 8090
passlib==1.6.5
Im git zu finden als:
$ git clone git@git.picalike.corpex-kunden.de:picalike/pci.git
check upci
Anfragen mit json als post
Antworten:
Test User:
"email" : "unittest@picalike.com", "password_for_testing" : "picalike", "userid" : "f6622021aae19fd282df4945a3a47aa8", "username" : "unittest", "uid" : [905]
Host: sg02.picalike.copex-kunden.de
Port: 8095
Aufrufbeispiel:
http://sg02.picalike.corpex-kunden.de:8095/<url_enc> http://sg02.picalike.corpex-kunden.de:8095/http%3A%2F%2Fwww.picalike.com%2Fdesign%2Fpicalike%2Flogo.png
Der Server gibt die Datei zurück. Wenn nötig wird sie heruntergeladen, wenn möglich wird die gespeicherte Version aus dem Cache ausgespielt.
Zusätzlich gibt es die Möglichkeit die Bilder direkt resized zu bestellen, es wird grundsätzlich die Aspectratio beibehalten (wenn width zu height nicht passt gewinnt der größere Wert, der andere wird ignoriert):
http://sg02.picalike.corpex-kunden.de:8095/<url_enc>/width/height
Es braucht nur width oder height angegeben werden, der andere kann auf -1 gesetzt werden.
http://<host>:<port>/<api>
Testing with curl:
curl --data-binary @style_count.json -H "Content-type: application/json" "http://pci01.picalike.corpex-kunden.de:8090/style_count"
where style_count.json is a file containing the message that you want to send
in:
{"email": <str>, "pwd": <str>}
out:
{ "result": 2, "message": <str>, "response": { "userid": <str>, "username": <str>, "sid": <str>, # new session id "lang": <str>, # default: 'en', if not set "fav_shop": <str, shop_id> # only if it is set "shop_info": [{"shop_name": <str>, "apikey": <str>}], "privileges": [<str>, ...], "role": <str, default=user>, "create_date": <datum> } }
in:
{"userid": <str>}
out:
{"result": 1, "message": <str>, "response": {}}
in:
{}
out:
{"result": <int>, "message": <str>, "response": {"permissions": [<str>, ...]}}
in:
{"shop_apikey": <str>, "include_all": <bool>}
include_all is optional and by default False, if True all users that include “all” in “uid” will be returned
out:
{"result": <int>, "message": <str>, "response": {"user_list": [{"username": <str>, "userid": <str>, "role": <str, default=user>}, ...]}}
in:
{"userid": <str>, "role": <str>}
out:
{"result": <int>, "message": <str>, "response": {}}
in:
{"userid": <str>, "pwd": <str>}
out:
{"result": <int>, "message": <str>, "response": {}}
in:
{"userid": <str>, "permissions": [<str>, ...]}
out:
{"result": <int>, "message": <str>, "response": {}}
in:
{"sid": <str>} # sessionid
out:
{"result": 1, "message": "OK", "response": { "userid": <str>, "username": <str>, "email". <str>, "shop_info": [{"shop_name": <str>, "apikey": <str>}], "fav_shop": <str> # only if it is set "privileges": [<str>, ...], "role": <str, default=user>, "lang": <str>, "create_date": <datum> }}
in:
{"userid": <str>}
out:
{"result": 1, "message": "OK", "response": { "userid": <str>, "username": <str>, "shop_info": [{"shop_name": <str>, "apikey": <str>}], "fav_shop": <str> # only if it is set "privileges": [<str>, ...], "role": <str, default=user>, "lang": <str>, "create_date": <datum> }}
in:
{"userid": <str>, "lang": <str>}
out:
{"result": 1, "message": "OK", "response": {}}
lang is a two letter string, e.g.: 'de', 'en', …
in:
{"userid": <str>, "shop_id": <str>}
out:
{"result": 1, "message": "OK", "response": {}}
in:
{ "userid": <str>, "sid": <str>, "action": <str, default: "unknown" if missing>, "shop_id": <str, default: "unknown" if missing> # optional "data": <dict, for additional data> # not used right now }
out:
{"result": 1, "message": "OK", "response": {"match": <bool>}}
in:
{ "sid": <str>, # authorization "userid": <str>, # stats for this user "shop_id": <str> # and this shop }
out:
{"result": 1, "message": "OK", "response": [ { "date": <str, "%Y-%m-%d"> # e.g. "2019-02-01" "first": <str, "%Y-%m-%dT%H:%M:%SZ"> # first activity of the day in UTC, e.g. "2019-02-01T08:01:11Z" "last": <str, "%Y-%m-%dT%H:%M:%SZ"> # last activity of the day in UTC, e.g. "2019-02-01T18:03:51Z" "count": <int> # total number of actions (calls to check_session) "details": <dict> # <action> -> <count> } ]}
in:
{"from_time": <str>, "to_time": <str>, "resolution": <hour, day, month>, "userid": <str>, "shop_apikey": <str>}
Zeiten als String in der Form: 2015-12-06 11:55
“resolution”: “hour” nicht möglich bei stats_color
out:
{"result": 1, "message": "OK", "response": {"sum_list": {<int>: {"time": <str_date>, "sum": <int>}, ... }}}
Anmerkung:
Der Zeitstempel (z.B. “2015-11-30 10:00:00.000”) meint den Beginn der Zeitspanne (Beisp. endet hier bei “2015-11-30 10:59:59.999)
in:
{"from_time": <str>, "to_time": <str>, "resolution": <hour, day, month>, "userid": <str>, "shop_apikey": <str>}
Zeiten als String in der Form: 2015-12-06 11:55
“resolution”: “hour” nicht möglich bei stats_color
out:
{"result": 1, "message": "OK", "response": {"sum_list": [{"time": <str_date>, "sum": <int>}, ... ]}}
Anmerkung:
Der Zeitstempel (z.B. “2015-11-30 10:00:00.000”) meint den Beginn der Zeitspanne (Beisp. endet hier bei “2015-11-30 10:59:59.999)
in:
{"userid": <str>, "shop_apikey": <str>}
out:
{"result": 1, "message": "OK", "response": {"categories":[{"name": <str>, "count": <int>, "gender": <str,"None">, "f_value": <float,"no f_value">, "available": <bool,"no available_info"}]}}
Alle Werte im Feed (unified) anzeigen:
in:
{"userid": <str>, "shop_apikey": <str>, "field_name": <str> (categories, brands, colors, shops, season)}
out:
{"result": 1, "message": "OK", "response": {"field_values":[...]}} categories: {"name": <str>, "count": <int>, "gender": <str,Null>, "f_value": <float,Null>, "available": <bool,default:true} brands, colors, shops, gender, season: {"brand/color/shop/gender/season": <str>, "size": <int>}
Nur die Werte innerhalb einer Kategorie (unified) anzeigen:
in:
{"userid": <str>, "shop_apikey": <str>, "field_name": <str> (brands, colors, shops, gender, season), "category": <str>}
out:
{"result": 1, "message": "OK", "response": {"field_values":[<str>]}}
in:
{"shop_apikey": <str>}
out:
{"result": 1, "message": "OK", "response": {"translation":{<cat_int, str>: <cat_visulytics, str>, ...}}}
(for internal use only)
in:
{"shop_apikey": <str>}
out:
{"result": 1, "message": "OK", "response": {}}
in:
{"userid": <str>, "shop_apikey": <str>, "category": <str>, "f_value": <float>, "gender": <str,None>}
out:
{"result": 1, "message": "OK", "response": {}}
in:
{"userid": <str>, "shop_apikey": <str>, "categories": [<str>]} {"userid": <str>, "shop_apikey": <str>, "categories": [<str>], "gender": <str>}
out:
{"result": 1, "message": "OK", "response": {"f_values": {"category": <str>, "f_value": <float>, "gender": <str>}}}
in:
{"userid": <str>, "shop_apikey": <str>, "customer_cat": <str>, "picalike_cat": <str>, "visual": <bool, None>, "gender": <str,None>}
out:
{"result": 1, "message": "OK", "response": {}}
in:
{"userid": <str>, "shop_apikey": <str>}
out:
{"result": 1, "message": "OK", "response": {"mapping": [{"customer_cat": <str>, "picalike_cat": <str>, "suggested_cat": <str>, "gender": <str>, "visual": <bool>}]}}
in:
{"userid": <str>}
out:
{"result": 1, "message": "OK", "response": {"categories": [<str>]}}
in:
{"userid": <str>}
out:
{"result": 1, "message": "OK", "response": {"categories": [[<str>, <str>], ...]}}
in:
{"userid": <str>, "shop_apikey": <str>, "page": <int,0>, "limit": <int,50>, "sort_key_direction": <str,{"ASC"(default), "DESC"}>} {"userid": <str>, "shop_apikey": <str>, "cat_name": <str>, "page": <int,0>, "limit": <int,50>} {"userid": <str>, "shop_apikey": <str>, "gender": <str>, "page": <int,0>, "limit": <int,50>} {"userid": <str>, "shop_apikey": <str>, "available": <bool>, "page": <int,0>, "limit": <int,50>} {"userid": <str>, "shop_apikey": <str>, "season": <str>, "page": <int,0>, "limit": <int,50>} {"userid": <str>, "shop_apikey": <str>, "type": <str>, "page": <int,0>, "limit": <int,50>} {"userid": <str>, "shop_apikey": <str>, "color": <str>, "pColor": <bool>, "page": <int,0>, "limit": <int,50>} {"userid": <str>, "shop_apikey": <str>, "page": <int,0>, "limit": <int,50>, "filter_price": {"lower": <float,0>, "upper": <float,1e6>}} {"userid": <str>, "shop_apikey": <str>, "cat_name": <str>, "page": <int,0>, "limit": <int,50>, "filter_price": {"lower": <float,0>, "upper": <float,1e6>}} filter_price ist nachgelagern, Anzahl der Produkte kann kleiner sein als limit. Filterung auf gesammten Daten möglich aber teurer. gender, available, cat_name, season, type und color können kombiniert werden wenn "color" ein picalikeColor ist, muss "pColor": true ("pColor": false für "color" aus dem Feed) mittels "unify": true können die Bilder-Urls auf Einmaligkeit gefiltert werden (möglichst nur mit cat_name, ist bei großen Datenmengen sehr langsam)
out:
{"result": 1, "message": "OK", "response": {"products":[{"name": <str>, "price": <str>, "url": <str>, "imgid": <str>, "deeplink": <str>, "gender": <str>, "season": <str>, "type": <str>, "color": <str>}]}}
in:
{"userid": <str>, "shop_apikey": <str>, "limit": <int,50>}
out:
{"result": 1, "message": "OK", "response": {"products":[{"name": <str>, "price": <str>, "url": <str>, "imgid": <str>, "deeplink": <str>, "gender": <str>}]}}
in:
{"userid": <str>, "shop_apikey": <str>, "from_time": <str>, "to_time": <str>, "productid": <str>} {"userid": <str>, "shop_apikey": <str>, "from_time": <str>, "to_time": <str>, "productid": <str>, "resolution": <hour, day, month>} Zeiten als String in der Form: 2015-12-06 11:55
out:
{"result": 1, "message": "OK", "response": {"product_count": <int>}} {"result": 1, "message": "OK", "response": {"product_count": <int>, "sum_list": {<int>: {"time": <str_date>, "sum": <int>}, ... }}}
in:
{"userid": <str>, "shop_apikey": <str>, "productid": <str>}
out:
{"result": 1, "message": "OK", "response": {"product_count": <int>, "sum_list": {<int>: {"time": <str_date>, "sum": <int>}, ... }}}
in:
{"userid": <str>, "shop_apikey": <str>, "from_time": <str>, "to_time": <str>, "limit": <int,10>} Zeiten als String in der Form: 2015-12-06 11:55 mittels "update_cache": <egal> kann der cache in der mongo neu geschrieben werden
out:
{"result": 1, "message": "OK", "response": {"top_views": [{"productid": <str>, "amount": <int>}]}} Bei gleicher Häufigkeit ist die Sortierung undefiniert.
in:
{"userid": <str>, "shop_apikey": <str>, "productids": [<str>], "cat_name": <str>, "image_id_delimiter": <char>, "n_image_id_chunks": <int>, "extra_fields": <list of strings>} Optional: cat_name - filter by cat, image_id_delimiter - split image_id at delimiter, n_image_id_chunks - number of chunks to keep, extra_fields
out:
{"result": 1, "message": "OK", "response": {"products":[{"name": <str, None>, "price": <str, None>, "url": <str, None>, "imgid": <str, None>, "deeplink": <str, None>, "available": <bool, None>, "cat": <str, None>, "season": <str>, "type": <str>, "color": <str>, "pColor": <str>}]}}
out_with_extra_field(s):
The ouput is exactly the same as for a request without any option, but the query from the pci app to MongoDB pcistyles collection will only respond with items containing the field extra_image_filter with the value extra_image_exists.
in:
{"userid": <str>, "shop_apikey": <str>} {"userid": <str>, "shop_apikey": <str>, "category": [<str>], "gender": <str>} category und gender optional und frei kombinierbar
out:
{"result": 1, "message": "OK", "response": {"related_products": <int>, "color_statistic":[{"color_name": <str>, "avg_amount": <float>, "found_count": <int>, "found_percent": <float>}]}} related_products: Anzahl der gefundenen Produkte avg_amount: Durchschnittlicher Anteil dieser Farbe in allen Bildern die diese Farbe haben found_count: Anzahl der Bilder die diese Farbe haben found_percent: (found_count / related_products)
in:
{"userid": <str>, "shop_apikey": <str>}
out:
{"result": 1, "message": "OK", "response": {"color_names":[<str>]}}
in:
{"userid": <str>, "shop_apikey": <str>, "color_name": <str>, "limit": <int,10>, "page": <int,0>} {"userid": <str>, "shop_apikey": <str>, "color_name": <str>, "limit": <int,10>, "page": <int,0>, "cat_name": <str>, "gender": <str>} cat_name und gender optional und frei kombinierbar
out:
{"result": 1, "message": "OK", "response": {"products":[{"productid": <str>, "amount": <float>}]}} products sind absteigend sortiert nach Anteil der Farbe am Produkt
in:
{"userid": <str>, "shop_apikey": <str>, "from_time": <str>, "to_time": <str>} Zeiten als String in der Form: 2015-12-06 11:55
out:
{"result": 1, "message": "OK", "response": {"related_products": <int>, "color_statistic":[{"color_name": <str>, "amount": <int>]}}
Returns a list of all colors in a feed or a list of all picalike colors if the former is not available.
in:
{"userid": <str>, "shop_apikey": <str>,"pColor": <bool>} "pColor": true forces use of picalike colors
out:
{"result": 1, "message": "OK", "response": {"colors": [<str>], "pColor": <bool>}} "pColor": true if picalike colors are returned
in:
{"userid": <str>, "shop_apikey": <str>, "ref_pid": <str>, "new_prod": <dict with product info>}
out:
{"result": 1, "message": "OK", "response": {"num_updated_styles": <int>}}
in:
{"userid": <str>, "shop_apikey": <str>, "name": <str>, "type": <str>, "order_by": <int>, "products": <dict of products>}
out:
{"result": 1, "message": "OK", "response": {"styleid": <str>, "userid": <str>, "name": <str>, "type": <str>, "modified": double, "created": double, "visibility": <str>, "products": <list of products>}}
this will replace some SKUs for Atelier Goldner Schnitt if the following settings are present in the feed settings:
in:
{"userid": <str>, "from_shop_apikey": <str>, "to_shop_apikey": [<str>], "styleid": [<str>]}
out:
{"result": 1, "message": "OK", "response": {<to_shop_apikey>: {"copied": [<str>], "errors": [{styleid: <str>, "msg": <str>}], "missing": [{styleid: <str>, "prod_ids": [<str>]}] } } }
in:
{"shop_apikey": <str>, "name": <str>}
out:
{"result": 1, "message": "OK", "response": {"exists": <bool>}}
in:
{"styleid": <str>, "shop_apikey": <str>, ...}
out:
{"result": 1, "message": "OK", "response": {...}}
in:
{"styleid": <str>, "shop_apikey": <str>}
out:
{"result": 1, "message": "OK", "response": {...}}
in:
{"shop_apikey": <str>}
out:
{"result": 1, "message": "OK", "response": {"style_count": <int>}}
in:
{"shop_apikey": <str>} {"shop_apikey": <str>, "renew": <bool>}
out:
{"result": 1, "message": "OK", "response": {"all": <float>, <cat_name>: <float>, ...}}
in:
{"shop_apikey": <str>, "limit": <int,150>, "page": <int,0>}
out:
{"result": 1, "message": "OK", "response": [...]}
in:
{"shop_apikey": <str>}
out:
{"result": 1, "message": "OK", "response": [...]}
in:
{"shop_apikey": <str>}
out:
{"result": 1, "message": "OK", "response": {}}
in:
{"styleid": <str>, "shop_apikey": <str>, "userid": <str>}
out:
{"result": 1, "message": "OK", "response": {}}
in:
{"userid": <str>, "shop_apikey": <str>,}
out:
{"result": 1, "message": "OK", "response": [{"userid": <str>, "shop_apikey": <str>, "box_id": <str>, "reco_type": (look|sim)<str>, "mode": (live|preview)<str>, "referrer": <boolean>, "only_if_unavailable": <boolean>, "box_name": <str>, "creation_time": <int>, "status": (active|deleted)<str>, "template": <str>}]}
Falls keine Recobox gespeichert ist, ist der Wert von response eine leerer Array. Der Wert von creation_time ist im Format “seconds since epoch”.
in:
{"userid": <str>, "shop_apikey": <str>, "box_id": <str>}
out:
{"result": 1, "message": "OK", "response": [{"userid": <str>, "shop_apikey": <str>, "box_id": <str>, "reco_type": (look|sim)<str>, "mode": (live|preview)<str>, "referrer": <boolean>, "only_if_unavailable": <boolean>, "box_name": <str>, "creation_time": <int>, "status": (active|deleted)<str>, "template": <str>, "regex": <str>}]}
Falls keine Recobox vorhanden ist, ist der Wert von response eine leerer Array. Der Wert von creation_time ist im Format “seconds since epoch”.
in:
{"userid": <str>, "shop_apikey": <str>, "box_id": <str>}
out:
{"result": 1, "message": "OK", "response": {"matched_count": <int>}}
Der Wert von matched_count ist die Anzahl der auf status=deleted gesetzten Einträge.
in:
{"userid": <str>, "shop_apikey": <str>, "box_id": <str>, "reco_type": <str>, "mode": (live|preview)<str>, "box_name": <str>, "template": <str>, "regex": <str>, "referrer": <boolean>, "only_if_unavailable": <boolean>}
Alle Parameter außer “userid”, “shop_apikey”, “box_id” sind optional. Boolean wird hier wie folgt interpretiert: ein leerer String ist false und ein nicht-leerer String true.
out:
{"result": 1, "message": "OK", "response": {}}
in:
{"userid": <str>, "shop_apikey": <str>, "box_id": <str>, "reco_type": (sim|look)<str>, "mode": (live|preview)<str>, "box_name": <str>, "template": <str>, "regex": <str>, "referrer": <boolean>, "only_if_unavailable": <boolean>}
Alle Parameter außer “userid”, “shop_apikey”, “box_id” sind optional. Boolean wird hier wie folgt interpretiert: ein leerer String ist false und ein nicht-leerer String true.
out:
{"result": 1, "message": "OK", "response": {}}
in:
{"userid": <str>, "shop_apikey": <str>, "from_time": <str>, "to_time": <str>}
oder:
{"userid": <str>, "shop_apikey": <str>, "from_time": <str>, "to_time": <str>, "testid": <str>, "test_class": <str>}
Zeiten als String in der Form: 2015-12-06 11:55 “test_class” ist z.B. “A”
out:
{"result": 1, "message": "OK", "response": {"click_stats": {<type>: {<datum> : <int>}}, "todays_prediction": {<type>: <int>}}}
<type> in der Form “sim_*” oder “look_*”
<datum> als String in der Form: 2015-12-06
“todays_prediction” ist nicht leer nur wenn “to_time” == heute
in:
{"userid": <str>, "shop_apikey": <str>, "from_time": <str>, "to_time": <str>}
oder
{"userid": <str>, "shop_apikey": <str>, "from_time": <str>, "to_time": <str>, "testid": <str>, "test_class": <str>}
Zeiten als String in der Form: 2015-12-06 11:55 “test_class” ist z.B. “A”
out:
{"result": 1, "message": "OK", "response": {"checkout_stats": [{"date": <str>, "not_found": <int>, "products": <int>, "value": <int>, "checkouts": <int>, "sessions": <int>}], "todays_prediction": {"sessions": <int>, "checkouts": <int>}}}
“date” in der Form: 2015-12-06
“value” als Cents
“todays_prediction” ist nicht leer nur wenn “to_time” == heute
in:
{"userid": <str>, "shop_apikey": <str>, "from_time": <str>, "to_time": <str>, "limit": <int>}
Zeiten als String in der Form: 2015-12-06 11:55
out:
{"result": 1, "message": "OK", "response": {"top_clicked": [[imgId, n_clicks], ...]}}
“top_clicked” ist eine high-to-low sortierte Liste.
in:
{"userid": <str>, "shop_apikey": <str>, "from_time": <str>, "to_time": <str>, "status": <bool>, "prob_a": <float>, "name": <str>, "testid": <str>, "description": <str>}
from_time und to_time als String im Format: “2015-11-30 10:00”.
status (activity status)
prob_a (probability parameter in real-valued range [0, 1], i.e. 0.856)
out:
{"result": 1, "message": "OK", "response": {"status": <str>, "testid": <str>}}
in
{"userid": <str>, "shop_apikey": <str>}
out:
{"result": 1, "message": "OK", "response": {"ab_tests": [{"shop_apikey": <str>, "from_time": <str>, "to_time": <str>, "status": <bool>, "prob_a": <float>, "name": <str>, "testid": <str>, "description": <str>}]}}
Parameters and files are passed as form fields (content-type=multipart/form-data)
in:
userid=<str>, name=<str>, sources=<list>, gender=<str>, age=<list>, weather=<list>, segment=<list>, categories=<list>, country=<list>, status=<str>, hashtags=<str>, description=<str>, image_i=new, file_i=<file>, style_i=<list>, cpc_i=<list>
userid
and name
image_i=new
, where i is from the set {1, …, 9} and provide file_i
status
is a string from the set {“preview”, “active, “deleted”}<list>
is a string where items are separated by ;
out:
{"result": 1, "message": "OK", "response": {"trendid": <str>}}
in:
{"userid": <str>, "trendid": <str>}
out:
{"result": 1, "message": "OK", "response": {"trend_info": {"userid": <str>, "name": <str>, "trendid": <str>, "created": <str>, "edited": <str>, "sources" [<str>, ...], "gender": <str>, "age": [<str>, ...], "weather": [<str>, ...], "segment": [<str>, ...], "categories": [<str>, ...], "country": [<str>, ...], "status": {"preview", "active, "deleted"}, "hashtags": <str>, "description": <str>, "images": {"image_1": {"file_id": <str>, "style": <str>, "cpc": <str>}, "image_2": {"file_id": <str>, "style": <str>, "cpc": <str>}, ...}}}}
images
: dictionary with keys image_i
, where i is from the set {1, …, 9}image_i
contains file_id
, style
and cpc
(central product category) for image iParameters and files are passed as form fields (content-type=multipart/form-data)
in:
userid=<str>, name=<str>, sources=<list>, gender=<str>, age=<list>, weather=<list>, segment=<list>, categories=<list>, country=<list>, status=<str>, hashtags=<str>, description=<str>, image_i=<cmd>, file_i=<file>, style_i=<list>, cpc_i=<list>
userid
, trendid
status
is a string from the set {“preview”, “active, “deleted”}<list>
is a string where items are separated by ;
<cmd>
is a string from the set {“new”, “edit”, “del”}image_i=new
and provide file_i
image_i=del
image_i=edit
out:
{"result": 1, "message": "OK", "response": {}}
in:
{"userid": <str>, "trendid": <str>}
out:
{"result": 1, "message": "OK", "response": {}}
in:
{"userid": <str>, "status": [<str>, ...], "n_images": <int>}
userid
status
: list of elements from set {“preview”, “active”, “deleted”}n_images
: maximal number of images for each trendout:
{"result": 1, "message": "OK", "response": {"trends": [{"trendid": <str>, "name": <str>, "created": <str>, "userid": <str>, "status": <str>, "categories": [<str>, ...], "images": [<str>, ...]}, ...}}
images
: list of file id's
Image with database _id = file_id
is returned
Parameters and files are passed as form fields (content-type=multipart/form-data)
in:
{userid:<str>, image_1:<file> , "shop_apikey" : <str> }
image_1
is a input with type=file.out:
{"result": 1, "message": "OK", "response": {"_id":<str> , 'images_with_fatal_error':<list> ,'urls_with_image_cloud_error': <list> , 'images_without_error': { <key> : "bits": [[bit, value], ...] , "attributes": [[name, value], ...] , "categories": [[name, value], ...] , "free_person": [[name, value], ...] , 'fasterrcnn_microworker_boxes': [{'x1': <double>, 'x2': <double>, 'score': <str>, 'y2': <double>, 'class': <str>, 'y1': <double> }, ... ] } } }
Just a endpoint to the upload system, this endpoint serve as the http link that the tower01 needs to do the predictions. The method send the image from the collection 'pci_upload'.
in:
{userid:<str> , shop_apikey : <str> }
out:
{"result": 1, "message": "OK", "response": [{"_id":<str> ,"uploadDate" : <str> , "userid" : <str> } , {"_id": <str> ,"uploadDate" : <str> , "userid" : <str> } ,... ] }
* Lists all the _id of uploaded images, by shop_apikey, in the upload system.
in:
{userid:<str> , shop_apikey : <str>, file_id:<str> }
out:
{"result": 1, "message": "OK", "response": {"new_prediction" : {"_id":<str> , 'images_with_fatal_error':<list> ,'urls_with_image_cloud_error': <list> , 'images_without_error': { <key> : "bits": [[bit, value], ...] , "attributes": [[name, value], ...] , "categories": [[name, value], ...] , "free_person": [[name, value], ...] , 'fasterrcnn_microworker_boxes': [{'x1': <double>, 'x2': <double>, 'score': <str>, 'y2': <double>, 'class': <str>, 'y1': <double> }, ... ] } } }}
in:
{userid:<str> , shop_apikey : <str>, file_id:<str> }
out:
{"result": 1, "message": "OK", "response": {"_id":<str> , 'images_with_fatal_error':<list> ,'urls_with_image_cloud_error': <list> , 'images_without_error': { <key> : "bits": [[bit, value], ...] , "attributes": [[name, value], ...] , "categories": [[name, value], ...] , "free_person": [[name, value], ...] , 'fasterrcnn_microworker_boxes': [{'x1': <double>, 'x2': <double>, 'score': <str>, 'y2': <double>, 'class': <str>, 'y1': <double> }, ... ] } } }
in:
{userid:<str> , shop_apikey : <str>, styleid:<str>, exact_match: <bool> }
out:
{"result": 1, "message": "OK", "response": {"exact_match":<bool>} }