Sample API Return Values
@app.route('/company/departments/', methods=['GET'])
http://localhost:5000/company/departments/
{ "departments": [ 1, 4, 5, 6, 7, 8 ] }
@app.route('/company/employees/', methods=['GET'])
http://localhost:5000/company/employees/
{ "employees": [
"111111100", "111111101", "111111102", "111111103", "123456789", "222222200",
"222222201", "222222202", "222222203", "222222204", "222222205", "333333300",
"333333301", "333445555", "444444400", "444444401", "444444402", "444444403",
"453453453", "555555500", "555555501", "666666600", "666666601", "666666602",
"666666603", "666666604", "666666605", "666666606", "666666607", "666666608",
"666666609", "666666610", "666666611", "666666612", "666666613", "666884444",
"888665555", "987654321", "987987987", "999887777"
]
}
@app.route('/company/projects/', methods=['GET'])
http://localhost:5000/company/projects/
{ "projects": [ 1, 2, 3, 10, 20, 30, 61, 62, 63, 91, 92 ] }
@app.route('/company/cities/', methods=['GET'])
http://localhost:5000/company/cities/
{ "cities": [ "Atlanta", "Bellaire", "Birmingham", "Chicago", "Dallas",
"Houston", "Jackson", "Jacksonville", "LasVegas", "Miami", "Milwaukee",
"Philadephia", "Phoenix", "Sacramento", "Seattle", "Stafford", "Sugarland"
]
}
@app.route('/company/employee/<string:ssn>/', methods=['GET'])
http://localhost:5000/company/employee/333445555/
{
"address": "638 Voss, Houston, TX",
"bdate": "1945-12-08",
"department_name": "Research",
"department_number": 5,
"dependents": [
{
"bdate": "1976-04-05",
"dname": "Alice",
"gender": "F",
"relationship": "Daughter"
},
{
"bdate": "1973-10-25",
"dname": "Theodore",
"gender": "M",
"relationship": "Son"
},
{
"bdate": "1948-05-03",
"dname": "Joy",
"gender": "F",
"relationship": "Spouse"
}
],
"fname": "Franklin",
"gender": "M",
"lname": "Wong",
"manages": {
"dname": "Research",
"dnumber": 5
},
"minit": "T",
"projects": [
{
"hours": 10.0,
"pname": "Reorganization",
"pnumber": 20
},
{
"hours": 10.0,
"pname": "Computerization",
"pnumber": 10
},
{
"hours": 10.0,
"pname": "ProductZ",
"pnumber": 3
},
{
"hours": 10.0,
"pname": "ProductY",
"pnumber": 2
}
],
"salary": 40000,
"supervisees": [
"453453453",
"666884444",
"123456789"
],
"supervisor": "888665555"
}
@app.route('/company/department/<int:dno>/', methods=['GET'])
http://localhost:5000/company/department/5/
{
"controlled_projects": [
{
"pname": "ProductZ",
"pnumber": 3
},
{
"pname": "ProductY",
"pnumber": 2
},
{
"pname": "ProductX",
"pnumber": 1
}
],
"dname": "Research",
"employees": [
"453453453",
"666884444",
"123456789",
"333445555"
],
"locations": [
"Bellaire",
"Sugarland",
"Houston"
],
"manager": "Franklin Wong",
"manager_start_date": "1978-05-22",
"mgrssn": "333445555"
}
@app.route('/company/project/<int:pno>/', methods=['GET'])
http://localhost:5000/company/project/61/
{ "controlling_dname": "Software",
"controlling_dnumber": 6,
"dept_hours": {
"Sales": 190,
"Software": 160
},
"employees": [ "666666613", "666666612", "666666611", "666666610",
"666666607", "111111103", "111111102", "111111101",
"111111100"
],
"person_hours": 350,
"pname": "OperatingSystems"
}
@app.route('/company/projects/<string:cty>/', methods=['GET'])
http://localhost:5000/company/projects/Houston/
{
"projects": [
{
"pname": "ProductZ",
"pnumber": 3
},
{
"pname": "Reorganization",
"pnumber": 20
}
]
}
@app.route('/company/departments/<string:cty>/', methods=['GET'])
http://localhost:5000/company/departments/Houston/
{
"departments": [
{
"dname": "Research",
"dnumber": 5
},
{
"dname": "Headquarters",
"dnumber": 1
}
]
}
@app.route('/company/supervisees/<string:ssn>/', methods=['GET'])
http://localhost:5000/company/supervisees/333445555/
{ "employees": [ "453453453", "666884444", "123456789" ] }