Skip to content

Latest commit

 

History

History
112 lines (90 loc) · 1.43 KB

README.md

File metadata and controls

112 lines (90 loc) · 1.43 KB

API Spec

Create Mahasiswa

Request :

  • Method : POST
  • Endpoint : api/mahasiswa
  • Header :
    • Content-Type : application/json
    • Accept : application/json
  • Body :
{
  "nim": "string, unique, (9)",
  "nama": "string",
  "fakultas": "string",
  "prodi": "string"
}

Response :

{
  "code": "number",
  "status": "string",
  "data": {
    "nim": "string, unique, (9)",
    "nama": "string",
    "fakultas": "string",
    "prodi": "string"
  }
}

Get Mahasiswa

Request :

  • Method : GET
  • Endpoint : api/mahasiswa/{nim_mahasiswa}
  • Header :
    • Accept : appliaction/json

Response :

{
  "code": "number",
  "status": "string",
  "data": {
    "nim": "string, unique, (9)",
    "nama": "string",
    "fakultas": "string",
    "prodi": "string"
  }
}

Update Mahasiswa

Request :

  • Method : PUT/PATCH
  • Endpoint : api/mahasiswa/{nim_mahasiswa}
  • Header :
    • Content-Type : application/json
    • Accept : application/json
  • Body :
{
  "nama": "string",
  "fakultas": "string",
  "prodi": "string"
}

Response :

{
  "code": "number",
  "status": "string",
  "data": {
    "nim": "string, unique, (9)",
    "nama": "string",
    "fakultas": "string",
    "prodi": "string"
  }
}

Delete Mahasiswa

Request :

  • Method : DELETE
  • Endpoint : api/mahasiswa/{nim_mahasiswa}
  • Header :
    • Accept : application/json

Response :

{
  "code": "number",
  "status": "string"
}