-
Notifications
You must be signed in to change notification settings - Fork 2
API Routes
Emily Parkes edited this page Jul 3, 2023
·
12 revisions
- GET
/api/v1/creations
- GET
/api/v1/creations/2
- POST
/api/v1/creations/new-creation
- PATCH
/api/v1/creations/update-creation/2
- DELETE
/api/v1/creations/9
- GET
/api/v1/glazes
- GET
/api/v1/glazes/2
- POST
/api/v1/glazes
- PATCH
/api/v1/glazes/2
- DELETE
/api/v1/glazes/2
- GET
/api/v1/shapes
- GET
/api/v1/shapes/2
- POST
/api/v1/shapes
- PATCH
/api/v1/shapes/2
- DELETE
/api/v1/shapes/2
- GET
/api/v1/statuses
- GET
/api/v1/statuses/2
- POST
/api/v1/statuses
- PATCH
/api/v1/statuses/2
- DELETE
/api/v1/statuses/9
Returns
```json
[
{
"id": 1,
"clay": "White",
"in_use": 1
},
{
"id": 2,
"clay": "Grey Pebble",
"in_use": 1
},
{
"id": 3,
"clay": "Primo Red Stoneware",
"in_use": 1
}
]
```
Send
```json
{
"clay": "Blue Pebble"
}
```
Returns
```json
{
"id": 6,
"clay": "Blue Pebble"
}
```
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"
}
]
}
returns
{
deleted: `${deleted} item(s) have been deleted successfully`,
}
Returns
```json
[
{
"id": 1,
"glaze": "Clear",
"underglaze": 0,
"in_use": 1
},
{
"id": 2,
"glaze": "White Matte",
"underglaze": 0,
"in_use": 1
},
{
"id": 3,
"glaze": "White Glossy",
"underglaze": 0,
"in_use": 1
},
{
"id": 4,
"glaze": "Black Matte",
"underglaze": 0,
"in_use": 1
},
{
"id": 5,
"glaze": "Black Glossy",
"underglaze": 0,
"in_use": 1
},
{
"id": 6,
"glaze": "Haystack",
"underglaze": 0,
"in_use": 1
},
{
"id": 7,
"glaze": "Astronaut",
"underglaze": 0,
"in_use": 1
},
{
"id": 8,
"glaze": "Green Forrest",
"underglaze": 0,
"in_use": 1
},
{
"id": 9,
"glaze": "Black",
"underglaze": 1,
"in_use": 1
},
{
"id": 10,
"glaze": "White",
"underglaze": 1,
"in_use": 1
},
{
"id": 11,
"glaze": "Peach",
"underglaze": 1,
"in_use": 1
}
]
```
Sends
```json
[
{
"glaze": "Clear"
},
{
"glaze": "Blue Pebble"
}
]
```
Returns
```json
[
{
"id": 17,
"glaze": "Clear"
},
{
"id": 18,
"glaze": "Blue Pebble"
}
]
```
Send
```json
{
"glaze": "Blue Pebble"
}
```
Returns
```json
[
{
"id": 2,
"glaze": "Blue Pebble",
"underglaze": 0,
"in_use": 1
}
]
```
Returns
```json
[
{
"id": 1,
"shape": "Coffee Cup",
"in_use": 1
},
{
"id": 2,
"shape": "Plate",
"in_use": 1
},
{
"id": 3,
"shape": "Bowl",
"in_use": 1
},
{
"id": 4,
"shape": "Paint Palette",
"in_use": 1
},
{
"id": 5,
"shape": "Vase",
"in_use": 1
},
{
"id": 6,
"shape": "Planter",
"in_use": 1
},
{
"id": 7,
"shape": "Artistic",
"in_use": 1
}
]
```
Send
```json
[
{
"shape": "Espresso Mini Cup"
}
]
```
Returns
```json
[
{
"id": 8,
"shape": "Espresso Mini Cup"
}
]
```
Send
```json
{
"shape": "Espresso Mini Cup"
}
```
Returns
```json
{
"id": 2,
"shape": "Espresso Mini Cup",
"in_use": 1
}
```
Returns
```json
[
{
"id": 1,
"status": "Wet"
},
{
"id": 2,
"status": "Leather Hard"
},
{
"id": 3,
"status": "Bone Dry"
},
{
"id": 4,
"status": "Bisque Firing"
},
{
"id": 5,
"status": "Bisque Fired"
},
{
"id": 6,
"status": "Glazed"
},
{
"id": 7,
"status": "Glaze Firing"
},
{
"id": 8,
"status": "Complete"
}
]
```
Sends
```json
[
{
"status": "Espresso Mini Cup"
}
]
```
Returns
```json
[
{
"id": 9,
"status": "Espresso Mini Cup"
}
]
```
Send
```json
{
"status": "Awaiting Pick Up"
}
```
Returns
```json
{
"id": 2,
"status": "Awaiting Pick Up"
}
```