Coder Social home page Coder Social logo

api-docs's Introduction

API DOCS UTS

Endpoint List

NOTE

Pastikan mengirim headers setiap request:

Headers


Accept: application/json
Authorization: Bearer access_token

1. Autentikasi

  • Token dapat diperoleh dengan mengirimkan request:

Endpoint


POST /auth/token

Headers


Content-Type: application/json

Body


{
  "email": "[email protected]",
  "password": "password123"
}

Response


{
  "data" : {
    "access_token": "1000|98rw90er89wncrw9mrwen7yrcwer"
  }
}

2. profile user

Endpoint


POST /auth/user

Response


{
  "data": {
    "id": 98,
    "sdm_id": "5ded2223-3d3d-4cd4-bbab-8e041f1aec6c",
    "sdm_name": "I MADE WIDIARTA",
    "email": "[email protected]",
    "email_verified_at": null,
    "nidn": "0813018701",
    "nip": "0",
    "active_status_name": "Aktif",
    "employee_status": "NON PNS",
    "sdm_type": "Dosen",
    "is_sister_exist": 1,
    "structure_id": 2,
    "created_at": "2022-12-10T12:45:41.000000Z",
    "updated_at": "2022-12-10T18:11:35.000000Z"
  }
}

3. Daftar Mata Kuliah

Endpoint

GET /subject

Response

{
  "data": [
    {
      "id": 1,
      "subject": "Dasar pemrograman web",
      "class_id": 2,
      "sks": 4,
      "number_of_meetings": 16,
      "sdm_id": 98,
      "value_sks": "0.50",
      "meetings_completed": 2,
      "meetings_pending": 14,
      "human_resource": {
        "id": 98,
        "sdm_name": "I MADE WIDIARTA"
      },
      "class": {
        "id": 2,
        "class": "SPL-2016-A1",
        "structure_id": 21,
        "structure": {
          "id": 21,
          "role": "Teknik Sipil"
        }
      }
    }
  ]
}

4. Mata Kuliah Hari ini

Endpoint

GET /subject/today

Response

{
  "data" : [
    {
      "id": 1,
      "subject": "Dasar pemrograman web",
      "class_id": 2,
      "sks": 4,
      "number_of_meetings": 16,
      "sdm_id": 98,
      "value_sks": "0.50",
      "meetings_completed": 2,
      "meetings_pending": 14,
      "human_resource": {
        "id": 98,
        "sdm_name": "I MADE WIDIARTA"
      },
      "class": {
        "id": 2,
        "class": "SPL-2016-A1",
        "structure_id": 21,
        "structure": {
          "id": 21,
          "role": "Teknik Sipil"
        }
      }
    }
  ]
}

5. Mata Kuliah By Id

Endpoint

GET /subject/{subject_id}
Ex: GET /subject/1

Response

{
  "data": {
    "id": 1,
    "subject": "Dasar pemrograman web",
    "class_id": 2,
    "sks": 4,
    "number_of_meetings": 16,
    "sdm_id": 98,
    "value_sks": "0.50",
    "meetings_completed": 2,
    "meetings_pending": 14,
    "human_resource": {
      "id": 98,
      "sdm_name": "I MADE WIDIARTA"
    },
    "class": {
      "id": 2,
      "class": "SPL-2016-A1",
      "structure_id": 21,
      "structure": {
        "id": 21,
        "role": "Teknik Sipil"
      }
    }
  }
}

6. Jadwal By Mata Kuliah

Endpoint

GET /subject/{subject_id}/meeting
Ex: GET /subject/1/meeting

Response

{
  "data": [
      {
      "id": 1,
      "subject_id": 1,
      "meeting_name": "Pertemuan ke 1",
      "date": "2022-12-17T20:23",
      "meeting_start": "2022-12-17T20:23",
      "file": null
    },
    {
      "id": 2,
      "subject_id": 1,
      "meeting_name": "Pertemuan ke 2",
      "date": "2022-12-18T13:37",
      "meeting_start": "2022-12-18T13:37",
      "file": "639ea7197d5841671341849download.jfif.jpg"
    },
    ...
     {
      "id": 16,
      "subject_id": 1,
      "meeting_name": "Pertemuan ke 16",
      "date": null,
      "meeting_start": null,
      "file": null
    }
  ]
}

7. Absen Mulai Kelas

Endpoint

POST /subject/{subject_id}/meeting/{meeting_id}/start
Ex: POST /subject/1/meeting/1/start

Body

{
    "file": "upload file"
}

Response

{
  "data": "Akan mengembalikan link agar bisa di share ke mahasiswa (Menyusul)"
}

8. List Absensi Kehadiran

Endpoint

GET /presence
Ex: GET /presence

Response

{
  "data": [
    {
      "id": 11,
      "sdm_id": 98,
      "latitude_in": "80",
      "longitude_in": "80",
      "check_in_time": "2022-12-19 12:13:18",
      "check_out_time": "2022-12-19 12:13:36",
      "latitude_out": "80",
      "longitude_out": "80",
  },
  {
      "id": 11,
      "sdm_id": 98,
      "latitude_in": "80",
      "longitude_in": "80",
      "check_in_time": "2022-12-19 12:13:18",
      "check_out_time": "2022-12-19 12:13:36",
      "latitude_out": "80",
      "longitude_out": "80",
    }
  ]
}

9. Absensi Kehadiran Masuk

Endpoint

POST /presence/check-in
Ex: POST /presence/check-in

Body

{
    "latitude": "80",
    "longitude": "80"
}

Response

{
  "data": {
    "sdm_id": 98,
    "check_in_time": "2022-12-19 12:13:18",
    "latitude_in": "80",
    "longitude_in": "80",
    "id": 11
  }
}

10. List Absensi Kehadiran Pulang

Endpoint

POST /presence/check-out
Ex: POST /presence/check-out

Body

{
    "latitude": "80",
    "longitude": "80"
}

Response

{
  "data": {
    "id": 11,
    "sdm_id": 98,
    "latitude_in": "80",
    "longitude_in": "80",
    "check_in_time": "2022-12-19 12:13:18",
    "check_out_time": "2022-12-19 12:13:36",
    "latitude_out": "80",
    "longitude_out": "80",
  }
}

10. List Absensi Hari Ini

Endpoint

POST /presence/today
Ex: POST /presence/today

Response

{
  "data": {
    "id": 11,
    "sdm_id": 98,
    "latitude_in": "80",
    "longitude_in": "80",
    "check_in_time": "2022-12-19 12:13:18",
    "check_out_time": "2022-12-19 12:13:36",
    "latitude_out": "80",
    "longitude_out": "80",
  }
}

api-docs's People

Contributors

a2rj avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.