-
Notifications
You must be signed in to change notification settings - Fork 0
Workshops API
Create - List - Update - Cancel
api/workshops/create
{
"name": "Test Two",
"locationId": 1,
"description": "Blep.",
"start": "2019-04-11T17:02:00.87",
"end": "2019-10-11T17:02:07.716",
"webex": "https://dogeplanet.com",
"imageUrl": "/api/images/bleh.png",
"categoryId": 1,
"room": "White"
}
workshop id (int)
Educator will be auto-populated as the logged-in user.
Locations
Categories
api/workshops
api/workshops/filter?categoryId=1
api/workshops/filter?locationId=1
api/workshops/filter?startDate=2018-04-11T00:00:00&endDate=2020-04-11T00:00:00
[
{
"id": 1,
"name": "So you wanna do a design sprint?",
"educatorId": 1,
"educator": {
"id": 1,
"firstName": "Chris",
"lastName": "Posada",
"username": "cposada",
"password": null,
"roleId": 1,
"role": null,
"locationId": 1,
"location": {
"name": "Brooklyn",
"id": 1
},
"imageUrl": "/api/images/4/16/19/7dbaa88c-da3c-4e58-b8dd-7209645dbc70.png",
"userInterests": []
},
"locationId": 1,
"location": {
"name": "Brooklyn",
"id": 1
},
"description": "Cable Pieces of Eight snow come about wench transom sloop.",
"start": "2019-04-11T17:02:00.87",
"end": "2019-10-11T17:02:07.716",
"webex": "https://dogeplanet.com",
"imageUrl": null,
"workshopUsers": null
},
{
"id": 2,
"name": "How to be a pirate",
"educatorId": 1,
"educator": {
"id": 1,
"firstName": "Chris",
"lastName": "Posada",
"username": "cposada",
"password": null,
"roleId": 1,
"role": null,
"locationId": 1,
"location": {
"name": "Brooklyn",
"id": 1
},
"imageUrl": "/api/images/4/16/19/7dbaa88c-da3c-4e58-b8dd-7209645dbc70.png",
"userInterests": []
},
"locationId": 1,
"location": {
"name": "Brooklyn",
"id": 1
},
"description": "Haul wind flogging coxswain measured fer yer chains.",
"start": "2019-04-11T17:02:00.87",
"end": "2019-10-11T17:02:07.716",
"webex": "https://dogeplanet.com",
"imageUrl": null,
"workshopUsers": null
}
]
This endpoint will not return workshops with start dates prior to DateTime.Today, or workshops that have been cancelled.
Filters can be stacked (ie: api/workshops/filter?categoryId=1&startDate=2018-04-11T00:00:00&endDate=2020-04-11T00:00:00?locationId=1)
Categories
Locations
PUT api/workshops/1
{
"name": "Test Two",
"locationId": 1,
"description": "Blep.",
"start": "2019-04-11T17:02:00.87",
"end": "2019-10-11T17:02:07.716",
"webex": "https://dogeplanet.com",
"imageUrl": "/api/images/bleh.png",
"categoryId": 1,
"room": "White"
}
200 OK
Updates can only be made by the user that created the workshop (ie: the existing educatorId must match the logged in userId)
Locations
Categories
DELETE api/workshops/1
200 OK
Cancelation can only be done by the user that created the workshop (ie: the existing educatorId must match the logged in userId)
LearningTogether @ BuildIt
http://ec2-18-224-56-34.us-east-2.compute.amazonaws.com/api
https://bettertogether.buildit.systems/api