1
0
Fork 0
freesewing/markdown/dev/reference/backend/models/en.md

76 lines
1.3 KiB
Markdown
Raw Normal View History

2021-10-17 17:34:55 +02:00
***
## title: Models
## Create model
2021-10-17 17:34:55 +02:00
POST /models
{
'name': 'The model name',
'breasts': false,
'units': 'imperial'
}
On success:
2021-10-17 17:34:55 +02:00
200
{
'model': {
'breasts': false,
'units': 'imperial',
'handle': 'dnkve',
'user': 'ohium',
'name': The model name',
'createdAt': '2019-08-12T12:06:41.086Z',
'updatedAt': '2019-08-12T12:06:41.086Z',
'pictureUris': {
'l': 'https://static.she.freesewing.org/users/o/ohium/models/dnkve/dnkve.svg',
'm': 'https://static.she.freesewing.org/users/o/ohium/models/dnkve/dnkve.svg',
's': 'https://static.she.freesewing.org/users/o/ohium/models/dnkve/dnkve.svg',
'xs': 'https://static.she.freesewing.org/users/o/ohium/models/dnkve/dnkve.svg'
}
}
}
2021-10-17 17:34:55 +02:00
On failure:
2021-10-17 17:34:55 +02:00
400
Creates a model and returns its data.
## Read model
2021-10-17 17:34:55 +02:00
GET /models/:handle
On success: The model data
On failure:
2021-10-17 17:34:55 +02:00
400
Loads a model's data
## Update model
2021-10-17 17:34:55 +02:00
PUT /models/:handle
{
'measurements': {
'ankleCircumference': 234
}
}
Updates the model and returns the (updated) model data.
## Remove model
2021-10-17 17:34:55 +02:00
DELETE /models/:handle
On success:
2021-10-17 17:34:55 +02:00
200
On failure:
2021-10-17 17:34:55 +02:00
400
2021-10-17 17:34:55 +02:00
Removes the model