Skip to content
This repository has been archived by the owner on Jan 26, 2024. It is now read-only.

API that provides general information of faculties, regional campuses, and study programs at Universitas Pendidikan Indonesia (UPI). Developed for @PROYEK-KOMPETEGRAM.

Notifications You must be signed in to change notification settings

fityannugroho/fakultas-prodi-upi

Repository files navigation

Fakultas-Prodi UPI API


Table of Contents

  1. Description
  2. Framework & Database
  3. Endpoint API
  4. Setting Environment
  5. Running the App

Description

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.

Framework & Database

This project use NestJS framework that writes in Typescript, and use MongoDB database.

Endpoint API

1. GET /fakultas-prodi

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",
          },
          ...
        ]
      },
      ...
    ]
  }
}

2. GET /fakultas

Get all faculties.

Response example :

// Response for 200 (OK)
{
  "data": [
    {
      "namaFakultas": "FIP",
    },
    ...
  ]
}

3. GET /fakultas/{namaFakultas}/prodi

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"
    },
  ]
}

4. GET /prodi

Get all study programs.

Response example :

// Response for 200 (OK)
{
  "data": [
    {
      "kode": "A015",
      "prodi": "Administrasi Pendidikan"
    },
    ...
  ]
}

5. GET /prodi/{kodeProdi}

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",
    }
  ]
}

Setting Environment

  • 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 like mongodb+srv://USERNAME:PASSWORD@CLUSTER_URL/DB_NAME?retryWrites=true&w=majority. See MongoDB docs for details.

  • Now you are ready to run the app.

Running The App

For run the app in development environment, use this command :

$ npm run start

See nestjs.README.md file for details.

About

API that provides general information of faculties, regional campuses, and study programs at Universitas Pendidikan Indonesia (UPI). Developed for @PROYEK-KOMPETEGRAM.

Topics

Resources

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published