Link to API: https://qmap-platform.herokuapp.com/
Get a list of campuses in CUNY.
URL : /api/campuses/
Method : GET
-
Code :
200 OK
Get a list of degrees offered at particular campus.
URL : /api/degrees/{institute_id}
where "institute_id" can be obtained from "/api/campuses"
Method : GET
-
Code :
200 OK
Condition : If provided institute_id parameter is not correct.
Code : 404 NOT FOUND
Content : {}
URL : /api/course/{crse_id}
Method : GET
-
Code :
200 OK
Condition : If crse_id is not found.
Code : 404 NOT FOUND
Content : {}
There are two ways to search courses; by name or description of the course.
URL : /api/course?q={search_string}&id={institute_id}&major={major}
Method : GET
-
Code :
200 OK -
Response for example request searching by name "/api/course/?q=355&id=17&major=computer%20science"
Condition : If q, or major, or id are mispelled or not provided.
Code : 400 BAD REQUEST
Content : {'message' : 'invalid query parameter'}
Condition : If no matches are found.
Code : 200 OK
Content : { "message": "No matching courses found" }
URL : /api/map/{map_id}
Method : GET
-
Code :
200 OK
Condition : If map_id is not found.
Code : 404 NOT FOUND
Content : { 'message' : 'map_id does not exist' }
URL : /api/map/?id={institute_id}&major={major}&start_year{start_year}
Method : GET
-
Code :
200 OK -
Response for example request "/api/map/?id=17&major=Computer+Science&start_year=spring+2020
Condition : If no maps are found.
Code : 404 NOT FOUND
Content : { 'message' : 'No maps found' }
Condition : If search parameters are invalid.
Code : 400 BAD REQUEST
Content : { 'message' : 'malformed query' }
URL : /api/map/?id={institute_id}&major={major}
Method : GET
Condition : If no maps are found.
Code : 404 NOT FOUND
Content : { 'message' : 'No maps found' }
Condition : If search parameters are invalid.
Code : 400 BAD REQUEST
Content : { 'message' : 'malformed query' }
URL : /api/map/{map_id}
Method : DELETE
- Code :
204 NO CONTENT
Condition : If map_id is not found.
Code : 404 NOT FOUND
Content : { 'message' : 'map_id does not exist' }
URL : /api/map/
Method : POST
-
Code :
201 CREATED -
Content :
{ 'message' : 'map successfully created' }