Wireframes: https://marvelapp.com/ajjg47h/screen/53196383
-
Get all personas given gender
-
--Each persona should have
- --Persona Name,
- --Persona Image
- --Category and {attribute, value} pairs for each attribute of the category.
- --Location of substore
-
Get all categories and corresponding attributes and values given gender
-
Get cluster/persona information given the dictionary of {attribute, attribute value}
- Result should have, array of personas.
| Method | Request | Description |
|---|---|---|
| GET | api/v1/categories/{gender} | Get all categories given gender |
| GET | api/v1/personas/{gender} | Get all personas given gender |
| POST | api/v1/personas/computed | Get computed cluster/persona information given the dictionary of {attribute, attribute value} and gender information |
GET _/api/v1/categories/{gender}
[{
"Dresses": [{
"Silhouette": ["Sheath", "Shift", "Trapeze"],
"Sleeve Length": ["Sleeveless", "Long", "Short", "3/4 Sleeve"],
"Material": ["Woven", "Knit", "Sweater"]
}]
},
{
"Denim": [{
"Rise": ["Mid", "High", "Low"],
"Color": ["Black", "Dark", "Medium"]
}]
}
]
GET _/api/v1/personas/{gender}
[
{
"Name": "Persona 1",
"Location": "L1",
"Properties": [
{
"Dress": [
{
"Silhouette": [
"Sheath"
],
"Sleeve Length": [
"Sleeveless","Short"
],
"Material": [
"Woven"
]
}
]
},
{
"Denim": [
{
"Rise": [
"Mid"
],
"Color": [
"Black"
]
}
]
}
]
},
{
"Name": "Persona 2",
"Location": "L2",
"Properties": [
{
"Dress": [
{
"Silhouette": [
"Shift"
],
"Sleeve Length": [
"Long"
],
"Material": [
"Knit"
]
}
]
},
{
"Denim": [
{
"Rise": [
"High"
],
"Color": [
"Medium"
]
}
]
}
]
}
]
POST: /api/v1/personas
{
“Gender” :”male”,
“selectedAttributes”:
[
{
"Dress": [
{
"Silhouette": [
"Sheath"
],
"Sleeve Length": [
"Sleeveless", "Short"
],
"Material": [
"Woven"
]
}
]
},
{
"Denim": [
{
"Rise": [
"Mid"
],
"Color": [
"Black"
]
}
]
}
]
}
[
{
"Name": "Persona 1",
"Location": "L1",
"Properties": [
{
"Dress": [
{
"Silhouette": [
"Sheath"
],
"Sleeve Length": [
"Sleeveless","Short"
],
"Material": [
"Woven"
]
}
]
},
{
"Denim": [
{
"Rise": [
"Mid"
],
"Color": [
"Black"
]
}
]
}
]
},
{
"Name": "Persona 2",
"Location": "L2",
"Properties": [
{
"Dress": [
{
"Silhouette": [
"Shift"
],
"Sleeve Length": [
"Long"
],
"Material": [
"Knit"
]
}
]
},
{
"Denim": [
{
"Rise": [
"High"
],
"Color": [
"Medium"
]
}
]
}
]
}
]
python -m flask run
This was deployed as a Docker image on an Azure Web App. Here are the steps:
docker build --tag /personastore-flask-webapp:v1.0.0 .
docker login --username=
docker push waterfox83/personastore-flask-webapp:v1.0.0
az webapp create --resource-group --plan --name --deployment-container-image-name /personastore-flask-webapp:v1.0.0
az webapp config appsettings set --resource-group --name --settings WEBSITES_PORT=5000
This is now deployed on Kubernetes cluster on Abhishek's azure account. Available here: http://104.211.223.150:5000/