-
Notifications
You must be signed in to change notification settings - Fork 2
API Routes
Emily Parkes edited this page Jun 14, 2023
·
12 revisions
- GET
/api/v1/creations - GET
/api/v1/creations/:id - POST
/api/v1/creations/new-creation - PATCH
/api/v1/creations/update-creation/:id - DELETE
/api/v1/creations/:id
returns
[
{
"id": 1,
"clayId": 1,
"clay": "White",
"shapeId": 5,
"shape": "Vase",
"statusId": 2,
"status": "Leather Hard",
"weightLeatherHard": 0,
"weightBoneDry": 0,
"weightBisqueFired": 0,
"weightGlazed": 0,
"weightComplete": 0,
"dateCreated": "2020-06-15T13:45:30",
"dateComplete": "2020-07-15T13:45:30",
"description": "Creations by emily is great",
"note": "Glaze with criss-cross pattern",
"name": "Le Vase",
"imgLeatherHard": null,
"imgBisqueFired": null,
"imgGlazed": null,
"imgComplete": "/images/vase.png",
"imgGallery": null,
"glazes": [
{
"id": 1,
"glaze": "Clear"
},
{
"id": 10,
"glaze": "White"
},
{
"id": 11,
"glaze": "Peach"
}
]
},
{
"id": 2,
"clayId": 2,
"clay": "Grey Pebble",
"shapeId": 2,
"shape": "Plate",
"statusId": 1,
"status": "Wet",
"weightLeatherHard": 0,
"weightBoneDry": 0,
"weightBisqueFired": 0,
"weightGlazed": 0,
"weightComplete": 0,
"dateCreated": "2020-05-24T14:45:30",
"dateComplete": "2020-06-24T14:45:30",
"description": "",
"note": "Glaze with criss-cross pattern",
"name": "Le Plate",
"imgLeatherHard": null,
"imgBisqueFired": null,
"imgGlazed": null,
"imgComplete": "",
"imgGallery": null,
"glazes": [
{
"id": 1,
"glaze": "Clear"
},
{
"id": 10,
"glaze": "White"
}
]
},
...]
returns
{
"id": 2,
"clayId": 2,
"clay": "Grey Pebble",
"shapeId": 2,
"shape": "Plate",
"statusId": 1,
"status": "Wet",
"weightLeatherHard": 0,
"weightBoneDry": 0,
"weightBisqueFired": 0,
"weightGlazed": 0,
"weightComplete": 0,
"dateCreated": "2020-05-24T14:45:30",
"dateComplete": "2020-06-24T14:45:30",
"description": "",
"note": "Glaze with criss-cross pattern",
"name": "Le Plate",
"imgLeatherHard": null,
"imgBisqueFired": null,
"imgGlazed": null,
"imgComplete": "",
"imgGallery": null,
"glazes": [
{
"id": 1,
"glaze": "Clear"
},
{
"id": 10,
"glaze": "White"
}
]
}
sends
{
"clayId": 1,
"glazes": [{"id": 1, "glaze": "Clear"}],
"name": "Espresso mini",
"note": "hi",
"shapeId": 1,
"statusId": 1,
"weight": "123"
}
returns
{
"id": 12,
"clayId": 1,
"clay": "White",
"shapeId": 1,
"shape": "Coffee Cup",
"statusId": 1,
"status": "Wet",
"weightLeatherHard": null,
"weightBoneDry": null,
"weightBisqueFired": null,
"weightGlazed": null,
"weightComplete": null,
"dateCreated": null,
"dateComplete": null,
"description": null,
"note": "hi",
"name": "Espresso mini",
"imgLeatherHard": null,
"imgBisqueFired": null,
"imgGlazed": null,
"imgComplete": null,
"imgGallery": null,
"glazes": [
{
"id": 1,
"glaze": "Clear"
}
]
}
sends
{
"id": 12,
"clayId": 1,
"clay": "White",
"shapeId": 1,
"shape": "Coffee Cup",
"statusId": 1,
"status": "Wet",
"weightLeatherHard": null,
"weightBoneDry": null,
"weightBisqueFired": null,
"weightGlazed": null,
"weightComplete": null,
"dateCreated": null,
"dateComplete": null,
"description": null,
"note": "hi",
"name": "Emily Test 1",
"imgLeatherHard": null,
"imgBisqueFired": null,
"imgGlazed": null,
"imgComplete": null,
"imgGallery": null,
"glazes": [
{
"id": 1,
"glaze": "Clear"
}
]
}
returns
{
"id": 12,
"clayId": 1,
"clay": "White",
"shapeId": 1,
"shape": "Coffee Cup",
"statusId": 1,
"status": "Wet",
"weightLeatherHard": null,
"weightBoneDry": null,
"weightBisqueFired": null,
"weightGlazed": null,
"weightComplete": null,
"dateCreated": null,
"dateComplete": null,
"description": null,
"note": "hi",
"name": "Emily Test 1",
"imgLeatherHard": null,
"imgBisqueFired": null,
"imgGlazed": null,
"imgComplete": null,
"imgGallery": null,
"glazes": [
{
"id": 1,
"glaze": "Clear"
}
]
}