This is a Public API that contains general information such as attributes or names of faculties, regional campuses, and study programs at the Indonesian Education University (Universitas Pendidikan Indonesia - UPI), ranging from undergraduate to doctoral levels.
This project use NestJS framework that writes in Typescript, and use MongoDB database.
Get all faculties, regional campuses, and study programs.
Response example :
// Response for 200 (OK)
{
"data": {
"universitas": "Universitas Pendidikan Indonesia",
"listFakultas": [
{
"namaFakultas": "FIP",
"listProdi": [
{
"kodeProdi": "A015",
"namaProdi": "Administrasi Pendidikan",
},
...
]
},
...
]
}
}
Get all faculties.
Response example :
// Response for 200 (OK)
{
"data": [
{
"namaFakultas": "FIP",
},
...
]
}
Get all study programs from specific faculty name. namaFakultas
parameter is string and can contain spaces.
Response example :
// Response for 200 (OK)
// Request example: /fakultas/FIP/prodi
{
"data": {
"namaFakultas": "FIP",
"listProdi": [
{
"kodeProdi": "A015",
"namaProdi": "Administrasi Pendidikan"
},
...
]
}
}
// Response for 404 (NOT FOUND)
// Request example: /fakultas/unknown/prodi
{
"errors": [
{
"status": "404",
"title": "Tidak ditemukan",
"detail": "Prodi dari fakultas bersangkutan tidak ditemukan"
},
]
}
Get all study programs.
Response example :
// Response for 200 (OK)
{
"data": [
{
"kode": "A015",
"prodi": "Administrasi Pendidikan"
},
...
]
}
Get a study program from specified code. kodeProdi
parameter is string and alphanumeric.
Response example :
// Response for 200 (OK)
{
"data": {
"kode": "G505",
"prodi": "Rekayasa Perangkat Lunak",
"fakultas": "Kampus UPI Cibiru",
}
}
// Response for 404 (NOT FOUND)
{
"errors": [
{
"status": "404",
"title": "Tidak ditemukan",
"detail": "Kode prodi tidak ditemukan",
}
]
}
-
Duplicate
.template.env
file and rename it to.env
. -
Set
APP_PORT
with port number you want (default port is 3000). -
Set
MONGODB_URI
with connection string of your cluster. It looks likemongodb+srv://USERNAME:PASSWORD@CLUSTER_URL/DB_NAME?retryWrites=true&w=majority
. See MongoDB docs for details. -
Now you are ready to run the app.
For run the app in development environment, use this command :
$ npm run start
See nestjs.README.md file for details.