Closed russleyshaw closed 7 years ago
File: dbapi/src/routers/api/schedule.ts
dbapi/src/routers/api/schedule.ts
Implement an API router for schedules
NOTE: Query params, Params, and JSON Bodies should go through a jsonschema verification, so be sure to add the schema for each API endpoint
NOTE: Normal endpoints should not select for data and result columns. Specific endpoints will be provided
data
result
[x] GET /api/v2/schedule/ - get schedules from query params
GET /api/v2/schedule/
[x] GET /api/v2/schedule/:id/ - get schedule from id
GET /api/v2/schedule/:id/
[x] POST /api/v2/schedule/ - create a schedule
POST /api/v2/schedule/
[x] POST /api/v2/schedule/:id/ - update a schedule from id
POST /api/v2/schedule/:id/
[x] GET /api/v2/schedule/:id/data/ - get data json from schedule
GET /api/v2/schedule/:id/data/
[x] POST /api/v2/schedule/:id/data/ - set data json from schedule
POST /api/v2/schedule/:id/data/
[x] GET /api/v2/schedule/:id/result/ - get result json from schedule
GET /api/v2/schedule/:id/result/
[x] POST /api/v2/schedule/:id/result/ - set result json from schedule
POST /api/v2/schedule/:id/result/
File:
dbapi/src/routers/api/schedule.ts
Implement an API router for schedules
NOTE: Query params, Params, and JSON Bodies should go through a jsonschema verification, so be sure to add the schema for each API endpoint
NOTE: Normal endpoints should not select for
data
andresult
columns. Specific endpoints will be provided[x]
GET /api/v2/schedule/
- get schedules from query params[x]
GET /api/v2/schedule/:id/
- get schedule from id[x]
POST /api/v2/schedule/
- create a schedule[x]
POST /api/v2/schedule/:id/
- update a schedule from id[x]
GET /api/v2/schedule/:id/data/
- get data json from schedule[x]
POST /api/v2/schedule/:id/data/
- set data json from schedule[x]
GET /api/v2/schedule/:id/result/
- get result json from schedule[x]
POST /api/v2/schedule/:id/result/
- set result json from schedule